// trigger new round
// reset objectives, toggle spawnpoints, reset triggers, ...
-void vehicles_clearreturn();
-void vehicles_spawn();
void assault_new_round()
{
- entity oldself;
- //bprint("ASSAULT: new round\n");
-
- oldself = self;
- // Eject players from vehicles
- FOR_EACH_PLAYER(self)
- {
- if(self.vehicle)
- vehicles_exit(VHEF_RELESE);
- }
-
- self = findchainflags(vehicle_flags, VHF_ISVEHICLE);
- while(self)
- {
- vehicles_clearreturn();
- vehicles_spawn();
- self = self.chain;
- }
-
- self = oldself;
-
// up round counter
self.winning = self.winning + 1;
}
// End generic vehile projectile system
+void vehicles_reset()
+{
+ if(self.owner)
+ {
+ entity oldself = self;
+ self = self.owner;
+ vehicles_exit(VHEF_RELESE);
+ self = oldself;
+ }
+ self.alpha = -1;
+ self.movetype = MOVETYPE_NONE;
+ self.effects = EF_NODRAW;
+ self.colormod = '0 0 0';
+ self.avelocity = '0 0 0';
+ self.velocity = '0 0 0';
+ self.event_damage = func_null;
+ self.solid = SOLID_NOT;
+ self.deadflag = DEAD_NO;
+
+ self.touch = func_null;
+ self.nextthink = 0;
+ vehicles_setreturn();
+}
+
/** vehicles_spawn
Exetuted for all vehicles on (re)spawn.
Sets defaults for newly spawned units.
self.owner = world;
self.touch = vehicles_touch;
self.event_damage = vehicles_damage;
+ self.reset = vehicles_reset;
self.iscreature = TRUE;
self.teleportable = FALSE; // no teleporting for vehicles, too buggy
self.damagedbycontents = TRUE;