]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/gamestart.qc
Merge branch 'martin-t/misc' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / gamestart.qc
index 3ad419d22fc287388949f7a5c0ba2842a13d4216..72d76d183326437bdd4f5bcd7a38393d0a578268 100644 (file)
@@ -1,22 +1,28 @@
+#include "gamestart.qh"
 #ifdef SVQC
-void gamestart_use()
+void gamestart_use(entity this, entity actor, entity trigger)
 {
-       activator = self;
-       SUB_UseTargets();
-       remove(self);
+       SUB_UseTargets(this, this, trigger);
+       delete(this);
 }
 
-void spawnfunc_trigger_gamestart()
+void gamestart_use_this(entity this)
 {
-       self.use = gamestart_use;
-       self.reset2 = spawnfunc_trigger_gamestart;
+       gamestart_use(this, NULL, NULL);
+}
+
+spawnfunc(trigger_gamestart)
+{
+       this.use = gamestart_use;
+       this.reset2 = spawnfunc_trigger_gamestart;
 
-       if(self.wait)
+       if(this.wait)
        {
-               self.think = self.use;
-               self.nextthink = game_starttime + self.wait;
+               setthink(this, adaptor_think2use);
+               this.nextthink = game_starttime + this.wait;
        }
        else
-               InitializeEntity(self, gamestart_use, INITPRIO_FINDTARGET);
+               InitializeEntity(this, gamestart_use_this, INITPRIO_FINDTARGET);
 }
+
 #endif