]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_assault.qc
Merge branch 'master' into Mario/use1
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_assault.qc
index c2d5ed3b905771ec30d5d98e141e9c9a59acdf9e..e358f8fba71629318d2ca471542851221da4f716 100644 (file)
@@ -138,8 +138,8 @@ void assault_objective_decrease_use(entity this, entity actor, entity trigger)
        }
 }
 
-void assault_setenemytoobjective()
-{SELFPARAM();
+void assault_setenemytoobjective(entity this)
+{
        entity objective;
        for(objective = world; (objective = find(objective, targetname, self.target)); )
        {
@@ -199,9 +199,9 @@ void target_objective_decrease_activate(entity this)
        }
 }
 
-void target_objective_decrease_findtarget()
+void target_objective_decrease_findtarget(entity this)
 {
-       assault_setenemytoobjective();
+       assault_setenemytoobjective(this);
 }
 
 void target_assault_roundend_reset(entity this)
@@ -232,6 +232,11 @@ void assault_roundstart_use(entity this, entity actor, entity trigger)
                WITHSELF(it, turret_respawn());
        ));
 }
+void assault_roundstart_use_self()
+{
+    SELFPARAM();
+    assault_roundstart_use(this, NULL, NULL);
+}
 
 void assault_wall_think()
 {SELFPARAM();
@@ -422,9 +427,9 @@ spawnfunc(target_assault_roundstart)
 
        assault_attacker_team = NUM_TEAM_1;
        self.classname = "target_assault_roundstart";
-       self.use1 = assault_roundstart_use;
-       self.reset2 = adaptor_think2use;
-       InitializeEntity(self, adaptor_think2use, INITPRIO_FINDTARGET);
+       self.use = assault_roundstart_use;
+       self.reset2 = assault_roundstart_use_self;
+       InitializeEntity(self, assault_roundstart_use_self, INITPRIO_FINDTARGET);
 }
 
 // legacy bot code