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;
else
this.nextthink = time + game_starttime;
- if(MUTATOR_CALLHOOK(VehicleSpawn, this))
+ if(!MUTATOR_CALLHOOK(VehicleInit, this))
return false;
return true;
/**
* called when a vehicle initializes
- * return true to remove the vehicle
+ * return false to remove the vehicle
*/
-#define EV_VehicleSpawn(i, o) \
+#define EV_VehicleInit(i, o) \
/** vehicle */ i(entity, MUTATOR_ARGV_0_entity) \
/**/
-MUTATOR_HOOKABLE(VehicleSpawn, EV_VehicleSpawn);
+MUTATOR_HOOKABLE(VehicleInit, EV_VehicleInit);
/**
* called when a player enters a vehicle
turret.team = 5; // this gets reversed when match starts?
}
-MUTATOR_HOOKFUNCTION(as, VehicleSpawn)
+MUTATOR_HOOKFUNCTION(as, VehicleInit)
{
entity veh = M_ARGV(0, entity);
- veh.nextthink = time + 0.5;
+ if(veh.active != ACTIVE_NOT)
+ veh.nextthink = time + 0.5;
+ return true;
}
MUTATOR_HOOKFUNCTION(as, HavocBot_ChooseRole)