21 void SUB_Remove (void)
26 void SUB_SetFade_Think (void)
28 if (self.alpha < 0.06) // don't let it reach 0, lest it become fully visible again
31 self.alpha = self.alpha - 0.05;
33 self.think = SUB_SetFade_Think;
34 self.nextthink = time + 0.1;
41 Fade 'ent' out when time >= 'when'
44 void SUB_SetFade (entity ent, float when)
54 ent.think = SUB_SetFade_Think;
62 unused but required by the engine
76 Play a sound at the given location
79 void PointSound (vector org, string snd, float vol, float attn)
84 setorigin (speaker, org);
85 sound (speaker, CHAN_BODY, snd, vol, attn);
95 A version of traceline that must be used by SOLID_SLIDEBOX things that want to hit SOLID_CORPSE things with a trace attack
98 void traceline_hitcorpse (entity source, vector v1, vector v2, float nomonst, entity forent)
102 oldsolid = source.solid;
103 source.solid = SOLID_BBOX;
105 traceline (v1, v2, nomonst, forent);
107 source.solid = oldsolid;
114 Returns a random number between -1.0 and 1.0
119 return 2 * (random () - 0.5);