home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / quake / programs / wmods / misc.qc < prev    next >
Encoding:
Text File  |  1996-08-07  |  15.5 KB  |  678 lines

  1.  
  2. /*QUAKED info_null (0 0.5 0) (-4 -4 -4) (4 4 4)
  3. Used as a positional target for spotlights, etc.
  4. */
  5. void() info_null =
  6. {
  7.     remove(self);
  8. };
  9.  
  10. /*QUAKED info_notnull (0 0.5 0) (-4 -4 -4) (4 4 4)
  11. Used as a positional target for lightning.
  12. */
  13. void() info_notnull =
  14. {
  15. };
  16.  
  17. //============================================================================
  18.  
  19. float START_OFF = 1;
  20.  
  21. void() light_use =
  22. {
  23.     if (self.spawnflags & START_OFF)
  24.     {
  25.         lightstyle(self.style, "m");
  26.         self.spawnflags = self.spawnflags - START_OFF;
  27.     }
  28.     else
  29.     {
  30.         lightstyle(self.style, "a");
  31.         self.spawnflags = self.spawnflags + START_OFF;
  32.     }
  33. };
  34.  
  35. /*QUAKED light (0 1 0) (-8 -8 -8) (8 8 8) START_OFF
  36. Non-displayed light.
  37. Default light value is 300
  38. Default style is 0
  39. If targeted, it will toggle between on or off.
  40. */
  41. void() light =
  42. {
  43.     if (!self.targetname)
  44.     {    // inert light
  45.         remove(self);
  46.         return;
  47.     }
  48.     
  49.     if (self.style >= 32)
  50.     {
  51.         self.use = light_use;
  52.         if (self.spawnflags & START_OFF)
  53.             lightstyle(self.style, "a");
  54.         else
  55.             lightstyle(self.style, "m");
  56.     }
  57. };
  58.  
  59. /*QUAKED light_fluoro (0 1 0) (-8 -8 -8) (8 8 8) START_OFF
  60. Non-displayed light.
  61. Default light value is 300
  62. Default style is 0
  63. If targeted, it will toggle between on or off.
  64. Makes steady fluorescent humming sound
  65. */
  66. void() light_fluoro =
  67. {
  68.     if (self.style >= 32)
  69.     {
  70.         self.use = light_use;
  71.         if (self.spawnflags & START_OFF)
  72.             lightstyle(self.style, "a");
  73.         else
  74.             lightstyle(self.style, "m");
  75.     }
  76.     
  77.     precache_sound ("ambience/fl_hum1.wav");
  78.     ambientsound (self.origin, "ambience/fl_hum1.wav", 0.5, ATTN_STATIC);
  79. };
  80.  
  81. /*QUAKED light_fluorospark (0 1 0) (-8 -8 -8) (8 8 8)
  82. Non-displayed light.
  83. Default light value is 300
  84. Default style is 10
  85. Makes sparking, broken fluorescent sound
  86. */
  87. void() light_fluorospark =
  88. {
  89.     if (!self.style)
  90.         self.style = 10;
  91.  
  92.     precache_sound ("ambience/buzz1.wav");
  93.     ambientsound (self.origin, "ambience/buzz1.wav", 0.5, ATTN_STATIC);
  94. };
  95.  
  96. /*QUAKED light_globe (0 1 0) (-8 -8 -8) (8 8 8)
  97. Sphere globe light.
  98. Default light value is 300
  99. Default style is 0
  100. */
  101. void() light_globe =
  102. {
  103.     precache_model ("progs/s_light.spr");
  104.     setmodel (self, "progs/s_light.spr");
  105.     makestatic (self);
  106. };
  107.  
  108. void() FireAmbient =
  109. {
  110.     precache_sound ("ambience/fire1.wav");
  111. // attenuate fast
  112.     ambientsound (self.origin, "ambience/fire1.wav", 0.5, ATTN_STATIC);
  113. };
  114.  
  115. /*QUAKED light_torch_small_walltorch (0 .5 0) (-10 -10 -20) (10 10 20)
  116. Short wall torch
  117. Default light value is 200
  118. Default style is 0
  119. */
  120. void() light_torch_small_walltorch =
  121. {
  122.     precache_model ("progs/flame.mdl");
  123.     setmodel (self, "progs/flame.mdl");
  124.     FireAmbient ();
  125.     makestatic (self);
  126. };
  127.  
  128. /*QUAKED light_flame_large_yellow (0 1 0) (-10 -10 -12) (12 12 18)
  129. Large yellow flame ball
  130. */
  131. void() light_flame_large_yellow =
  132. {
  133.     precache_model ("progs/flame2.mdl");
  134.     setmodel (self, "progs/flame2.mdl");
  135.     self.frame = 1;
  136.     FireAmbient ();
  137.     makestatic (self);
  138. };
  139.  
  140. /*QUAKED light_flame_small_yellow (0 1 0) (-8 -8 -8) (8 8 8) START_OFF
  141. Small yellow flame ball
  142. */
  143. void() light_flame_small_yellow =
  144. {
  145.     precache_model ("progs/flame2.mdl");
  146.     setmodel (self, "progs/flame2.mdl");
  147.     FireAmbient ();
  148.     makestatic (self);
  149. };
  150.  
  151. /*QUAKED light_flame_small_white (0 1 0) (-10 -10 -40) (10 10 40) START_OFF
  152. Small white flame ball
  153. */
  154. void() light_flame_small_white =
  155. {
  156.     precache_model ("progs/flame2.mdl");
  157.     setmodel (self, "progs/flame2.mdl");
  158.     FireAmbient ();
  159.     makestatic (self);
  160. };
  161.  
  162. //============================================================================
  163.  
  164.  
  165. /*QUAKED misc_fireball (0 .5 .8) (-8 -8 -8) (8 8 8)
  166. Lava Balls
  167. */
  168.  
  169. void() fire_fly;
  170. void() fire_touch;
  171. void() misc_fireball =
  172. {
  173.     
  174.     precache_model ("progs/lavaball.mdl");
  175.     self.classname = "fireball";
  176.     self.nextthink = time + (random() * 5);
  177.     self.think = fire_fly;
  178.     if (!self.speed)
  179.         self.speed == 1000;
  180. };
  181.  
  182. void() fire_fly =
  183. {
  184. local entity    fireball;
  185.  
  186.     fireball = spawn();
  187.     fireball.solid = SOLID_TRIGGER;
  188.     fireball.movetype = MOVETYPE_TOSS;
  189.     fireball.velocity = '0 0 1000';
  190.     fireball.velocity_x = (random() * 100) - 50;
  191.     fireball.velocity_y = (random() * 100) - 50;
  192.     fireball.velocity_z = self.speed + (random() * 200);
  193.     fireball.classname = "fireball";
  194.     setmodel (fireball, "progs/lavaball.mdl");
  195.     setsize (fireball, '0 0 0', '0 0 0');
  196.     setorigin (fireball, self.origin);
  197.     fireball.nextthink = time + 5;
  198.     fireball.think = SUB_Remove;
  199.     fireball.touch = fire_touch;
  200.     
  201.     self.nextthink = time + (random() * 5) + 3;
  202.     self.think = fire_fly;
  203. };
  204.  
  205.  
  206. void() fire_touch =
  207. {
  208.     T_Damage (other, self, self, 20);
  209.     remove(self);
  210. };
  211.  
  212. //============================================================================
  213.  
  214. void() barrel_explode =
  215. {
  216.     self.takedamage = DAMAGE_NO;
  217.     self.classname = "explo_box";
  218.     // did say self.owner
  219.     T_RadiusDamage (self, self, 160, world);
  220.     sound (self, CHAN_VOICE, "weapons/r_exp3.wav", 1, ATTN_NORM);
  221. //        particle (self.origin, '0 0 0', 75, 255);
  222.  
  223. //        self.origin_z = self.origin_z + 0;
  224.     BecomeExplosion ();
  225.         W_FireGrenade2 ();
  226.         W_FireGrenade2 ();
  227.         W_FireGrenade2 ();
  228.         W_FireGrenade2 ();
  229.         W_FireGrenade2 ();
  230.  
  231. };
  232.  
  233.  
  234.  
  235. /*QUAKED misc_explobox (0 .5 .8) (0 0 0) (32 32 64)
  236. TESTING THING
  237. */
  238.  
  239. void() misc_explobox =
  240. {
  241.     local float    oldz;
  242.     
  243.     self.solid = SOLID_BBOX;
  244.     self.movetype = MOVETYPE_NONE;
  245.     precache_model ("maps/b_explob.bsp");
  246.     setmodel (self, "maps/b_explob.bsp");
  247.     precache_sound ("weapons/r_exp3.wav");
  248.     self.health = 20;
  249.     self.th_die = barrel_explode;
  250.     self.takedamage = DAMAGE_AIM;
  251.  
  252.     self.origin_z = self.origin_z + 2;
  253.     oldz = self.origin_z;
  254.     droptofloor();
  255.     if (oldz - self.origin_z > 250)
  256.     {
  257.         dprint ("item fell out of level at ");
  258.         dprint (vtos(self.origin));
  259.         dprint ("\n");
  260.         remove(self);
  261.     }
  262. };
  263.  
  264.  
  265.  
  266.  
  267. /*QUAKED misc_explobox2 (0 .5 .8) (0 0 0) (32 32 64)
  268. Smaller exploding box, REGISTERED ONLY
  269. */
  270.  
  271. void() misc_explobox2 =
  272. {
  273.     local float    oldz;
  274.     
  275.     self.solid = SOLID_BBOX;
  276.     self.movetype = MOVETYPE_NONE;
  277.     precache_model2 ("maps/b_exbox2.bsp");
  278.     setmodel (self, "maps/b_exbox2.bsp");
  279.     precache_sound ("weapons/r_exp3.wav");
  280.     self.health = 20;
  281.     self.th_die = barrel_explode;
  282.     self.takedamage = DAMAGE_AIM;
  283.  
  284.     self.origin_z = self.origin_z + 2;
  285.     oldz = self.origin_z;
  286.     droptofloor();
  287.     if (oldz - self.origin_z > 250)
  288.     {
  289.         dprint ("item fell out of level at ");
  290.         dprint (vtos(self.origin));
  291.         dprint ("\n");
  292.         remove(self);
  293.     }
  294. };
  295.  
  296. //============================================================================
  297.  
  298. float SPAWNFLAG_SUPERSPIKE    = 1;
  299. float SPAWNFLAG_LASER = 2;
  300.  
  301. void(vector org, vector vec) LaunchLaser;
  302.  
  303. void() spikeshooter_use =
  304. {
  305.     if (self.spawnflags & SPAWNFLAG_LASER)
  306.     {
  307.         sound (self, CHAN_VOICE, "enforcer/enfire.wav", 1, ATTN_NORM);
  308.         LaunchLaser (self.origin, self.movedir);
  309.     }
  310.     else
  311.     {
  312.         sound (self, CHAN_VOICE, "weapons/spike2.wav", 1, ATTN_NORM);
  313.         launch_spike (self.origin, self.movedir);
  314.         newmis.velocity = self.movedir * 500;
  315.         if (self.spawnflags & SPAWNFLAG_SUPERSPIKE)
  316.             newmis.touch = superspike_touch;
  317.     }
  318. };
  319.  
  320. void() shooter_think =
  321. {
  322.     spikeshooter_use ();
  323.     self.nextthink = time + self.wait;
  324.     newmis.velocity = self.movedir * 500;
  325. };
  326.  
  327.  
  328. /*QUAKED trap_spikeshooter (0 .5 .8) (-8 -8 -8) (8 8 8) superspike laser
  329. When triggered, fires a spike in the direction set in QuakeEd.
  330. Laser is only for REGISTERED.
  331. */
  332.  
  333. void() trap_spikeshooter =
  334. {
  335.     SetMovedir ();
  336.     self.use = spikeshooter_use;
  337.     if (self.spawnflags & SPAWNFLAG_LASER)
  338.     {
  339.         precache_model2 ("progs/laser.mdl");
  340.         
  341.         precache_sound2 ("enforcer/enfire.wav");
  342.         precache_sound2 ("enforcer/enfstop.wav");
  343.     }
  344.     else
  345.         precache_sound ("weapons/spike2.wav");
  346. };
  347.  
  348.  
  349. /*QUAKED trap_shooter (0 .5 .8) (-8 -8 -8) (8 8 8) superspike laser
  350. Continuously fires spikes.
  351. "wait" time between spike (1.0 default)
  352. "nextthink" delay before firing first spike, so multiple shooters can be stagered.
  353. */
  354. void() trap_shooter =
  355. {
  356.     trap_spikeshooter ();
  357.     
  358.     if (self.wait == 0)
  359.         self.wait = 1;
  360.     self.nextthink = self.nextthink + self.wait + self.ltime;
  361.     self.think = shooter_think;
  362. };
  363.  
  364.  
  365.  
  366. /*
  367. ===============================================================================
  368.  
  369.  
  370. ===============================================================================
  371. */
  372.  
  373.  
  374. void() make_bubbles;
  375. void() bubble_remove;
  376. void() bubble_bob;
  377.  
  378. /*QUAKED air_bubbles (0 .5 .8) (-8 -8 -8) (8 8 8)
  379.  
  380. testing air bubbles
  381. */
  382.  
  383. void() air_bubbles =
  384.  
  385. {
  386.     if (deathmatch)
  387.     {
  388.         remove (self);
  389.         return;
  390.     }
  391.     precache_model ("progs/s_bubble.spr");
  392.     self.nextthink = time + 1;
  393.     self.think = make_bubbles;
  394. };
  395.  
  396. void() make_bubbles =
  397. {
  398. local entity    bubble;
  399.  
  400.     bubble = spawn();
  401.     setmodel (bubble, "progs/s_bubble.spr");
  402.     setorigin (bubble, self.origin);
  403.     bubble.movetype = MOVETYPE_NOCLIP;
  404.     bubble.solid = SOLID_NOT;
  405.     bubble.velocity = '0 0 15';
  406.     bubble.nextthink = time + 0.5;
  407.     bubble.think = bubble_bob;
  408.     bubble.touch = bubble_remove;
  409.     bubble.classname = "bubble";
  410.     bubble.frame = 0;
  411.     bubble.cnt = 0;
  412.     setsize (bubble, '-8 -8 -8', '8 8 8');
  413.     self.nextthink = time + random() + 0.5;
  414.     self.think = make_bubbles;
  415. };
  416.  
  417. void() bubble_split =
  418. {
  419. local entity    bubble;
  420.     bubble = spawn();
  421.     setmodel (bubble, "progs/s_bubble.spr");
  422.     setorigin (bubble, self.origin);
  423.     bubble.movetype = MOVETYPE_NOCLIP;
  424.     bubble.solid = SOLID_NOT;
  425.     bubble.velocity = self.velocity;
  426.     bubble.nextthink = time + 0.5;
  427.     bubble.think = bubble_bob;
  428.     bubble.touch = bubble_remove;
  429.     bubble.classname = "bubble";
  430.     bubble.frame = 1;
  431.     bubble.cnt = 10;
  432.     setsize (bubble, '-8 -8 -8', '8 8 8');
  433.     self.frame = 1;
  434.     self.cnt = 10;
  435.     if (self.waterlevel != 3)
  436.         remove (self);
  437. };
  438.  
  439. void() bubble_remove =
  440. {
  441.     if (other.classname == self.classname)
  442.     {
  443. //        dprint ("bump");
  444.         return;
  445.     }
  446.     remove(self);
  447. };
  448.  
  449. void() bubble_bob =
  450. {
  451. local float        rnd1, rnd2, rnd3;
  452. local vector    vtmp1, modi;
  453.  
  454.     self.cnt = self.cnt + 1;
  455.     if (self.cnt == 4)
  456.         bubble_split();
  457.     if (self.cnt == 20)
  458.         remove(self);
  459.  
  460.     rnd1 = self.velocity_x + (-10 + (random() * 20));
  461.     rnd2 = self.velocity_y + (-10 + (random() * 20));
  462.     rnd3 = self.velocity_z + 10 + random() * 10;
  463.  
  464.     if (rnd1 > 10)
  465.         rnd1 = 5;
  466.     if (rnd1 < -10)
  467.         rnd1 = -5;
  468.         
  469.     if (rnd2 > 10)
  470.         rnd2 = 5;
  471.     if (rnd2 < -10)
  472.         rnd2 = -5;
  473.         
  474.     if (rnd3 < 10)
  475.         rnd3 = 15;
  476.     if (rnd3 > 30)
  477.         rnd3 = 25;
  478.     
  479.     self.velocity_x = rnd1;
  480.     self.velocity_y = rnd2;
  481.     self.velocity_z = rnd3;
  482.         
  483.     self.nextthink = time + 0.5;
  484.     self.think = bubble_bob;
  485. };
  486.  
  487. /*~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>
  488. ~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~*/
  489.  
  490. /*QUAKED viewthing (0 .5 .8) (-8 -8 -8) (8 8 8)
  491.  
  492. Just for the debugging level.  Don't use
  493. */
  494.  
  495. void() viewthing =
  496.  
  497. {
  498.     self.movetype = MOVETYPE_NONE;
  499.     self.solid = SOLID_NOT;
  500.     precache_model ("progs/player.mdl");
  501.     setmodel (self, "progs/player.mdl");
  502. };
  503.  
  504.  
  505. /*
  506. ==============================================================================
  507.  
  508. SIMPLE BMODELS
  509.  
  510. ==============================================================================
  511. */
  512.  
  513. void() func_wall_use =
  514. {    // change to alternate textures
  515.     self.frame = 1 - self.frame;
  516. };
  517.  
  518. /*QUAKED func_wall (0 .5 .8) ?
  519. This is just a solid wall if not inhibitted
  520. */
  521. void() func_wall =
  522. {
  523.     self.angles = '0 0 0';
  524.     self.movetype = MOVETYPE_PUSH;    // so it doesn't get pushed by anything
  525.     self.solid = SOLID_BSP;
  526.     self.use = func_wall_use;
  527.     setmodel (self, self.model);
  528. };
  529.  
  530.  
  531. /*QUAKED func_illusionary (0 .5 .8) ?
  532. A simple entity that looks solid but lets you walk through it.
  533. */
  534. void() func_illusionary =
  535.  
  536. {
  537.     self.angles = '0 0 0';
  538.     self.movetype = MOVETYPE_NONE;
  539.     self.solid = SOLID_NOT;
  540.     setmodel (self, self.model);
  541.     makestatic ();
  542. };
  543.  
  544. /*QUAKED func_episodegate (0 .5 .8) ? E1 E2 E3 E4
  545. This bmodel will appear if the episode has allready been completed, so players can't reenter it.
  546. */
  547. void() func_episodegate =
  548.  
  549. {
  550.     if (!(serverflags & self.spawnflags))
  551.         return;            // can still enter episode
  552.  
  553.     self.angles = '0 0 0';
  554.     self.movetype = MOVETYPE_PUSH;    // so it doesn't get pushed by anything
  555.     self.solid = SOLID_BSP;
  556.     self.use = func_wall_use;
  557.     setmodel (self, self.model);
  558. };
  559.  
  560. /*QUAKED func_bossgate (0 .5 .8) ?
  561. This bmodel appears unless players have all of the episode sigils.
  562. */
  563. void() func_bossgate =
  564.  
  565. {
  566.     if ( (serverflags & 15) == 15)
  567.         return;        // all episodes completed
  568.     self.angles = '0 0 0';
  569.     self.movetype = MOVETYPE_PUSH;    // so it doesn't get pushed by anything
  570.     self.solid = SOLID_BSP;
  571.     self.use = func_wall_use;
  572.     setmodel (self, self.model);
  573. };
  574.  
  575. //============================================================================
  576. /*QUAKED ambient_suck_wind (0.3 0.1 0.6) (-10 -10 -8) (10 10 8)
  577. */
  578. void() ambient_suck_wind =
  579. {
  580.     precache_sound ("ambience/suck1.wav");
  581.     ambientsound (self.origin, "ambience/suck1.wav", 1, ATTN_STATIC);
  582. };
  583.  
  584. /*QUAKED ambient_drone (0.3 0.1 0.6) (-10 -10 -8) (10 10 8)
  585. */
  586. void() ambient_drone =
  587. {
  588.     precache_sound ("ambience/drone6.wav");
  589.     ambientsound (self.origin, "ambience/drone6.wav", 0.5, ATTN_STATIC);
  590. };
  591.  
  592. /*QUAKED ambient_flouro_buzz (0.3 0.1 0.6) (-10 -10 -8) (10 10 8)
  593. */
  594. void() ambient_flouro_buzz =
  595. {
  596.     precache_sound ("ambience/buzz1.wav");
  597.     ambientsound (self.origin, "ambience/buzz1.wav", 1, ATTN_STATIC);
  598. };
  599. /*QUAKED ambient_drip (0.3 0.1 0.6) (-10 -10 -8) (10 10 8)
  600. */
  601. void() ambient_drip =
  602. {
  603.     precache_sound ("ambience/drip1.wav");
  604.     ambientsound (self.origin, "ambience/drip1.wav", 0.5, ATTN_STATIC);
  605. };
  606. /*QUAKED ambient_comp_hum (0.3 0.1 0.6) (-10 -10 -8) (10 10 8)
  607. */
  608. void() ambient_comp_hum =
  609. {
  610.     precache_sound ("ambience/comp1.wav");
  611.     ambientsound (self.origin, "ambience/comp1.wav", 1, ATTN_STATIC);
  612. };
  613. /*QUAKED ambient_thunder (0.3 0.1 0.6) (-10 -10 -8) (10 10 8)
  614. */
  615. void() ambient_thunder =
  616. {
  617.     precache_sound ("ambience/thunder1.wav");
  618.     ambientsound (self.origin, "ambience/thunder1.wav", 0.5, ATTN_STATIC);
  619. };
  620. /*QUAKED ambient_light_buzz (0.3 0.1 0.6) (-10 -10 -8) (10 10 8)
  621. */
  622. void() ambient_light_buzz =
  623. {
  624.     precache_sound ("ambience/fl_hum1.wav");
  625.     ambientsound (self.origin, "ambience/fl_hum1.wav", 0.5, ATTN_STATIC);
  626. };
  627. /*QUAKED ambient_swamp1 (0.3 0.1 0.6) (-10 -10 -8) (10 10 8)
  628. */
  629. void() ambient_swamp1 =
  630. {
  631.     precache_sound ("ambience/swamp1.wav");
  632.     ambientsound (self.origin, "ambience/swamp1.wav", 0.5, ATTN_STATIC);
  633. };
  634. /*QUAKED ambient_swamp2 (0.3 0.1 0.6) (-10 -10 -8) (10 10 8)
  635. */
  636. void() ambient_swamp2 =
  637. {
  638.     precache_sound ("ambience/swamp2.wav");
  639.     ambientsound (self.origin, "ambience/swamp2.wav", 0.5, ATTN_STATIC);
  640. };
  641.  
  642. //============================================================================
  643.  
  644. void() noise_think =
  645. {
  646.     self.nextthink = time + 0.5;
  647.     sound (self, 1, "enforcer/enfire.wav", 1, ATTN_NORM);
  648.     sound (self, 2, "enforcer/enfstop.wav", 1, ATTN_NORM);
  649.     sound (self, 3, "enforcer/sight1.wav", 1, ATTN_NORM);
  650.     sound (self, 4, "enforcer/sight2.wav", 1, ATTN_NORM);
  651.     sound (self, 5, "enforcer/sight3.wav", 1, ATTN_NORM);
  652.     sound (self, 6, "enforcer/sight4.wav", 1, ATTN_NORM);
  653.     sound (self, 7, "enforcer/pain1.wav", 1, ATTN_NORM);
  654. };
  655.  
  656. /*QUAKED misc_noisemaker (1 0.5 0) (-10 -10 -10) (10 10 10)
  657.  
  658. For optimzation testing, starts a lot of sounds.
  659. */
  660.  
  661. void() misc_noisemaker =
  662.  
  663. {
  664.     precache_sound2 ("enforcer/enfire.wav");
  665.     precache_sound2 ("enforcer/enfstop.wav");
  666.     precache_sound2 ("enforcer/sight1.wav");
  667.     precache_sound2 ("enforcer/sight2.wav");
  668.     precache_sound2 ("enforcer/sight3.wav");
  669.     precache_sound2 ("enforcer/sight4.wav");
  670.     precache_sound2 ("enforcer/pain1.wav");
  671.     precache_sound2 ("enforcer/pain2.wav");
  672.     precache_sound2 ("enforcer/death1.wav");
  673.     precache_sound2 ("enforcer/idle1.wav");
  674.  
  675.     self.nextthink = time + 0.1 + random();
  676.     self.think = noise_think;
  677. };
  678.