self = oldself;
}
+vector target_objective_spawn_evalfunc(entity player, entity spot, vector current)
+{
+ if(self.health < 0 || self.health >= ASSAULT_VALUE_INACTIVE)
+ return '-1 0 0';
+ return current;
+}
+
void spawnfunc_target_objective() {
if(!g_assault)
{
self.use = assault_objective_use;
assault_objective_reset();
self.reset = assault_objective_reset;
+ self.spawn_evalfunc = target_objective_spawn_evalfunc;
}
centerprint(player, s);
}
}
-
+
oldactivator = activator;
activator = oldself;
SUB_UseTargets();
void assault_setenemytoobjective()
{
- local entity objective;
+ entity objective;
for(objective = world; (objective = find(objective, targetname, self.target)); ) {
if(objective.classname == "target_objective") {
if(self.enemy == world)
return;
}
self.spawnflags = 3;
+ self.classname = "func_assault_destructible";
if(assault_attacker_team == COLOR_TEAM1) {
self.team = COLOR_TEAM2;
} else {
activator = self;
SUB_UseTargets();
-
+
#ifdef TTURRETS_ENABLED
entity ent, oldself;
// reset objectives, toggle spawnpoints, reset triggers, ...
void vehicles_clearrturn();
void vehicles_spawn();
-void assault_new_round()
+void assault_new_round()
{
entity oldself;
//bprint("ASSAULT: new round\n");
FOR_EACH_PLAYER(self)
{
if(self.vehicle)
- vehicles_exit(VHEF_RELESE);
+ vehicles_exit(VHEF_RELESE);
}
-
+
self = findchainflags(vehicle_flags, VHF_ISVEHICLE);
while(self)
{
}
- local entity ent;
+ entity ent;
for(ent = world; (ent = nextent(ent)); )
{
if(clienttype(ent) == CLIENTTYPE_NOTACLIENT)
ent.team_saved = COLOR_TEAM1;
}
}
-
+
// reset the level with a countdown
cvar_set("timelimit", ftos(ceil(time - game_starttime) / 60));
ReadyRestartForce(); // sets game_starttime