]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/triggers/trigger/gamestart.qc
Fix the use of self, activator and other globals in .use
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / gamestart.qc
1 #ifdef SVQC
2 void gamestart_use(entity this, entity actor, entity trigger)
3 {
4         SUB_UseTargets(this, this, trigger);
5         remove(this);
6 }
7
8 void self_spawnfunc_trigger_gamestart();
9 spawnfunc(trigger_gamestart)
10 {
11         this.use1 = gamestart_use;
12         this.reset2 = self_spawnfunc_trigger_gamestart;
13
14         if(this.wait)
15         {
16                 this.think = adaptor_think2use;
17                 this.nextthink = game_starttime + this.wait;
18         }
19         else
20                 InitializeEntity(this, adaptor_think2use, INITPRIO_FINDTARGET);
21 }
22 void self_spawnfunc_trigger_gamestart() { SELFPARAM(); spawnfunc_trigger_gamestart(this); }
23
24 #endif