]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/triggers/trigger/delay.qc
Merge branch 'martin-t/misc' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / delay.qc
1 #include "delay.qh"
2 #ifdef SVQC
3 void delay_use(entity this, entity actor, entity trigger)
4 {
5    setthink(this, SUB_UseTargets_self);
6    this.nextthink = time + this.wait;
7 }
8
9 void delay_reset(entity this)
10 {
11         setthink(this, func_null);
12         this.nextthink = 0;
13 }
14
15 spawnfunc(trigger_delay)
16 {
17     if(!this.wait)
18         this.wait = 1;
19
20     this.use = delay_use;
21     this.reset = delay_reset;
22 }
23 #endif