]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "Rename VehicleSpawn mutator hook to VehicleInit and invert the returned value...
authorterencehill <piuntn@gmail.com>
Sun, 23 Oct 2016 18:37:04 +0000 (20:37 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 23 Oct 2016 18:37:04 +0000 (20:37 +0200)
This reverts commit ba479caf23cd515c9741eb6595dad2044a1fa826.

qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/server/mutators/events.qh
qcsrc/server/mutators/mutator/gamemode_assault.qc

index cd62f0746b69f6b2dc892f42a1938807cf566d07..60a8ee07760fbe897e58cd58fab2e22904337728 100644 (file)
@@ -900,7 +900,7 @@ bool vehicle_impulse(entity this, int imp)
 
 void vehicles_enter(entity pl, entity veh)
 {
-       // Remove this when bots know how to use vehicles
+   // Remove this when bots know how to use vehicles
        if((IS_BOT_CLIENT(pl) && !autocvar_g_vehicles_allow_bots))
                return;
 
@@ -1224,7 +1224,7 @@ bool vehicle_initialize(entity this, Vehicle info, bool nodrop)
        else
                this.nextthink = time + game_starttime;
 
-       if(!MUTATOR_CALLHOOK(VehicleInit, this))
+       if(MUTATOR_CALLHOOK(VehicleSpawn, this))
                return false;
 
        return true;
index 88d731e815d155d46e407d1f0a31f9c48179ab1f..f75b74748de5b90d81e3c05c44be651b0bf9f2cc 100644 (file)
@@ -540,12 +540,12 @@ MUTATOR_HOOKABLE(HelpMePing, EV_HelpMePing);
 
 /**
  * called when a vehicle initializes
- * return false to remove the vehicle
+ * return true to remove the vehicle
  */
-#define EV_VehicleInit(i, o) \
+#define EV_VehicleSpawn(i, o) \
     /** vehicle */ i(entity, MUTATOR_ARGV_0_entity) \
     /**/
-MUTATOR_HOOKABLE(VehicleInit, EV_VehicleInit);
+MUTATOR_HOOKABLE(VehicleSpawn, EV_VehicleSpawn);
 
 /**
  * called when a player enters a vehicle
index c50fc6d6f557233345d48385c8640c8888192cf5..6af1c1c4658163fcf4abd705d7df1e20110db1be 100644 (file)
@@ -529,13 +529,11 @@ MUTATOR_HOOKFUNCTION(as, TurretSpawn)
                turret.team = 5; // this gets reversed when match starts?
 }
 
-MUTATOR_HOOKFUNCTION(as, VehicleInit)
+MUTATOR_HOOKFUNCTION(as, VehicleSpawn)
 {
        entity veh = M_ARGV(0, entity);
 
-       if(veh.active != ACTIVE_NOT)
-               veh.nextthink = time + 0.5;
-       return true;
+       veh.nextthink = time + 0.5;
 }
 
 MUTATOR_HOOKFUNCTION(as, HavocBot_ChooseRole)