// trigger new round
// reset objectives, toggle spawnpoints, reset triggers, ...
-void assault_new_round() {
+void vehicles_clearrturn();
+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_clearrturn();
+ vehicles_spawn();
+ self = self.chain;
+ }
+
+ self = oldself;
+
// up round counter
self.winning = self.winning + 1;
ent.team_saved = COLOR_TEAM1;
}
}
-
+
// reset the level with a countdown
cvar_set("timelimit", ftos(ceil(time - game_starttime) / 60));
ReadyRestartForce(); // sets game_starttime
self.vehicle_flags |= VHF_HEALTHREGEN;
self.think = racer_dinit;
- self.nextthink = time + (autocvar_g_vehicles_delayspawn ? autocvar_g_vehicle_racer_respawntime + (random() * autocvar_g_vehicles_delayspawn_jitter) : 0.5);
+
+ if(g_assault)
+ self.nextthink = time + 0.5;
+ else
+ self.nextthink = time + (autocvar_g_vehicles_delayspawn ? autocvar_g_vehicle_racer_respawntime + (random() * autocvar_g_vehicles_delayspawn_jitter) : 0.5);
}
#endif // SVQC
precache_sound ("vehicles/raptor_speed.wav");
self.think = raptor_dinit;
- self.nextthink = time + (autocvar_g_vehicles_delayspawn ? autocvar_g_vehicle_raptor_respawntime + (random() * autocvar_g_vehicles_delayspawn_jitter) : 0.5);
+
+ if(g_assault)
+ self.nextthink = time + 0.5;
+ else
+ self.nextthink = time + (autocvar_g_vehicles_delayspawn ? autocvar_g_vehicle_raptor_respawntime + (random() * autocvar_g_vehicles_delayspawn_jitter) : 0.5);
}
#endif // SVQC
if(autocvar_g_vehicle_spiderbot_health_regen)
self.vehicle_flags |= VHF_HEALTHREGEN;
- self.think = vewhicle_spiderbot_dinit;
- self.nextthink = time + (autocvar_g_vehicles_delayspawn ? autocvar_g_vehicle_spiderbot_respawntime + (random() * autocvar_g_vehicles_delayspawn_jitter) : 0.5);
+ self.think = vewhicle_spiderbot_dinit;
+
+ if(g_assault)
+ self.nextthink = time + 0.5;
+ else
+ self.nextthink = time + (autocvar_g_vehicles_delayspawn ? autocvar_g_vehicle_spiderbot_respawntime + (random() * autocvar_g_vehicles_delayspawn_jitter) : 0.5);
}
#endif // SVQC
if(!teamplay)
self.team = 0;
-
+ else
+ self.team = self.tur_head.team;
+
if(self.owner.flagcarried)
{
self.owner.flagcarried.scale = 0.6;
sound (self, CH_TRIGGER_SINGLE, "misc/null.wav", 1, ATTN_NORM);
self.vehicle_exit(eject);
self.owner = world;
+ vehicles_reset_colors();
if(oldself)
self = oldself;
ret.classname = "vehicle_return";
ret.enemy = self;
ret.team = self.team;
- ret.think = vehicles_showwp;
+ ret.think = vehicles_showwp;
if(self.deadflag != DEAD_NO)
{
{
ret.nextthink = min(time + self.vehicle_respawntime, time + self.vehicle_respawntime - 1);
}
-
-
setmodel(ret, "null");
setorigin(ret, self.pos1 + '0 0 96');
if(self.team && !teamplay)
self.team = 0;
-
+
self.vehicle_flags |= VHF_ISVEHICLE;
setmodel(self, bodymodel);
self.pos1 = self.origin;
self.pos2 = self.angles;
-
+ self.tur_head.team = self.team;
+
return TRUE;
}