X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fassault.qc;h=2562dca3df803fa93725204eb01f7059ef1cd189;hb=9f31b2438f27e46e900e4a9afe47fec5fcace088;hp=517da81684928019729e385b6feb244b32963021;hpb=c43366d84b411525517bc684d6be01c86cb77b3b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/assault.qc b/qcsrc/server/assault.qc index 517da8168..2562dca3d 100644 --- a/qcsrc/server/assault.qc +++ b/qcsrc/server/assault.qc @@ -47,6 +47,13 @@ void assault_objective_use() { 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) { @@ -57,6 +64,7 @@ void spawnfunc_target_objective() { self.use = assault_objective_use; assault_objective_reset(); self.reset = assault_objective_reset; + self.spawn_evalfunc = target_objective_spawn_evalfunc; } @@ -115,7 +123,7 @@ void assault_objective_decrease_use() { 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) @@ -350,7 +358,7 @@ void assault_new_round() } - local entity ent; + entity ent; for(ent = world; (ent = nextent(ent)); ) { if(clienttype(ent) == CLIENTTYPE_NOTACLIENT) @@ -364,5 +372,5 @@ void assault_new_round() // reset the level with a countdown cvar_set("timelimit", ftos(ceil(time - game_starttime) / 60)); - ReadyRestartForce(); // sets game_starttime + ReadyRestart_force(); // sets game_starttime }