]> icculus.org git repositories - divverent/nexuiz.git/blob - qcsrc/triggers.qc
Added a makefile
[divverent/nexuiz.git] / qcsrc / triggers.qc
1 void() hurt_on =
2 {
3         self.solid = SOLID_TRIGGER;
4         self.nextthink = -1;
5 };
6
7 void() hurt_touch =
8 {
9         if (other.takedamage)
10         {
11                 self.solid = SOLID_NOT;
12                 Damage (other, self, self, self.dmg, 1, '0 0 0', '0 0 0');
13                 self.think = hurt_on;
14                 self.nextthink = time + 1;
15         }
16
17         return;
18 };
19
20
21 void() trigger_hurt =
22 {
23         InitTrigger ();
24         self.touch = hurt_touch;
25         if (!self.dmg)
26                 self.dmg = 500;
27 };
28
29 void() target_speaker_use = {sound(self, CHAN_VOICE, self.noise, 1, 1);}
30 void() target_speaker = {self.use = target_speaker_use;}