X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fassault.qc;h=425bbf77933892791bf46b5c96219b50daec758e;hb=d6868c29436f076daf3e6c68e893d947ace437ff;hp=77d7d36fc8773858f02120a697a3f2fa484c0f75;hpb=115e9ad8d9c72dedd907d15e8d4e33e27ea1306a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/assault.qc b/qcsrc/server/assault.qc index 77d7d36fc..425bbf779 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) @@ -208,8 +216,6 @@ void spawnfunc_func_assault_destructible() { } self.spawnflags = 3; self.classname = "func_assault_destructible"; - self.takedamage = TRUE; - self.bot_attack = TRUE; if(assault_attacker_team == COLOR_TEAM1) { self.team = COLOR_TEAM2; } else { @@ -352,7 +358,7 @@ void assault_new_round() } - local entity ent; + entity ent; for(ent = world; (ent = nextent(ent)); ) { if(clienttype(ent) == CLIENTTYPE_NOTACLIENT)