]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/assault.qc
Merge remote branch 'origin/master' into samual/config_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / assault.qc
index 77d7d36fc8773858f02120a697a3f2fa484c0f75..425bbf77933892791bf46b5c96219b50daec758e 100644 (file)
@@ -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)