home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / quake / programs / relwep11 / relwep11.pat < prev    next >
Encoding:
Text File  |  1996-08-17  |  101.8 KB  |  3,322 lines

  1. diff -ur --new-file v101qc/cbnmods.qc progs/cbnmods.qc
  2. --- v101qc/cbnmods.qc    Thu Jan  1 08:00:00 1970
  3. +++ progs/cbnmods.qc    Sun Aug 18 02:16:54 1996
  4. @@ -0,0 +1,184 @@
  5. +/*-------------------------------------------------------------------
  6. +Filename : cbnmods.qc
  7. +Author   : Cameron Newham
  8. +Version  : 1.1
  9. +Date     : 96/08/17
  10. +
  11. +Description
  12. +-----------
  13. +Provides routines specific to my patches.  See the description
  14. +file that came with the archive for further details.
  15. +
  16. +Public Entry Points
  17. +-------------------
  18. +CN_Missile_Bubbles
  19. +CN_Missile_Think
  20. +CN_Ditch_Rockets
  21. +--------------------------------------------------------------------*/
  22. +
  23. +void() bubble_bob;
  24. +void() GrenadeExplode; //Needed for CN_Missile_Think
  25. +void(float num_bubbles) DeathBubbles;
  26. +
  27. +/*-------------------------------------------------------------------
  28. +Slightly modified version of Id's DeathBubblesSpawn
  29. +--------------------------------------------------------------------*/
  30. +void() MissileBubblesSpawn =
  31. +{
  32. +local entity    bubble;
  33. +        bubble = spawn();
  34. +        setmodel (bubble, "progs/s_bubble.spr");
  35. +        setorigin (bubble, self.owner.origin);
  36. +        bubble.movetype = MOVETYPE_NOCLIP;
  37. +        bubble.solid = SOLID_NOT;
  38. +        bubble.velocity = '0 0 15';
  39. +        bubble.nextthink = time + 0.5;
  40. +        bubble.think = bubble_bob;
  41. +        bubble.classname = "bubble";
  42. +        bubble.frame = 0;
  43. +        bubble.cnt = 0;
  44. +        setsize (bubble, '-8 -8 -8', '8 8 8');
  45. +        self.nextthink = time + 0.1;
  46. +        self.think = MissileBubblesSpawn;
  47. +        self.air_finished = self.air_finished + 1;
  48. +        if (self.air_finished >= self.bubble_count)
  49. +                remove(self);
  50. +};
  51. +
  52. +/*---------------------CN_Missile_Bubbles----------------------------
  53. +Makes an underwater entity look like a real underwater entity by
  54. +spraying out bubbles.  This is designed for use with rockets.
  55. +--------------------------------------------------------------------*/
  56. +void(float num_bubbles) CN_Missile_Bubbles =
  57. +{
  58. +  local vector  rocket_origin;
  59. +  local entity  bubble_spawner;
  60. +        
  61. +        //rocket_origin = self.origin + ('0 -50 -50');
  62. +        bubble_spawner = spawn();
  63. +        setorigin (bubble_spawner, self.origin + '0 0 -60');
  64. +        bubble_spawner.movetype = MOVETYPE_NONE;
  65. +        bubble_spawner.solid = SOLID_NOT;
  66. +        bubble_spawner.nextthink = time + 0.1;
  67. +        bubble_spawner.think = MissileBubblesSpawn;
  68. +        bubble_spawner.air_finished = 0;
  69. +        bubble_spawner.owner = self;
  70. +        bubble_spawner.bubble_count = num_bubbles;
  71. +        return;
  72. +};
  73. +
  74. +
  75. +/*----------------------CN_Missile_Think-----------------------------
  76. +Missile Velocity Correction.
  77. +Correct the velocity of spikes, rockets and grenades underwater.  
  78. +Simulates water resistance.  Also calls CN_Missile_Bubbles for rockets
  79. +underwater.  Rockets are slowed in water and speed up again in air,
  80. +while grenades are slowed by each passage through water.
  81. +--------------------------------------------------------------------*/
  82. +void() CN_Missile_Think =
  83. +{
  84. +  local vector v1;
  85. +  local vector v2;
  86. +
  87. +  // if it's a grenade then we must make it explode after
  88. +  // it's duration expires
  89. +
  90. +  if ((self.classname == "grenade") && (time > self.duration))
  91. +  {
  92. +    // this is a grenade and it's past its use-by date
  93. +    self.think = GrenadeExplode;
  94. +    self.nextthink = time + 0.1;
  95. +  }
  96. +  else
  97. +  if (self.duration < time)
  98. +    self.think = SUB_Remove;
  99. +  else
  100. +  {
  101. +    self.nextthink = time + 0.1;
  102. +
  103. +    v1 = self.origin;
  104. +    v2 = v1;
  105. +    traceline (v1, v2, TRUE, self);
  106. +
  107. +    if (trace_inwater == TRUE) 
  108. +    {
  109. +      if ((random() > 0.72) && (self.classname == "rocket"))
  110. +        CN_Missile_Bubbles(1);
  111. +
  112. +      if (self.jump_flag == FALSE)
  113. +      {
  114. +        // correct velocity underwater if not underwater
  115. +        // (jump_flag) already.
  116. +        self.jump_flag = TRUE;  // now in water
  117. +        self.swim_flag = TRUE;  // water->air transition not done
  118. +        self.velocity = self.velocity * 0.4292;
  119. +        self.angles = vectoangles(self.velocity);
  120. +      }
  121. +    }
  122. +    else
  123. +    {
  124. +      // make sure we only do this for 1 water/surf transition
  125. +      if (self.swim_flag == TRUE) 
  126. +      {
  127. +        if (self.classname == "rocket")
  128. +        {
  129. +          // correct velocity out of water for rockets
  130. +          self.velocity = self.velocity * 2.33;
  131. +        }
  132. +        self.jump_flag = FALSE;  //out of water
  133. +        self.swim_flag = FALSE;  //water->air transition finished
  134. +      }
  135. +    }
  136. +  }
  137. +  
  138. +};
  139. +
  140. +/*------------------------CN_Ditch_Rockets---------------------------
  141. +Removes half your rockets, places them in a backpack and ejects
  142. +it to the world.  You'll need this for when you get too many rockets
  143. +and get weighed down.
  144. +--------------------------------------------------------------------*/
  145. +void() CN_Ditch_Rockets =
  146. +{
  147. +        local entity back_pack;
  148. +        local float  num_to_ditch;  
  149. +
  150. +        // if we have none or one then return!
  151. +        if (self.ammo_rockets < 2)
  152. +          return;
  153. +
  154. +        // spawn a backpack
  155. +        back_pack = spawn();
  156. +
  157. +        // calculate number to ditch and set appropriate amounts
  158. +        // for entity and backpack
  159. +        num_to_ditch = self.ammo_rockets / 2;
  160. +        num_to_ditch = floor(num_to_ditch);
  161. +        back_pack.ammo_rockets = num_to_ditch;
  162. +        self.ammo_rockets = self.ammo_rockets - num_to_ditch;
  163. +
  164. +
  165. +        back_pack.owner = self;
  166. +        makevectors(self.v_angle);
  167. +        setorigin(back_pack, self.origin + '0 0 45');
  168. +        back_pack.velocity = aim(self, 1000);
  169. +        back_pack.velocity_x = back_pack.velocity_x * -340;
  170. +        back_pack.velocity_y = back_pack.velocity_y * -340;
  171. +        back_pack.velocity_z = back_pack.velocity_z * 380;
  172. +        back_pack.angles = vectoangles(back_pack.velocity);
  173. +        back_pack.flags = FL_ITEM;
  174. +        back_pack.solid = SOLID_TRIGGER;
  175. +        back_pack.movetype = MOVETYPE_TOSS;
  176. +        back_pack.nextthink = time + 0.2;
  177. +
  178. +        setmodel (back_pack, "progs/backpack.mdl");
  179. +        setsize(back_pack, '-16 -16 0', '16 16 56');
  180. +        back_pack.touch = BackpackTouch;
  181. +        back_pack.nextthink = time + 120;    // remove pack after 120 secs
  182. +        back_pack.think = SUB_Remove;
  183. +
  184. +        sprint(self, "Dumped Rockets\n");
  185. +
  186. +        W_SetCurrentAmmo();
  187. +};
  188. +
  189. diff -ur --new-file v101qc/client.qc progs/client.qc
  190. --- v101qc/client.qc    Sun Aug 18 02:29:36 1996
  191. +++ progs/client.qc    Sat Aug 17 21:35:52 1996
  192. @@ -7,7 +7,7 @@
  193.  void (vector org) spawn_tfog;
  194.  void (vector org, entity death_owner) spawn_tdeath;
  195.  
  196. -float    modelindex_eyes, modelindex_player;
  197. +float   modelindex_eyes, modelindex_player;
  198.  
  199.  /*
  200.  =============================================================================
  201. @@ -17,8 +17,8 @@
  202.  =============================================================================
  203.  */
  204.  
  205. -float    intermission_running;
  206. -float    intermission_exittime;
  207. +float   intermission_running;
  208. +float   intermission_exittime;
  209.  
  210.  /*QUAKED info_intermission (1 0.5 0.5) (-16 -16 -16) (16 16 16)
  211.  This is the camera point for the intermission.
  212. @@ -73,7 +73,7 @@
  213.      if (serverflags)
  214.      {
  215.          if (world.model == "maps/start.bsp")
  216. -            SetNewParms ();        // take away all stuff on starting new episode
  217. +            SetNewParms ();         // take away all stuff on starting new episode
  218.      }
  219.      
  220.      self.items = parm1;
  221. @@ -96,13 +96,13 @@
  222.  */
  223.  entity() FindIntermission =
  224.  {
  225. -    local    entity spot;
  226. -    local    float cyc;
  227. +    local   entity spot;
  228. +    local   float cyc;
  229.  
  230.  // look for info_intermission first
  231.      spot = find (world, classname, "info_intermission");
  232.      if (spot)
  233. -    {    // pick a random one
  234. +    {       // pick a random one
  235.          cyc = random() * 4;
  236.          while (cyc > 1)
  237.          {
  238. @@ -131,7 +131,7 @@
  239.  string nextmap;
  240.  void() GotoNextMap =
  241.  {
  242. -    if (cvar("samelevel"))    // if samelevel is set, stay on same level
  243. +    if (cvar("samelevel"))  // if samelevel is set, stay on same level
  244.          changelevel (mapname);
  245.      else
  246.          changelevel (nextmap);
  247. @@ -209,7 +209,7 @@
  248.      if (intermission_running == 3)
  249.      {
  250.          if (!cvar("registered"))
  251. -        {    // shareware episode has been completed, go to sell screen
  252. +        {       // shareware episode has been completed, go to sell screen
  253.              WriteByte (MSG_ALL, SVC_SELLSCREEN);
  254.              return;
  255.          }
  256. @@ -246,7 +246,7 @@
  257.  
  258.  void() execute_changelevel =
  259.  {
  260. -    local entity    pos;
  261. +    local entity    pos;
  262.  
  263.      intermission_running = 1;
  264.      
  265. @@ -267,7 +267,7 @@
  266.      {
  267.          other.view_ofs = '0 0 0';
  268.          other.angles = other.v_angle = pos.mangle;
  269. -        other.fixangle = TRUE;        // turn this way immediately
  270. +        other.fixangle = TRUE;          // turn this way immediately
  271.          other.nextthink = time + 0.5;
  272.          other.takedamage = DAMAGE_NO;
  273.          other.solid = SOLID_NOT;
  274. @@ -275,7 +275,7 @@
  275.          other.modelindex = 0;
  276.          setorigin (other, pos.origin);
  277.          other = find (other, classname, "player");
  278. -    }    
  279. +    }       
  280.  
  281.      WriteByte (MSG_ALL, SVC_INTERMISSION);
  282.  };
  283. @@ -283,7 +283,7 @@
  284.  
  285.  void() changelevel_touch =
  286.  {
  287. -    local entity    pos;
  288. +    local entity    pos;
  289.  
  290.      if (other.classname != "player")
  291.          return;
  292. @@ -301,7 +301,7 @@
  293.      SUB_UseTargets ();
  294.  
  295.      if ( (self.spawnflags & 1) && (deathmatch == 0) )
  296. -    {    // NO_INTERMISSION
  297. +    {       // NO_INTERMISSION
  298.          GotoNextMap();
  299.          return;
  300.      }
  301. @@ -346,7 +346,7 @@
  302.          CopyToBodyQue (self);
  303.          // get the spawn parms as they were at level start
  304.          setspawnparms (self);
  305. -        // respawn        
  306. +        // respawn              
  307.          PutClientInServer ();
  308.      }
  309.      else if (deathmatch)
  310. @@ -355,11 +355,11 @@
  311.          CopyToBodyQue (self);
  312.          // set default spawn parms
  313.          SetNewParms ();
  314. -        // respawn        
  315. +        // respawn              
  316.          PutClientInServer ();
  317.      }
  318.      else
  319. -    {    // restart the entire server
  320. +    {       // restart the entire server
  321.          localcmd ("restart\n");
  322.      }
  323.  };
  324. @@ -378,7 +378,7 @@
  325.      bprint (" suicides\n");
  326.      set_suicide_frame ();
  327.      self.modelindex = modelindex_player;
  328. -    self.frags = self.frags - 2;    // extra penalty
  329. +    self.frags = self.frags - 2;    // extra penalty
  330.      respawn ();
  331.  };
  332.  
  333. @@ -396,7 +396,7 @@
  334.  */
  335.  entity() SelectSpawnPoint =
  336.  {
  337. -    local    entity spot;
  338. +    local   entity spot;
  339.      
  340.  // testinfo_player_start is only found in regioned levels
  341.      spot = find (world, classname, "testplayerstart");
  342. @@ -422,7 +422,7 @@
  343.      }
  344.  
  345.      if (serverflags)
  346. -    {    // return with a rune to start
  347. +    {       // return with a rune to start
  348.          spot = find (world, classname, "info_player_start2");
  349.          if (spot)
  350.              return spot;
  351. @@ -448,7 +448,7 @@
  352.  
  353.  void() PutClientInServer =
  354.  {
  355. -    local    entity spot;
  356. +    local   entity spot;
  357.  
  358.      self.classname = "player";
  359.      self.health = 100;
  360. @@ -459,7 +459,7 @@
  361.      self.max_health = 100;
  362.      self.flags = FL_CLIENT;
  363.      self.air_finished = time + 12;
  364. -    self.dmg = 2;           // initial water damage
  365. +    self.dmg = 2;                   // initial water damage
  366.      self.super_damage_finished = 0;
  367.      self.radsuit_finished = 0;
  368.      self.invisible_finished = 0;
  369. @@ -467,6 +467,26 @@
  370.      self.effects = 0;
  371.      self.invincible_time = 0;
  372.  
  373. +// CN_PATCH - Aug 96: unreliable weapons code
  374. +    self.use_counter_shot = 0;
  375. +    self.use_last_shot = 0;
  376. +    self.use_av_shot = 0;
  377. +    self.jammed_shot = 0;
  378. +    self.use_counter_rocket = 0;
  379. +    self.use_last_rocket = 0;
  380. +    self.use_av_rocket = 0;
  381. +    self.jammed_rocket = 0;
  382. +    self.use_counter_gl = 0;
  383. +    self.use_last_gl = 0;
  384. +    self.use_av_gl = 0;
  385. +    self.jammed_gl = 0;
  386. +    self.use_counter_ss = 0;
  387. +    self.use_last_ss = 0;
  388. +    self.use_av_ss = 0;
  389. +    self.jammed_ss = 0;
  390. +    self.jammed_death = 0;
  391. +//END CN_PATCH
  392. +
  393.      DecodeLevelParms ();
  394.      
  395.      W_SetCurrentAmmo ();
  396. @@ -483,7 +503,7 @@
  397.  
  398.      self.origin = spot.origin + '0 0 1';
  399.      self.angles = spot.angles;
  400. -    self.fixangle = TRUE;        // turn this way immediately
  401. +    self.fixangle = TRUE;           // turn this way immediately
  402.  
  403.  // oh, this is a hack!
  404.      setmodel (self, "progs/eyes.mdl");
  405. @@ -581,7 +601,7 @@
  406.  
  407.  void() DumpScore =
  408.  {
  409. -    local entity    e, sort, walk;
  410. +    local entity    e, sort, walk;
  411.  
  412.      if (world.chain)
  413.          error ("DumpScore: world.chain is set");
  414. @@ -629,7 +649,7 @@
  415.  
  416.  // print the list
  417.      
  418. -    bprint ("\n");    
  419. +    bprint ("\n");  
  420.      while (sort)
  421.      {
  422.          PrintClientScore (sort);
  423. @@ -648,7 +668,7 @@
  424.  // find a trigger changelevel
  425.      o = find(world, classname, "trigger_changelevel");
  426.      if (!o || mapname == "start")
  427. -    {    // go back to same map if no trigger_changelevel
  428. +    {       // go back to same map if no trigger_changelevel
  429.          o = spawn();
  430.          o.map = mapname;
  431.      }
  432. @@ -671,10 +691,10 @@
  433.  */
  434.  void() CheckRules =
  435.  {
  436. -    local    float        timelimit;
  437. -    local    float        fraglimit;
  438. +    local   float           timelimit;
  439. +    local   float           fraglimit;
  440.      
  441. -    if (gameover)    // someone else quit the game already
  442. +    if (gameover)   // someone else quit the game already
  443.          return;
  444.          
  445.      timelimit = cvar("timelimit") * 60;
  446. @@ -708,15 +728,15 @@
  447.          localcmd ("killserver\n");
  448.  */
  449.          return;
  450. -    }    
  451. +    }       
  452.  };
  453.  
  454.  //============================================================================
  455.  
  456.  void() PlayerDeathThink =
  457.  {
  458. -    local entity    old_self;
  459. -    local float        forward;
  460. +    local entity    old_self;
  461. +    local float             forward;
  462.  
  463.      if ((self.flags & FL_ONGROUND))
  464.      {
  465. @@ -724,7 +744,7 @@
  466.          forward = forward - 20;
  467.          if (forward <= 0)
  468.              self.velocity = '0 0 0';
  469. -        else    
  470. +        else    
  471.              self.velocity = forward * normalize(self.velocity);
  472.      }
  473.  
  474. @@ -781,11 +801,11 @@
  475.          return;
  476.  
  477.      if ( !(self.flags & FL_JUMPRELEASED) )
  478. -        return;        // don't pogo stick
  479. +        return;         // don't pogo stick
  480.  
  481.      self.flags = self.flags - (self.flags & FL_JUMPRELEASED);
  482.  
  483. -    self.flags = self.flags - FL_ONGROUND;    // don't stairwalk
  484. +    self.flags = self.flags - FL_ONGROUND;  // don't stairwalk
  485.      
  486.      self.button2 = 0;
  487.  // player jumping sound
  488. @@ -800,7 +820,7 @@
  489.  
  490.  ============
  491.  */
  492. -.float    dmgtime;
  493. +.float  dmgtime;
  494.  
  495.  void() WaterMove =
  496.  {
  497. @@ -820,7 +840,7 @@
  498.          self.dmg = 2;
  499.      }
  500.      else if (self.air_finished < time)
  501. -    {    // drown!
  502. +    {       // drown!
  503.          if (self.pain_finished < time)
  504.          {
  505.              self.dmg = self.dmg + 2;
  506. @@ -834,7 +854,7 @@
  507.      if (!self.waterlevel)
  508.      {
  509.          if (self.flags & FL_INWATER)
  510. -        {    
  511. +        {       
  512.              // play leave water sound
  513.              sound (self, CHAN_BODY, "misc/outwater.wav", 1, ATTN_NORM);
  514.              self.flags = self.flags - FL_INWATER;
  515. @@ -843,7 +863,7 @@
  516.      }
  517.  
  518.      if (self.watertype == CONTENT_LAVA)
  519. -    {    // do damage
  520. +    {       // do damage
  521.          if (self.dmgtime < time)
  522.          {
  523.              if (self.radsuit_finished > time)
  524. @@ -855,7 +875,7 @@
  525.          }
  526.      }
  527.      else if (self.watertype == CONTENT_SLIME)
  528. -    {    // do damage
  529. +    {       // do damage
  530.          if (self.dmgtime < time && self.radsuit_finished < time)
  531.          {
  532.              self.dmgtime = time + 1;
  533. @@ -864,7 +884,7 @@
  534.      }
  535.      
  536.      if ( !(self.flags & FL_INWATER) )
  537. -    {    
  538. +    {       
  539.  
  540.  // player enter water sound
  541.  
  542. @@ -896,17 +916,17 @@
  543.      end = start + v_forward*24;
  544.      traceline (start, end, TRUE, self);
  545.      if (trace_fraction < 1)
  546. -    {    // solid at waist
  547. +    {       // solid at waist
  548.          start_z = start_z + self.maxs_z - 8;
  549.          end = start + v_forward*24;
  550.          self.movedir = trace_plane_normal * -50;
  551.          traceline (start, end, TRUE, self);
  552.          if (trace_fraction == 1)
  553. -        {    // open at eye level
  554. +        {       // open at eye level
  555.              self.flags = self.flags | FL_WATERJUMP;
  556.              self.velocity_z = 225;
  557.              self.flags = self.flags - (self.flags & FL_JUMPRELEASED);
  558. -            self.teleport_time = time + 2;    // safety net
  559. +            self.teleport_time = time + 2;  // safety net
  560.              return;
  561.          }
  562.      }
  563. @@ -922,19 +942,43 @@
  564.  */
  565.  void() PlayerPreThink =
  566.  {
  567. -    local    float    mspeed, aspeed;
  568. -    local    float    r;
  569. +    local   float   mspeed, aspeed;
  570. +    local   float   r;
  571. +    local   float   c_ashley;  // a fat person
  572. +    local   string  fs;
  573.  
  574.      if (intermission_running)
  575.      {
  576. -        IntermissionThink ();    // otherwise a button could be missed between
  577. -        return;                    // the think tics
  578. +        IntermissionThink ();   // otherwise a button could be missed between
  579. +        return;                                 // the think tics
  580.      }
  581.  
  582.      if (self.view_ofs == '0 0 0')
  583. -        return;        // intermission or finale
  584. +        return;         // intermission or finale
  585. +
  586. +//CN_PATCH - Aug 96: Calculate restricted movement by weight of rockets
  587. +//                    and increased movement by health++
  588. +
  589. +    c_ashley = 0.5 + ((100 - self.ammo_rockets) * 0.005);
  590. +
  591. +    //Now check for health > 100 and give slight speed advantage
  592. +    if (self.health > 100)
  593. +    {
  594. +      c_ashley = c_ashley + ((self.health - 100) * 0.002);
  595. +      if (c_ashley > 1.0)
  596. +        c_ashley = 1.0;  //Normalise to 1 maximum
  597. +    }
  598. +
  599. +    self.velocity_x = self.velocity_x *  c_ashley;
  600. +    self.velocity_y = self.velocity_y *  c_ashley;
  601.  
  602. -    makevectors (self.v_angle);        // is this still used
  603. +    // don't fall down slower than normal
  604. +    if (self.velocity_z > 0)
  605. +      self.velocity_z = self.velocity_z *  c_ashley;
  606. +    self.avelocity = vectoangles(self.velocity);
  607. +//END CN_PATCH
  608. +
  609. +    makevectors (self.v_angle);             // is this still used
  610.  
  611.      CheckRules ();
  612.      WaterMove ();
  613. @@ -949,7 +993,7 @@
  614.      }
  615.      
  616.      if (self.deadflag == DEAD_DYING)
  617. -        return;    // dying, so do nothing
  618. +        return; // dying, so do nothing
  619.  
  620.      if (self.button2)
  621.      {
  622. @@ -958,7 +1002,7 @@
  623.      else
  624.          self.flags = self.flags | FL_JUMPRELEASED;
  625.  
  626. -// teleporters can force a non-moving pause time    
  627. +// teleporters can force a non-moving pause time        
  628.      if (time < self.pausetime)
  629.          self.velocity = '0 0 0';
  630.  };
  631. @@ -1004,7 +1048,7 @@
  632.          }
  633.  
  634.          if (self.invisible_finished < time)
  635. -        {    // just stopped
  636. +        {       // just stopped
  637.              self.items = self.items - IT_INVISIBILITY;
  638.              self.invisible_finished = 0;
  639.              self.invisible_time = 0;
  640. @@ -1015,7 +1059,7 @@
  641.          self.modelindex = modelindex_eyes;
  642.      }
  643.      else
  644. -        self.modelindex = modelindex_player;    // don't use eyes
  645. +        self.modelindex = modelindex_player;    // don't use eyes
  646.  
  647.  // invincibility
  648.      if (self.invincible_finished)
  649. @@ -1039,7 +1083,7 @@
  650.          }
  651.          
  652.          if (self.invincible_finished < time)
  653. -        {    // just stopped
  654. +        {       // just stopped
  655.              self.items = self.items - IT_INVULNERABILITY;
  656.              self.invincible_time = 0;
  657.              self.invincible_finished = 0;
  658. @@ -1064,7 +1108,7 @@
  659.                  stuffcmd (self, "bf\n");
  660.                  sound (self, CHAN_AUTO, "items/damage2.wav", 1, ATTN_NORM);
  661.                  self.super_time = time + 1;
  662. -            }      
  663. +            }         
  664.              
  665.              if (self.super_time < time)
  666.              {
  667. @@ -1074,7 +1118,7 @@
  668.          }
  669.  
  670.          if (self.super_damage_finished < time)
  671. -        {    // just stopped
  672. +        {       // just stopped
  673.              self.items = self.items - IT_QUAD;
  674.              self.super_damage_finished = 0;
  675.              self.super_time = 0;
  676. @@ -1083,12 +1127,12 @@
  677.              self.effects = self.effects | EF_DIMLIGHT;
  678.          else
  679.              self.effects = self.effects - (self.effects & EF_DIMLIGHT);
  680. -    }    
  681. +    }       
  682.  
  683. -// suit    
  684. +// suit 
  685.      if (self.radsuit_finished)
  686.      {
  687. -        self.air_finished = time + 12;        // don't drown
  688. +        self.air_finished = time + 12;          // don't drown
  689.  
  690.  // sound and screen flash when items starts to run out
  691.          if (self.radsuit_finished < time + 3)
  692. @@ -1109,12 +1153,12 @@
  693.          }
  694.  
  695.          if (self.radsuit_finished < time)
  696. -        {    // just stopped
  697. +        {       // just stopped
  698.              self.items = self.items - IT_SUIT;
  699.              self.rad_time = 0;
  700.              self.radsuit_finished = 0;
  701.          }
  702. -    }    
  703. +    }       
  704.  
  705.  };
  706.  
  707. @@ -1128,11 +1172,11 @@
  708.  */
  709.  void() PlayerPostThink =
  710.  {
  711. -    local    float    mspeed, aspeed;
  712. -    local    float    r;
  713. +    local   float   mspeed, aspeed;
  714. +    local   float   r;
  715.  
  716.      if (self.view_ofs == '0 0 0')
  717. -        return;        // intermission or finale
  718. +        return;         // intermission or finale
  719.      if (self.deadflag)
  720.          return;
  721.          
  722. @@ -1140,7 +1184,7 @@
  723.  
  724.      W_WeaponFrame ();
  725.  
  726. -// check to see if player landed and play landing sound    
  727. +// check to see if player landed and play landing sound 
  728.      if ((self.jump_flag < -300) && (self.flags & FL_ONGROUND) && (self.health > 0))
  729.      {
  730.          if (self.watertype == CONTENT_WATER)
  731. @@ -1173,6 +1217,7 @@
  732.  */
  733.  void() ClientConnect =
  734.  {
  735. +sprint (self, "Real Weapons Installed\n");
  736.      bprint (self.netname);
  737.      bprint (" entered the game\n");
  738.      
  739. @@ -1214,8 +1259,8 @@
  740.  */
  741.  void(entity targ, entity attacker) ClientObituary =
  742.  {
  743. -    local    float rnum;
  744. -    local    string deathstring, deathstring2;
  745. +    local   float rnum;
  746. +    local   string deathstring, deathstring2;
  747.      rnum = random();
  748.  
  749.      if (targ.classname == "player")
  750. @@ -1255,9 +1300,17 @@
  751.                      return;
  752.                  }
  753.                  if (targ.weapon == 16)
  754. +                  if (targ.jammed_death == 0)
  755.                      bprint (" tries to put the pin back in\n");
  756. +                  else
  757. +                    bprint ("'s Grenade Launcher explodes!\n");
  758.                  else if (rnum)
  759. +                {
  760. +                  if (targ.jammed_death == 0)
  761.                      bprint (" becomes bored with life\n");
  762. +                  else
  763. +                    bprint ("'s Rocket Launcher explodes!\n");
  764. +                }
  765.                  else
  766.                      bprint (" checks if his weapon is loaded\n");
  767.                  return;
  768. @@ -1329,7 +1382,7 @@
  769.          }
  770.          else
  771.          {
  772. -            targ.frags = targ.frags - 1;        // killed self
  773. +            targ.frags = targ.frags - 1;            // killed self
  774.              rnum = targ.watertype;
  775.  
  776.              bprint (targ.netname);
  777. @@ -1356,10 +1409,14 @@
  778.                      bprint (" burst into flames\n");
  779.                      return;
  780.                  }
  781. -                if (random() < 0.5)
  782. +                if (random() < 0.2)
  783. +                  if (random() < 0.6)
  784.                      bprint (" turned into hot slag\n");
  785. -                else
  786. +                  else
  787.                      bprint (" visits the Volcano God\n");
  788. +                else
  789. +                  bprint (" goes for a dip in the lava!\n");
  790. +
  791.                  return;
  792.              }
  793.  
  794. @@ -1406,7 +1463,7 @@
  795.                  return;
  796.              }
  797.              if (attacker.solid == SOLID_BSP && attacker != world)
  798. -            {    
  799. +            {       
  800.                  bprint (" was squished\n");
  801.                  return;
  802.              }
  803. diff -ur --new-file v101qc/defs.qc progs/defs.qc
  804. --- v101qc/defs.qc    Sun Aug 18 02:29:36 1996
  805. +++ progs/defs.qc    Sat Aug 17 21:54:02 1996
  806. @@ -10,13 +10,13 @@
  807.  //
  808.  // system globals
  809.  //
  810. -entity        self;
  811. -entity        other;
  812. -entity        world;
  813. -float        time;
  814. -float        frametime;
  815. +entity          self;
  816. +entity          other;
  817. +entity          world;
  818. +float           time;
  819. +float           frametime;
  820.  
  821. -float        force_retouch;        // force all entities to touch triggers
  822. +float           force_retouch;          // force all entities to touch triggers
  823.                                  // next frame.  this is needed because
  824.                                  // non-moving things don't normally scan
  825.                                  // for triggers, and when a trigger is
  826. @@ -24,69 +24,69 @@
  827.                                  // needs to catch everything.
  828.                                  // decremented each frame, so set to 2
  829.                                  // to guarantee everything is touched
  830. -string        mapname;
  831. +string          mapname;
  832.  
  833. -float        deathmatch;
  834. -float        coop;
  835. -float        teamplay;
  836. +float           deathmatch;
  837. +float           coop;
  838. +float           teamplay;
  839.  
  840. -float        serverflags;        // propagated from level to level, used to
  841. +float           serverflags;            // propagated from level to level, used to
  842.                                  // keep track of completed episodes
  843.  
  844. -float        total_secrets;
  845. -float        total_monsters;
  846. +float           total_secrets;
  847. +float           total_monsters;
  848.  
  849. -float        found_secrets;        // number of secrets found
  850. -float        killed_monsters;    // number of monsters killed
  851. +float           found_secrets;          // number of secrets found
  852. +float           killed_monsters;        // number of monsters killed
  853.  
  854.  
  855.  // spawnparms are used to encode information about clients across server
  856.  // level changes
  857. -float        parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
  858. +float           parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
  859.  
  860.  //
  861.  // global variables set by built in functions
  862. -//    
  863. -vector        v_forward, v_up, v_right;    // set by makevectors()
  864. +//      
  865. +vector          v_forward, v_up, v_right;       // set by makevectors()
  866.      
  867.  // set by traceline / tracebox
  868. -float        trace_allsolid;
  869. -float        trace_startsolid;
  870. -float        trace_fraction;
  871. -vector        trace_endpos;
  872. -vector        trace_plane_normal;
  873. -float        trace_plane_dist;
  874. -entity        trace_ent;
  875. -float        trace_inopen;
  876. -float        trace_inwater;
  877. +float           trace_allsolid;
  878. +float           trace_startsolid;
  879. +float           trace_fraction;
  880. +vector          trace_endpos;
  881. +vector          trace_plane_normal;
  882. +float           trace_plane_dist;
  883. +entity          trace_ent;
  884. +float           trace_inopen;
  885. +float           trace_inwater;
  886.  
  887. -entity        msg_entity;                // destination of single entity writes
  888. +entity          msg_entity;                             // destination of single entity writes
  889.  
  890.  //
  891.  // required prog functions
  892.  //
  893. -void()         main;                        // only for testing
  894. +void()          main;                                           // only for testing
  895.  
  896. -void()        StartFrame;
  897. +void()          StartFrame;
  898.  
  899. -void()         PlayerPreThink;
  900. -void()         PlayerPostThink;
  901. +void()          PlayerPreThink;
  902. +void()          PlayerPostThink;
  903.  
  904. -void()        ClientKill;
  905. -void()        ClientConnect;
  906. -void()         PutClientInServer;        // call after setting the parm1... parms
  907. -void()        ClientDisconnect;
  908. +void()          ClientKill;
  909. +void()          ClientConnect;
  910. +void()          PutClientInServer;              // call after setting the parm1... parms
  911. +void()          ClientDisconnect;
  912.  
  913. -void()        SetNewParms;            // called when a client first connects to
  914. +void()          SetNewParms;                    // called when a client first connects to
  915.                                      // a server. sets parms so they can be
  916.                                      // saved off for restarts
  917.  
  918. -void()        SetChangeParms;            // call to set parms for self so they can
  919. +void()          SetChangeParms;                 // call to set parms for self so they can
  920.                                      // be saved for a level transition
  921.  
  922.  
  923.  //================================================
  924. -void        end_sys_globals;        // flag for structure dumping
  925. +void            end_sys_globals;                // flag for structure dumping
  926.  //================================================
  927.  
  928.  /*
  929. @@ -100,115 +100,115 @@
  930.  //
  931.  // system fields (*** = do not set in prog code, maintained by C code)
  932.  //
  933. -.float        modelindex;        // *** model index in the precached list
  934. -.vector        absmin, absmax;    // *** origin + mins / maxs
  935. +.float          modelindex;             // *** model index in the precached list
  936. +.vector         absmin, absmax; // *** origin + mins / maxs
  937.  
  938. -.float        ltime;            // local time for entity
  939. -.float        movetype;
  940. -.float        solid;
  941. -
  942. -.vector        origin;            // ***
  943. -.vector        oldorigin;        // ***
  944. -.vector        velocity;
  945. -.vector        angles;
  946. -.vector        avelocity;
  947. -
  948. -.vector        punchangle;        // temp angle adjust from damage or recoil
  949. -
  950. -.string        classname;        // spawn function
  951. -.string        model;
  952. -.float        frame;
  953. -.float        skin;
  954. -.float        effects;
  955. -
  956. -.vector        mins, maxs;        // bounding box extents reletive to origin
  957. -.vector        size;            // maxs - mins
  958. -
  959. -.void()        touch;
  960. -.void()        use;
  961. -.void()        think;
  962. -.void()        blocked;        // for doors or plats, called when can't push other
  963. +.float          ltime;                  // local time for entity
  964. +.float          movetype;
  965. +.float          solid;
  966. +
  967. +.vector         origin;                 // ***
  968. +.vector         oldorigin;              // ***
  969. +.vector         velocity;
  970. +.vector         angles;
  971. +.vector         avelocity;
  972. +
  973. +.vector         punchangle;             // temp angle adjust from damage or recoil
  974. +
  975. +.string         classname;              // spawn function
  976. +.string         model;
  977. +.float          frame;
  978. +.float          skin;
  979. +.float          effects;
  980. +
  981. +.vector         mins, maxs;             // bounding box extents reletive to origin
  982. +.vector         size;                   // maxs - mins
  983. +
  984. +.void()         touch;
  985. +.void()         use;
  986. +.void()         think;
  987. +.void()         blocked;                // for doors or plats, called when can't push other
  988.  
  989. -.float        nextthink;
  990. -.entity        groundentity;
  991. +.float          nextthink;
  992. +.entity         groundentity;
  993.  
  994.  // stats
  995. -.float        health;
  996. -.float        frags;
  997. -.float        weapon;            // one of the IT_SHOTGUN, etc flags
  998. -.string        weaponmodel;
  999. -.float        weaponframe;
  1000. -.float        currentammo;
  1001. -.float        ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  1002. +.float          health;
  1003. +.float          frags;
  1004. +.float          weapon;                 // one of the IT_SHOTGUN, etc flags
  1005. +.string         weaponmodel;
  1006. +.float          weaponframe;
  1007. +.float          currentammo;
  1008. +.float          ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  1009.  
  1010. -.float        items;            // bit flags
  1011. +.float          items;                  // bit flags
  1012.  
  1013. -.float        takedamage;
  1014. -.entity        chain;
  1015. -.float        deadflag;
  1016. +.float          takedamage;
  1017. +.entity         chain;
  1018. +.float          deadflag;
  1019.  
  1020. -.vector        view_ofs;            // add to origin to get eye point
  1021. +.vector         view_ofs;                       // add to origin to get eye point
  1022.  
  1023.  
  1024. -.float        button0;        // fire
  1025. -.float        button1;        // use
  1026. -.float        button2;        // jump
  1027. +.float          button0;                // fire
  1028. +.float          button1;                // use
  1029. +.float          button2;                // jump
  1030.  
  1031. -.float        impulse;        // weapon changes
  1032. +.float          impulse;                // weapon changes
  1033.  
  1034. -.float        fixangle;
  1035. -.vector        v_angle;        // view / targeting angle for players
  1036. -.float        idealpitch;        // calculated pitch angle for lookup up slopes
  1037. +.float          fixangle;
  1038. +.vector         v_angle;                // view / targeting angle for players
  1039. +.float          idealpitch;             // calculated pitch angle for lookup up slopes
  1040.  
  1041.  
  1042. -.string        netname;
  1043. +.string         netname;
  1044.  
  1045. -.entity     enemy;
  1046. +.entity         enemy;
  1047.  
  1048. -.float        flags;
  1049. +.float          flags;
  1050.  
  1051. -.float        colormap;
  1052. -.float        team;
  1053. +.float          colormap;
  1054. +.float          team;
  1055.  
  1056. -.float        max_health;        // players maximum health is stored here
  1057. +.float          max_health;             // players maximum health is stored here
  1058.  
  1059. -.float        teleport_time;    // don't back up
  1060. +.float          teleport_time;  // don't back up
  1061.  
  1062. -.float        armortype;        // save this fraction of incoming damage
  1063. -.float        armorvalue;
  1064. +.float          armortype;              // save this fraction of incoming damage
  1065. +.float          armorvalue;
  1066.  
  1067. -.float        waterlevel;        // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
  1068. -.float        watertype;        // a contents value
  1069. +.float          waterlevel;             // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
  1070. +.float          watertype;              // a contents value
  1071.  
  1072. -.float        ideal_yaw;
  1073. -.float        yaw_speed;
  1074. +.float          ideal_yaw;
  1075. +.float          yaw_speed;
  1076.  
  1077. -.entity        aiment;
  1078. +.entity         aiment;
  1079.  
  1080. -.entity     goalentity;        // a movetarget or an enemy
  1081. +.entity         goalentity;             // a movetarget or an enemy
  1082.  
  1083. -.float        spawnflags;
  1084. +.float          spawnflags;
  1085.  
  1086. -.string        target;
  1087. -.string        targetname;
  1088. +.string         target;
  1089. +.string         targetname;
  1090.  
  1091.  // damage is accumulated through a frame. and sent as one single
  1092.  // message, so the super shotgun doesn't generate huge messages
  1093. -.float        dmg_take;
  1094. -.float        dmg_save;
  1095. -.entity        dmg_inflictor;
  1096. +.float          dmg_take;
  1097. +.float          dmg_save;
  1098. +.entity         dmg_inflictor;
  1099.  
  1100. -.entity        owner;        // who launched a missile
  1101. -.vector        movedir;    // mostly for doors, but also used for waterjump
  1102. +.entity         owner;          // who launched a missile
  1103. +.vector         movedir;        // mostly for doors, but also used for waterjump
  1104.  
  1105. -.string        message;        // trigger messages
  1106. +.string         message;                // trigger messages
  1107.  
  1108. -.float        sounds;        // either a cd track number or sound number
  1109. +.float          sounds;         // either a cd track number or sound number
  1110.  
  1111. -.string        noise, noise1, noise2, noise3;    // contains names of wavs to play
  1112. +.string         noise, noise1, noise2, noise3;  // contains names of wavs to play
  1113.  
  1114.  //================================================
  1115. -void        end_sys_fields;            // flag for structure dumping
  1116. +void            end_sys_fields;                 // flag for structure dumping
  1117.  //================================================
  1118.  
  1119.  /*
  1120. @@ -224,330 +224,351 @@
  1121.  // constants
  1122.  //
  1123.  
  1124. -float    FALSE                    = 0;
  1125. -float     TRUE                    = 1;
  1126. +float   FALSE                                   = 0;
  1127. +float   TRUE                                    = 1;
  1128.  
  1129.  // edict.flags
  1130. -float    FL_FLY                    = 1;
  1131. -float    FL_SWIM                    = 2;
  1132. -float    FL_CLIENT                = 8;    // set for all client edicts
  1133. -float    FL_INWATER                = 16;    // for enter / leave water splash
  1134. -float    FL_MONSTER                = 32;
  1135. -float    FL_GODMODE                = 64;    // player cheat
  1136. -float    FL_NOTARGET                = 128;    // player cheat
  1137. -float    FL_ITEM                    = 256;    // extra wide size for bonus items
  1138. -float    FL_ONGROUND                = 512;    // standing on something
  1139. -float    FL_PARTIALGROUND        = 1024;    // not all corners are valid
  1140. -float    FL_WATERJUMP            = 2048;    // player jumping out of water
  1141. -float    FL_JUMPRELEASED            = 4096;    // for jump debouncing
  1142. +float   FL_FLY                                  = 1;
  1143. +float   FL_SWIM                                 = 2;
  1144. +float   FL_CLIENT                               = 8;    // set for all client edicts
  1145. +float   FL_INWATER                              = 16;   // for enter / leave water splash
  1146. +float   FL_MONSTER                              = 32;
  1147. +float   FL_GODMODE                              = 64;   // player cheat
  1148. +float   FL_NOTARGET                             = 128;  // player cheat
  1149. +float   FL_ITEM                                 = 256;  // extra wide size for bonus items
  1150. +float   FL_ONGROUND                             = 512;  // standing on something
  1151. +float   FL_PARTIALGROUND                = 1024; // not all corners are valid
  1152. +float   FL_WATERJUMP                    = 2048; // player jumping out of water
  1153. +float   FL_JUMPRELEASED                 = 4096; // for jump debouncing
  1154.  
  1155.  // edict.movetype values
  1156. -float    MOVETYPE_NONE            = 0;    // never moves
  1157. -//float    MOVETYPE_ANGLENOCLIP    = 1;
  1158. -//float    MOVETYPE_ANGLECLIP        = 2;
  1159. -float    MOVETYPE_WALK            = 3;    // players only
  1160. -float    MOVETYPE_STEP            = 4;    // discrete, not real time unless fall
  1161. -float    MOVETYPE_FLY            = 5;
  1162. -float    MOVETYPE_TOSS            = 6;    // gravity
  1163. -float    MOVETYPE_PUSH            = 7;    // no clip to world, push and crush
  1164. -float    MOVETYPE_NOCLIP            = 8;
  1165. -float    MOVETYPE_FLYMISSILE        = 9;    // fly with extra size against monsters
  1166. -float    MOVETYPE_BOUNCE            = 10;
  1167. -float    MOVETYPE_BOUNCEMISSILE    = 11;    // bounce with extra size
  1168. +float   MOVETYPE_NONE                   = 0;    // never moves
  1169. +//float MOVETYPE_ANGLENOCLIP    = 1;
  1170. +//float MOVETYPE_ANGLECLIP              = 2;
  1171. +float   MOVETYPE_WALK                   = 3;    // players only
  1172. +float   MOVETYPE_STEP                   = 4;    // discrete, not real time unless fall
  1173. +float   MOVETYPE_FLY                    = 5;
  1174. +float   MOVETYPE_TOSS                   = 6;    // gravity
  1175. +float   MOVETYPE_PUSH                   = 7;    // no clip to world, push and crush
  1176. +float   MOVETYPE_NOCLIP                 = 8;
  1177. +float   MOVETYPE_FLYMISSILE             = 9;    // fly with extra size against monsters
  1178. +float   MOVETYPE_BOUNCE                 = 10;
  1179. +float   MOVETYPE_BOUNCEMISSILE  = 11;   // bounce with extra size
  1180.  
  1181.  // edict.solid values
  1182. -float    SOLID_NOT                = 0;    // no interaction with other objects
  1183. -float    SOLID_TRIGGER            = 1;    // touch on edge, but not blocking
  1184. -float    SOLID_BBOX                = 2;    // touch on edge, block
  1185. -float    SOLID_SLIDEBOX            = 3;    // touch on edge, but not an onground
  1186. -float    SOLID_BSP                = 4;    // bsp clip, touch on edge, block
  1187. +float   SOLID_NOT                               = 0;    // no interaction with other objects
  1188. +float   SOLID_TRIGGER                   = 1;    // touch on edge, but not blocking
  1189. +float   SOLID_BBOX                              = 2;    // touch on edge, block
  1190. +float   SOLID_SLIDEBOX                  = 3;    // touch on edge, but not an onground
  1191. +float   SOLID_BSP                               = 4;    // bsp clip, touch on edge, block
  1192.  
  1193.  // range values
  1194. -float    RANGE_MELEE                = 0;
  1195. -float    RANGE_NEAR                = 1;
  1196. -float    RANGE_MID                = 2;
  1197. -float    RANGE_FAR                = 3;
  1198. +float   RANGE_MELEE                             = 0;
  1199. +float   RANGE_NEAR                              = 1;
  1200. +float   RANGE_MID                               = 2;
  1201. +float   RANGE_FAR                               = 3;
  1202.  
  1203.  // deadflag values
  1204.  
  1205. -float    DEAD_NO                    = 0;
  1206. -float    DEAD_DYING                = 1;
  1207. -float    DEAD_DEAD                = 2;
  1208. -float    DEAD_RESPAWNABLE        = 3;
  1209. +float   DEAD_NO                                 = 0;
  1210. +float   DEAD_DYING                              = 1;
  1211. +float   DEAD_DEAD                               = 2;
  1212. +float   DEAD_RESPAWNABLE                = 3;
  1213.  
  1214.  // takedamage values
  1215.  
  1216. -float    DAMAGE_NO                = 0;
  1217. -float    DAMAGE_YES                = 1;
  1218. -float    DAMAGE_AIM                = 2;
  1219. +float   DAMAGE_NO                               = 0;
  1220. +float   DAMAGE_YES                              = 1;
  1221. +float   DAMAGE_AIM                              = 2;
  1222.  
  1223.  // items
  1224. -float    IT_AXE                    = 4096;
  1225. -float    IT_SHOTGUN                = 1;
  1226. -float    IT_SUPER_SHOTGUN        = 2;
  1227. -float    IT_NAILGUN                = 4;
  1228. -float    IT_SUPER_NAILGUN        = 8;
  1229. -float    IT_GRENADE_LAUNCHER        = 16;
  1230. -float    IT_ROCKET_LAUNCHER        = 32;
  1231. -float    IT_LIGHTNING            = 64;
  1232. -float    IT_EXTRA_WEAPON            = 128;
  1233. -
  1234. -float    IT_SHELLS                = 256;
  1235. -float    IT_NAILS                = 512;
  1236. -float    IT_ROCKETS                = 1024;
  1237. -float    IT_CELLS                = 2048;
  1238. -
  1239. -float    IT_ARMOR1                = 8192;
  1240. -float    IT_ARMOR2                = 16384;
  1241. -float    IT_ARMOR3                = 32768;
  1242. -float    IT_SUPERHEALTH            = 65536;
  1243. -
  1244. -float    IT_KEY1                    = 131072;
  1245. -float    IT_KEY2                    = 262144;
  1246. -
  1247. -float    IT_INVISIBILITY            = 524288;
  1248. -float    IT_INVULNERABILITY        = 1048576;
  1249. -float    IT_SUIT                    = 2097152;
  1250. -float    IT_QUAD                    = 4194304;
  1251. +float   IT_AXE                                  = 4096;
  1252. +float   IT_SHOTGUN                              = 1;
  1253. +float   IT_SUPER_SHOTGUN                = 2;
  1254. +float   IT_NAILGUN                              = 4;
  1255. +float   IT_SUPER_NAILGUN                = 8;
  1256. +float   IT_GRENADE_LAUNCHER             = 16;
  1257. +float   IT_ROCKET_LAUNCHER              = 32;
  1258. +float   IT_LIGHTNING                    = 64;
  1259. +float   IT_EXTRA_WEAPON                 = 128;
  1260. +
  1261. +float   IT_SHELLS                               = 256;
  1262. +float   IT_NAILS                                = 512;
  1263. +float   IT_ROCKETS                              = 1024;
  1264. +float   IT_CELLS                                = 2048;
  1265. +
  1266. +float   IT_ARMOR1                               = 8192;
  1267. +float   IT_ARMOR2                               = 16384;
  1268. +float   IT_ARMOR3                               = 32768;
  1269. +float   IT_SUPERHEALTH                  = 65536;
  1270. +
  1271. +float   IT_KEY1                                 = 131072;
  1272. +float   IT_KEY2                                 = 262144;
  1273. +
  1274. +float   IT_INVISIBILITY                 = 524288;
  1275. +float   IT_INVULNERABILITY              = 1048576;
  1276. +float   IT_SUIT                                 = 2097152;
  1277. +float   IT_QUAD                                 = 4194304;
  1278.  
  1279.  // point content values
  1280.  
  1281. -float    CONTENT_EMPTY            = -1;
  1282. -float    CONTENT_SOLID            = -2;
  1283. -float    CONTENT_WATER            = -3;
  1284. -float    CONTENT_SLIME            = -4;
  1285. -float    CONTENT_LAVA            = -5;
  1286. -float    CONTENT_SKY                = -6;
  1287. -
  1288. -float    STATE_TOP        = 0;
  1289. -float    STATE_BOTTOM    = 1;
  1290. -float    STATE_UP        = 2;
  1291. -float    STATE_DOWN        = 3;
  1292. -
  1293. -vector    VEC_ORIGIN = '0 0 0';
  1294. -vector    VEC_HULL_MIN = '-16 -16 -24';
  1295. -vector    VEC_HULL_MAX = '16 16 32';
  1296. +float   CONTENT_EMPTY                   = -1;
  1297. +float   CONTENT_SOLID                   = -2;
  1298. +float   CONTENT_WATER                   = -3;
  1299. +float   CONTENT_SLIME                   = -4;
  1300. +float   CONTENT_LAVA                    = -5;
  1301. +float   CONTENT_SKY                             = -6;
  1302. +
  1303. +float   STATE_TOP               = 0;
  1304. +float   STATE_BOTTOM    = 1;
  1305. +float   STATE_UP                = 2;
  1306. +float   STATE_DOWN              = 3;
  1307. +
  1308. +vector  VEC_ORIGIN = '0 0 0';
  1309. +vector  VEC_HULL_MIN = '-16 -16 -24';
  1310. +vector  VEC_HULL_MAX = '16 16 32';
  1311.  
  1312. -vector    VEC_HULL2_MIN = '-32 -32 -24';
  1313. -vector    VEC_HULL2_MAX = '32 32 64';
  1314. +vector  VEC_HULL2_MIN = '-32 -32 -24';
  1315. +vector  VEC_HULL2_MAX = '32 32 64';
  1316.  
  1317.  // protocol bytes
  1318. -float    SVC_TEMPENTITY        = 23;
  1319. -float    SVC_KILLEDMONSTER    = 27;
  1320. -float    SVC_FOUNDSECRET        = 28;
  1321. -float    SVC_INTERMISSION    = 30;
  1322. -float    SVC_FINALE            = 31;
  1323. -float    SVC_CDTRACK            = 32;
  1324. -float    SVC_SELLSCREEN        = 33;
  1325. -
  1326. -
  1327. -float    TE_SPIKE        = 0;
  1328. -float    TE_SUPERSPIKE    = 1;
  1329. -float    TE_GUNSHOT        = 2;
  1330. -float    TE_EXPLOSION    = 3;
  1331. -float    TE_TAREXPLOSION    = 4;
  1332. -float    TE_LIGHTNING1    = 5;
  1333. -float    TE_LIGHTNING2    = 6;
  1334. -float    TE_WIZSPIKE        = 7;
  1335. -float    TE_KNIGHTSPIKE    = 8;
  1336. -float    TE_LIGHTNING3    = 9;
  1337. -float    TE_LAVASPLASH    = 10;
  1338. -float    TE_TELEPORT        = 11;
  1339. +float   SVC_TEMPENTITY          = 23;
  1340. +float   SVC_KILLEDMONSTER       = 27;
  1341. +float   SVC_FOUNDSECRET         = 28;
  1342. +float   SVC_INTERMISSION        = 30;
  1343. +float   SVC_FINALE                      = 31;
  1344. +float   SVC_CDTRACK                     = 32;
  1345. +float   SVC_SELLSCREEN          = 33;
  1346. +
  1347. +
  1348. +float   TE_SPIKE                = 0;
  1349. +float   TE_SUPERSPIKE   = 1;
  1350. +float   TE_GUNSHOT              = 2;
  1351. +float   TE_EXPLOSION    = 3;
  1352. +float   TE_TAREXPLOSION = 4;
  1353. +float   TE_LIGHTNING1   = 5;
  1354. +float   TE_LIGHTNING2   = 6;
  1355. +float   TE_WIZSPIKE             = 7;
  1356. +float   TE_KNIGHTSPIKE  = 8;
  1357. +float   TE_LIGHTNING3   = 9;
  1358. +float   TE_LAVASPLASH   = 10;
  1359. +float   TE_TELEPORT             = 11;
  1360.  
  1361.  // sound channels
  1362.  // channel 0 never willingly overrides
  1363.  // other channels (1-7) allways override a playing sound on that channel
  1364. -float    CHAN_AUTO        = 0;
  1365. -float    CHAN_WEAPON        = 1;
  1366. -float    CHAN_VOICE        = 2;
  1367. -float    CHAN_ITEM        = 3;
  1368. -float    CHAN_BODY        = 4;
  1369. -
  1370. -float    ATTN_NONE        = 0;
  1371. -float    ATTN_NORM        = 1;
  1372. -float    ATTN_IDLE        = 2;
  1373. -float    ATTN_STATIC        = 3;
  1374. +float   CHAN_AUTO               = 0;
  1375. +float   CHAN_WEAPON             = 1;
  1376. +float   CHAN_VOICE              = 2;
  1377. +float   CHAN_ITEM               = 3;
  1378. +float   CHAN_BODY               = 4;
  1379. +
  1380. +float   ATTN_NONE               = 0;
  1381. +float   ATTN_NORM               = 1;
  1382. +float   ATTN_IDLE               = 2;
  1383. +float   ATTN_STATIC             = 3;
  1384.  
  1385.  // update types
  1386.  
  1387. -float    UPDATE_GENERAL    = 0;
  1388. -float    UPDATE_STATIC    = 1;
  1389. -float    UPDATE_BINARY    = 2;
  1390. -float    UPDATE_TEMP        = 3;
  1391. +float   UPDATE_GENERAL  = 0;
  1392. +float   UPDATE_STATIC   = 1;
  1393. +float   UPDATE_BINARY   = 2;
  1394. +float   UPDATE_TEMP             = 3;
  1395.  
  1396.  // entity effects
  1397.  
  1398. -float    EF_BRIGHTFIELD    = 1;
  1399. -float    EF_MUZZLEFLASH     = 2;
  1400. -float    EF_BRIGHTLIGHT     = 4;
  1401. -float    EF_DIMLIGHT     = 8;
  1402. +float   EF_BRIGHTFIELD  = 1;
  1403. +float   EF_MUZZLEFLASH  = 2;
  1404. +float   EF_BRIGHTLIGHT  = 4;
  1405. +float   EF_DIMLIGHT     = 8;
  1406.  
  1407.  
  1408.  // messages
  1409. -float    MSG_BROADCAST    = 0;        // unreliable to all
  1410. -float    MSG_ONE            = 1;        // reliable to one (msg_entity)
  1411. -float    MSG_ALL            = 2;        // reliable to all
  1412. -float    MSG_INIT        = 3;        // write to the init string
  1413. +float   MSG_BROADCAST   = 0;            // unreliable to all
  1414. +float   MSG_ONE                 = 1;            // reliable to one (msg_entity)
  1415. +float   MSG_ALL                 = 2;            // reliable to all
  1416. +float   MSG_INIT                = 3;            // write to the init string
  1417.  
  1418.  //================================================
  1419.  
  1420.  //
  1421.  // globals
  1422.  //
  1423. -float    movedist;
  1424. -float    gameover;        // set when a rule exits
  1425. +float   movedist;
  1426. +float   gameover;               // set when a rule exits
  1427.  
  1428. -string    string_null;    // null string, nothing should be held here
  1429. -float    empty_float;
  1430. +string  string_null;    // null string, nothing should be held here
  1431. +float   empty_float;
  1432.  
  1433. -entity    newmis;            // launch_spike sets this after spawning it
  1434. +entity  newmis;                 // launch_spike sets this after spawning it
  1435.  
  1436. -entity    activator;        // the entity that activated a trigger or brush
  1437. +entity  activator;              // the entity that activated a trigger or brush
  1438.  
  1439. -entity    damage_attacker;    // set by T_Damage
  1440. -float    framecount;
  1441. +entity  damage_attacker;        // set by T_Damage
  1442. +float   framecount;
  1443.  
  1444. -float        skill;
  1445. +float           skill;
  1446.  
  1447.  //================================================
  1448.  
  1449.  //
  1450.  // world fields (FIXME: make globals)
  1451.  //
  1452. -.string        wad;
  1453. -.string     map;
  1454. -.float        worldtype;    // 0=medieval 1=metal 2=base
  1455. +.string         wad;
  1456. +.string         map;
  1457. +.float          worldtype;      // 0=medieval 1=metal 2=base
  1458.  
  1459.  //================================================
  1460.  
  1461. -.string        killtarget;
  1462. +.string         killtarget;
  1463.  
  1464.  //
  1465.  // quakeed fields
  1466.  //
  1467. -.float        light_lev;        // not used by game, but parsed by light util
  1468. -.float        style;
  1469. +.float          light_lev;              // not used by game, but parsed by light util
  1470. +.float          style;
  1471.  
  1472.  
  1473.  //
  1474.  // monster ai
  1475.  //
  1476. -.void()        th_stand;
  1477. -.void()        th_walk;
  1478. -.void()        th_run;
  1479. -.void()        th_missile;
  1480. -.void()        th_melee;
  1481. -.void(entity attacker, float damage)        th_pain;
  1482. -.void()        th_die;
  1483. -
  1484. -.entity        oldenemy;        // mad at this player before taking damage
  1485. -
  1486. -.float        speed;
  1487. -
  1488. -.float    lefty;
  1489. -
  1490. -.float    search_time;
  1491. -.float    attack_state;
  1492. -
  1493. -float    AS_STRAIGHT        = 1;
  1494. -float    AS_SLIDING        = 2;
  1495. -float    AS_MELEE        = 3;
  1496. -float    AS_MISSILE        = 4;
  1497. +.void()         th_stand;
  1498. +.void()         th_walk;
  1499. +.void()         th_run;
  1500. +.void()         th_missile;
  1501. +.void()         th_melee;
  1502. +.void(entity attacker, float damage)            th_pain;
  1503. +.void()         th_die;
  1504. +
  1505. +.entity         oldenemy;               // mad at this player before taking damage
  1506. +
  1507. +.float          speed;
  1508. +
  1509. +.float  lefty;
  1510. +
  1511. +.float  search_time;
  1512. +.float  attack_state;
  1513. +
  1514. +float   AS_STRAIGHT             = 1;
  1515. +float   AS_SLIDING              = 2;
  1516. +float   AS_MELEE                = 3;
  1517. +float   AS_MISSILE              = 4;
  1518.  
  1519.  //
  1520.  // player only fields
  1521.  //
  1522. -.float        walkframe;
  1523. +.float          walkframe;
  1524.  
  1525. -.float         attack_finished;
  1526. -.float        pain_finished;
  1527. +.float          attack_finished;
  1528. +.float          pain_finished;
  1529.  
  1530. -.float        invincible_finished;
  1531. -.float        invisible_finished;
  1532. -.float        super_damage_finished;
  1533. -.float        radsuit_finished;
  1534. +//CN_PATCH - Cameron Newham, Aug 96
  1535. +.float          duration;  // duration of rocket existance
  1536. +.float          use_counter_shot;  //should really collapse these into one set
  1537. +.float          use_av_shot;
  1538. +.float          use_last_shot;
  1539. +.float          jammed_shot;
  1540. +.float          use_counter_rocket;
  1541. +.float          use_av_rocket;
  1542. +.float          use_last_rocket;
  1543. +.float          jammed_rocket;
  1544. +.float          use_counter_gl;
  1545. +.float          use_av_gl;
  1546. +.float          use_last_gl;
  1547. +.float          jammed_gl;
  1548. +.float          use_counter_ss;
  1549. +.float          use_av_ss;
  1550. +.float          use_last_ss;
  1551. +.float          jammed_ss;
  1552. +.float          jammed_death; //0 = none  1 = gl  2 = rl
  1553. +//END CN_PATCH
  1554. +
  1555. +.float          invincible_finished;
  1556. +.float          invisible_finished;
  1557. +.float          super_damage_finished;
  1558. +.float          radsuit_finished;
  1559. +
  1560. +.float          invincible_time, invincible_sound;
  1561. +.float          invisible_time, invisible_sound;
  1562. +.float          super_time, super_sound;
  1563. +.float          rad_time;
  1564. +.float          fly_sound;
  1565.  
  1566. -.float        invincible_time, invincible_sound;
  1567. -.float        invisible_time, invisible_sound;
  1568. -.float        super_time, super_sound;
  1569. -.float        rad_time;
  1570. -.float        fly_sound;
  1571. +.float          axhitme;
  1572.  
  1573. -.float        axhitme;
  1574. -
  1575. -.float        show_hostile;    // set to time+0.2 whenever a client fires a
  1576. +.float          show_hostile;   // set to time+0.2 whenever a client fires a
  1577.                              // weapon or takes damage.  Used to alert
  1578.                              // monsters that otherwise would let the player go
  1579. -.float        jump_flag;        // player jump flag
  1580. -.float        swim_flag;        // player swimming sound flag
  1581. -.float        air_finished;    // when time > air_finished, start drowning
  1582. -.float        bubble_count;    // keeps track of the number of bubbles
  1583. -.string        deathtype;        // keeps track of how the player died
  1584. +.float          jump_flag;              // player jump flag
  1585. +.float          swim_flag;              // player swimming sound flag
  1586. +.float          air_finished;   // when time > air_finished, start drowning
  1587. +.float          bubble_count;   // keeps track of the number of bubbles
  1588. +.string         deathtype;              // keeps track of how the player died
  1589.  
  1590.  //
  1591.  // object stuff
  1592.  //
  1593. -.string        mdl;
  1594. -.vector        mangle;            // angle at start
  1595. +.string         mdl;
  1596. +.vector         mangle;                 // angle at start
  1597.  
  1598. -.vector        oldorigin;        // only used by secret door
  1599. +.vector         oldorigin;              // only used by secret door
  1600.  
  1601. -.float        t_length, t_width;
  1602. +.float          t_length, t_width;
  1603.  
  1604.  
  1605.  //
  1606.  // doors, etc
  1607.  //
  1608. -.vector        dest, dest1, dest2;
  1609. -.float        wait;            // time from firing to restarting
  1610. -.float        delay;            // time from activation to firing
  1611. -.entity        trigger_field;    // door's trigger entity
  1612. -.string        noise4;
  1613. +.vector         dest, dest1, dest2;
  1614. +.float          wait;                   // time from firing to restarting
  1615. +.float          delay;                  // time from activation to firing
  1616. +.entity         trigger_field;  // door's trigger entity
  1617. +.string         noise4;
  1618.  
  1619.  //
  1620.  // monsters
  1621.  //
  1622. -.float         pausetime;
  1623. -.entity     movetarget;
  1624. +.float          pausetime;
  1625. +.entity         movetarget;
  1626.  
  1627.  
  1628.  //
  1629.  // doors
  1630.  //
  1631. -.float        aflag;
  1632. -.float        dmg;            // damage done by door when hit
  1633. +.float          aflag;
  1634. +.float          dmg;                    // damage done by door when hit
  1635.      
  1636.  //
  1637.  // misc
  1638.  //
  1639. -.float        cnt;             // misc flag
  1640. +.float          cnt;                    // misc flag
  1641.      
  1642.  //
  1643.  // subs
  1644.  //
  1645. -.void()        think1;
  1646. -.vector        finaldest, finalangle;
  1647. +.void()         think1;
  1648. +.vector         finaldest, finalangle;
  1649.  
  1650.  //
  1651.  // triggers
  1652.  //
  1653. -.float        count;            // for counting triggers
  1654. +.float          count;                  // for counting triggers
  1655.  
  1656.  
  1657.  //
  1658.  // plats / doors / buttons
  1659.  //
  1660. -.float        lip;
  1661. -.float        state;
  1662. -.vector        pos1, pos2;        // top and bottom positions
  1663. -.float        height;
  1664. +.float          lip;
  1665. +.float          state;
  1666. +.vector         pos1, pos2;             // top and bottom positions
  1667. +.float          height;
  1668.  
  1669.  //
  1670.  // sounds
  1671.  //
  1672. -.float        waitmin, waitmax;
  1673. -.float        distance;
  1674. -.float        volume;
  1675. +.float          waitmin, waitmax;
  1676. +.float          distance;
  1677. +.float          volume;
  1678.  
  1679.  
  1680.  
  1681. @@ -559,110 +580,110 @@
  1682.  // builtin functions
  1683.  //
  1684.  
  1685. -void(vector ang)    makevectors        = #1;        // sets v_forward, etc globals
  1686. -void(entity e, vector o) setorigin    = #2;
  1687. -void(entity e, string m) setmodel    = #3;        // set movetype and solid first
  1688. +void(vector ang)        makevectors             = #1;           // sets v_forward, etc globals
  1689. +void(entity e, vector o) setorigin      = #2;
  1690. +void(entity e, string m) setmodel       = #3;           // set movetype and solid first
  1691.  void(entity e, vector min, vector max) setsize = #4;
  1692.  // #5 was removed
  1693. -void() break                        = #6;
  1694. -float() random                        = #7;        // returns 0 - 1
  1695. +void() break                                            = #6;
  1696. +float() random                                          = #7;           // returns 0 - 1
  1697.  void(entity e, float chan, string samp, float vol, float atten) sound = #8;
  1698. -vector(vector v) normalize            = #9;
  1699. -void(string e) error                = #10;
  1700. -void(string e) objerror                = #11;
  1701. -float(vector v) vlen                = #12;
  1702. -float(vector v) vectoyaw            = #13;
  1703. -entity() spawn                        = #14;
  1704. -void(entity e) remove                = #15;
  1705. +vector(vector v) normalize                      = #9;
  1706. +void(string e) error                            = #10;
  1707. +void(string e) objerror                         = #11;
  1708. +float(vector v) vlen                            = #12;
  1709. +float(vector v) vectoyaw                        = #13;
  1710. +entity() spawn                                          = #14;
  1711. +void(entity e) remove                           = #15;
  1712.  
  1713.  // sets trace_* globals
  1714.  // nomonsters can be:
  1715.  // An entity will also be ignored for testing if forent == test,
  1716.  // forent->owner == test, or test->owner == forent
  1717.  // a forent of world is ignored
  1718. -void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;    
  1719. +void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;    
  1720.  
  1721. -entity() checkclient                = #17;    // returns a client to look for
  1722. +entity() checkclient                            = #17;  // returns a client to look for
  1723.  entity(entity start, .string fld, string match) find = #18;
  1724. -string(string s) precache_sound        = #19;
  1725. -string(string s) precache_model        = #20;
  1726. +string(string s) precache_sound         = #19;
  1727. +string(string s) precache_model         = #20;
  1728.  void(entity client, string s)stuffcmd = #21;
  1729.  entity(vector org, float rad) findradius = #22;
  1730. -void(string s) bprint                = #23;
  1731. +void(string s) bprint                           = #23;
  1732.  void(entity client, string s) sprint = #24;
  1733. -void(string s) dprint                = #25;
  1734. -string(float f) ftos                = #26;
  1735. -string(vector v) vtos                = #27;
  1736. -void() coredump                        = #28;        // prints all edicts
  1737. -void() traceon                        = #29;        // turns statment trace on
  1738. -void() traceoff                        = #30;
  1739. -void(entity e) eprint                = #31;        // prints an entire edict
  1740. -float(float yaw, float dist) walkmove    = #32;    // returns TRUE or FALSE
  1741. +void(string s) dprint                           = #25;
  1742. +string(float f) ftos                            = #26;
  1743. +string(vector v) vtos                           = #27;
  1744. +void() coredump                                         = #28;          // prints all edicts
  1745. +void() traceon                                          = #29;          // turns statment trace on
  1746. +void() traceoff                                         = #30;
  1747. +void(entity e) eprint                           = #31;          // prints an entire edict
  1748. +float(float yaw, float dist) walkmove   = #32;  // returns TRUE or FALSE
  1749.  // #33 was removed
  1750. -float(float yaw, float dist) droptofloor= #34;    // TRUE if landed on floor
  1751. +float(float yaw, float dist) droptofloor= #34;  // TRUE if landed on floor
  1752.  void(float style, string value) lightstyle = #35;
  1753. -float(float v) rint                    = #36;        // round to nearest int
  1754. -float(float v) floor                = #37;        // largest integer <= v
  1755. -float(float v) ceil                    = #38;        // smallest integer >= v
  1756. +float(float v) rint                                     = #36;          // round to nearest int
  1757. +float(float v) floor                            = #37;          // largest integer <= v
  1758. +float(float v) ceil                                     = #38;          // smallest integer >= v
  1759.  // #39 was removed
  1760. -float(entity e) checkbottom            = #40;        // true if self is on ground
  1761. -float(vector v) pointcontents        = #41;        // returns a CONTENT_*
  1762. +float(entity e) checkbottom                     = #40;          // true if self is on ground
  1763. +float(vector v) pointcontents           = #41;          // returns a CONTENT_*
  1764.  // #42 was removed
  1765.  float(float f) fabs = #43;
  1766. -vector(entity e, float speed) aim = #44;        // returns the shooting vector
  1767. -float(string s) cvar = #45;                        // return cvar.value
  1768. -void(string s) localcmd = #46;                    // put string into local que
  1769. -entity(entity e) nextent = #47;                    // for looping through all ents
  1770. +vector(entity e, float speed) aim = #44;                // returns the shooting vector
  1771. +float(string s) cvar = #45;                                             // return cvar.value
  1772. +void(string s) localcmd = #46;                                  // put string into local que
  1773. +entity(entity e) nextent = #47;                                 // for looping through all ents
  1774.  void(vector o, vector d, float color, float count) particle = #48;// start a particle effect
  1775. -void() ChangeYaw = #49;                        // turn towards self.ideal_yaw
  1776. +void() ChangeYaw = #49;                                         // turn towards self.ideal_yaw
  1777.                                              // at self.yaw_speed
  1778.  // #50 was removed
  1779. -vector(vector v) vectoangles            = #51;
  1780. +vector(vector v) vectoangles                    = #51;
  1781.  
  1782.  //
  1783.  // direct client message generation
  1784.  //
  1785. -void(float to, float f) WriteByte        = #52;
  1786. -void(float to, float f) WriteChar        = #53;
  1787. -void(float to, float f) WriteShort        = #54;
  1788. -void(float to, float f) WriteLong        = #55;
  1789. -void(float to, float f) WriteCoord        = #56;
  1790. -void(float to, float f) WriteAngle        = #57;
  1791. -void(float to, string s) WriteString    = #58;
  1792. -void(float to, entity s) WriteEntity    = #59;
  1793. +void(float to, float f) WriteByte               = #52;
  1794. +void(float to, float f) WriteChar               = #53;
  1795. +void(float to, float f) WriteShort              = #54;
  1796. +void(float to, float f) WriteLong               = #55;
  1797. +void(float to, float f) WriteCoord              = #56;
  1798. +void(float to, float f) WriteAngle              = #57;
  1799. +void(float to, string s) WriteString    = #58;
  1800. +void(float to, entity s) WriteEntity    = #59;
  1801.  
  1802.  //
  1803.  // broadcast client message generation
  1804.  //
  1805.  
  1806. -// void(float f) bWriteByte        = #59;
  1807. -// void(float f) bWriteChar        = #60;
  1808. -// void(float f) bWriteShort        = #61;
  1809. -// void(float f) bWriteLong        = #62;
  1810. -// void(float f) bWriteCoord        = #63;
  1811. -// void(float f) bWriteAngle        = #64;
  1812. -// void(string s) bWriteString    = #65;
  1813. +// void(float f) bWriteByte             = #59;
  1814. +// void(float f) bWriteChar             = #60;
  1815. +// void(float f) bWriteShort            = #61;
  1816. +// void(float f) bWriteLong             = #62;
  1817. +// void(float f) bWriteCoord            = #63;
  1818. +// void(float f) bWriteAngle            = #64;
  1819. +// void(string s) bWriteString  = #65;
  1820.  // void(entity e) bWriteEntity = #66;
  1821.  
  1822. -void(float step) movetogoal                = #67;
  1823. +void(float step) movetogoal                             = #67;
  1824.  
  1825. -string(string s) precache_file        = #68;    // no effect except for -copy
  1826. -void(entity e) makestatic        = #69;
  1827. +string(string s) precache_file          = #68;  // no effect except for -copy
  1828. +void(entity e) makestatic               = #69;
  1829.  void(string s) changelevel = #70;
  1830.  
  1831.  //#71 was removed
  1832.  
  1833. -void(string var, string val) cvar_set = #72;    // sets cvar.value
  1834. +void(string var, string val) cvar_set = #72;    // sets cvar.value
  1835.  
  1836. -void(entity client, string s) centerprint = #73;    // sprint, but in middle
  1837. +void(entity client, string s) centerprint = #73;        // sprint, but in middle
  1838.  
  1839.  void(vector pos, string samp, float vol, float atten) ambientsound = #74;
  1840.  
  1841. -string(string s) precache_model2    = #75;        // registered version only
  1842. -string(string s) precache_sound2    = #76;        // registered version only
  1843. -string(string s) precache_file2        = #77;        // registered version only
  1844. +string(string s) precache_model2        = #75;          // registered version only
  1845. +string(string s) precache_sound2        = #76;          // registered version only
  1846. +string(string s) precache_file2         = #77;          // registered version only
  1847.  
  1848. -void(entity e) setspawnparms        = #78;        // set parm1... to the
  1849. +void(entity e) setspawnparms            = #78;          // set parm1... to the
  1850.                                                  // values at level start
  1851.                                                  // for coop respawn
  1852.  
  1853. @@ -681,7 +702,7 @@
  1854.  void() SUB_Remove;
  1855.  
  1856.  //
  1857. -//    combat.qc
  1858. +//      combat.qc
  1859.  //
  1860.  void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
  1861.  
  1862. diff -ur --new-file v101qc/player.qc progs/player.qc
  1863. --- v101qc/player.qc    Sun Aug 18 02:29:36 1996
  1864. +++ progs/player.qc    Wed Aug 14 19:00:08 1996
  1865. @@ -11,7 +11,7 @@
  1866.  
  1867.  $cd /raid/quake/id1/models/player_4
  1868.  $origin 0 -6 24
  1869. -$base base        
  1870. +$base base              
  1871.  $skin skin
  1872.  
  1873.  //
  1874. @@ -88,7 +88,7 @@
  1875.  
  1876.  void() player_run;
  1877.  
  1878. -void()    player_stand1 =[    $axstnd1,    player_stand1    ]
  1879. +void()  player_stand1 =[        $axstnd1,       player_stand1   ]
  1880.  {
  1881.      self.weaponframe=0;
  1882.      if (self.velocity_x || self.velocity_y)
  1883. @@ -110,10 +110,10 @@
  1884.              self.walkframe = 0;
  1885.          self.frame = $stand1 + self.walkframe;
  1886.      }
  1887. -    self.walkframe = self.walkframe + 1;    
  1888. +    self.walkframe = self.walkframe + 1;    
  1889.  };
  1890.  
  1891. -void()    player_run =[    $rockrun1,    player_run    ]
  1892. +void()  player_run =[   $rockrun1,      player_run      ]
  1893.  {
  1894.      self.weaponframe=0;
  1895.      if (!self.velocity_x && !self.velocity_y)
  1896. @@ -139,33 +139,33 @@
  1897.  };
  1898.  
  1899.  
  1900. -void()    player_shot1 =    [$shotatt1, player_shot2    ] {self.weaponframe=1;
  1901. +void()  player_shot1 =  [$shotatt1, player_shot2        ] {self.weaponframe=1;
  1902.  self.effects = self.effects | EF_MUZZLEFLASH;};
  1903. -void()    player_shot2 =    [$shotatt2, player_shot3    ] {self.weaponframe=2;};
  1904. -void()    player_shot3 =    [$shotatt3, player_shot4    ] {self.weaponframe=3;};
  1905. -void()    player_shot4 =    [$shotatt4, player_shot5    ] {self.weaponframe=4;};
  1906. -void()    player_shot5 =    [$shotatt5, player_shot6    ] {self.weaponframe=5;};
  1907. -void()    player_shot6 =    [$shotatt6, player_run    ] {self.weaponframe=6;};
  1908. -
  1909. -void()    player_axe1 =    [$axatt1, player_axe2    ] {self.weaponframe=1;};
  1910. -void()    player_axe2 =    [$axatt2, player_axe3    ] {self.weaponframe=2;};
  1911. -void()    player_axe3 =    [$axatt3, player_axe4    ] {self.weaponframe=3;W_FireAxe();};
  1912. -void()    player_axe4 =    [$axatt4, player_run    ] {self.weaponframe=4;};
  1913. -
  1914. -void()    player_axeb1 =    [$axattb1, player_axeb2    ] {self.weaponframe=5;};
  1915. -void()    player_axeb2 =    [$axattb2, player_axeb3    ] {self.weaponframe=6;};
  1916. -void()    player_axeb3 =    [$axattb3, player_axeb4    ] {self.weaponframe=7;W_FireAxe();};
  1917. -void()    player_axeb4 =    [$axattb4, player_run    ] {self.weaponframe=8;};
  1918. -
  1919. -void()    player_axec1 =    [$axattc1, player_axec2    ] {self.weaponframe=1;};
  1920. -void()    player_axec2 =    [$axattc2, player_axec3    ] {self.weaponframe=2;};
  1921. -void()    player_axec3 =    [$axattc3, player_axec4    ] {self.weaponframe=3;W_FireAxe();};
  1922. -void()    player_axec4 =    [$axattc4, player_run    ] {self.weaponframe=4;};
  1923. -
  1924. -void()    player_axed1 =    [$axattd1, player_axed2    ] {self.weaponframe=5;};
  1925. -void()    player_axed2 =    [$axattd2, player_axed3    ] {self.weaponframe=6;};
  1926. -void()    player_axed3 =    [$axattd3, player_axed4    ] {self.weaponframe=7;W_FireAxe();};
  1927. -void()    player_axed4 =    [$axattd4, player_run    ] {self.weaponframe=8;};
  1928. +void()  player_shot2 =  [$shotatt2, player_shot3        ] {self.weaponframe=2;};
  1929. +void()  player_shot3 =  [$shotatt3, player_shot4        ] {self.weaponframe=3;};
  1930. +void()  player_shot4 =  [$shotatt4, player_shot5        ] {self.weaponframe=4;};
  1931. +void()  player_shot5 =  [$shotatt5, player_shot6        ] {self.weaponframe=5;};
  1932. +void()  player_shot6 =  [$shotatt6, player_run  ] {self.weaponframe=6;};
  1933. +
  1934. +void()  player_axe1 =   [$axatt1, player_axe2   ] {self.weaponframe=1;};
  1935. +void()  player_axe2 =   [$axatt2, player_axe3   ] {self.weaponframe=2;};
  1936. +void()  player_axe3 =   [$axatt3, player_axe4   ] {self.weaponframe=3;W_FireAxe();};
  1937. +void()  player_axe4 =   [$axatt4, player_run    ] {self.weaponframe=4;};
  1938. +
  1939. +void()  player_axeb1 =  [$axattb1, player_axeb2 ] {self.weaponframe=5;};
  1940. +void()  player_axeb2 =  [$axattb2, player_axeb3 ] {self.weaponframe=6;};
  1941. +void()  player_axeb3 =  [$axattb3, player_axeb4 ] {self.weaponframe=7;W_FireAxe();};
  1942. +void()  player_axeb4 =  [$axattb4, player_run   ] {self.weaponframe=8;};
  1943. +
  1944. +void()  player_axec1 =  [$axattc1, player_axec2 ] {self.weaponframe=1;};
  1945. +void()  player_axec2 =  [$axattc2, player_axec3 ] {self.weaponframe=2;};
  1946. +void()  player_axec3 =  [$axattc3, player_axec4 ] {self.weaponframe=3;W_FireAxe();};
  1947. +void()  player_axec4 =  [$axattc4, player_run   ] {self.weaponframe=4;};
  1948. +
  1949. +void()  player_axed1 =  [$axattd1, player_axed2 ] {self.weaponframe=5;};
  1950. +void()  player_axed2 =  [$axattd2, player_axed3 ] {self.weaponframe=6;};
  1951. +void()  player_axed3 =  [$axattd3, player_axed4 ] {self.weaponframe=7;W_FireAxe();};
  1952. +void()  player_axed4 =  [$axattd4, player_run   ] {self.weaponframe=8;};
  1953.  
  1954.  
  1955.  //============================================================================
  1956. @@ -240,7 +240,7 @@
  1957.  
  1958.  void() PainSound =
  1959.  {
  1960. -local float        rs;
  1961. +local float             rs;
  1962.  
  1963.      if (self.health < 0)
  1964.          return;
  1965. @@ -265,7 +265,7 @@
  1966.  // slime pain sounds
  1967.      if (self.watertype == CONTENT_SLIME)
  1968.      {
  1969. -// FIX ME    put in some steam here
  1970. +// FIX ME       put in some steam here
  1971.          if (random() > 0.5)
  1972.              sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
  1973.          else
  1974. @@ -320,19 +320,19 @@
  1975.      return;
  1976.  };
  1977.  
  1978. -void()    player_pain1 =    [    $pain1,    player_pain2    ] {PainSound();self.weaponframe=0;};
  1979. -void()    player_pain2 =    [    $pain2,    player_pain3    ] {};
  1980. -void()    player_pain3 =    [    $pain3,    player_pain4    ] {};
  1981. -void()    player_pain4 =    [    $pain4,    player_pain5    ] {};
  1982. -void()    player_pain5 =    [    $pain5,    player_pain6    ] {};
  1983. -void()    player_pain6 =    [    $pain6,    player_run    ] {};
  1984. -
  1985. -void()    player_axpain1 =    [    $axpain1,    player_axpain2    ] {PainSound();self.weaponframe=0;};
  1986. -void()    player_axpain2 =    [    $axpain2,    player_axpain3    ] {};
  1987. -void()    player_axpain3 =    [    $axpain3,    player_axpain4    ] {};
  1988. -void()    player_axpain4 =    [    $axpain4,    player_axpain5    ] {};
  1989. -void()    player_axpain5 =    [    $axpain5,    player_axpain6    ] {};
  1990. -void()    player_axpain6 =    [    $axpain6,    player_run    ] {};
  1991. +void()  player_pain1 =  [       $pain1, player_pain2    ] {PainSound();self.weaponframe=0;};
  1992. +void()  player_pain2 =  [       $pain2, player_pain3    ] {};
  1993. +void()  player_pain3 =  [       $pain3, player_pain4    ] {};
  1994. +void()  player_pain4 =  [       $pain4, player_pain5    ] {};
  1995. +void()  player_pain5 =  [       $pain5, player_pain6    ] {};
  1996. +void()  player_pain6 =  [       $pain6, player_run      ] {};
  1997. +
  1998. +void()  player_axpain1 =        [       $axpain1,       player_axpain2  ] {PainSound();self.weaponframe=0;};
  1999. +void()  player_axpain2 =        [       $axpain2,       player_axpain3  ] {};
  2000. +void()  player_axpain3 =        [       $axpain3,       player_axpain4  ] {};
  2001. +void()  player_axpain4 =        [       $axpain4,       player_axpain5  ] {};
  2002. +void()  player_axpain5 =        [       $axpain5,       player_axpain6  ] {};
  2003. +void()  player_axpain6 =        [       $axpain6,       player_run      ] {};
  2004.  
  2005.  void() player_pain =
  2006.  {
  2007. @@ -340,7 +340,7 @@
  2008.          return;
  2009.  
  2010.      if (self.invisible_finished > time)
  2011. -        return;        // eyes don't have pain frames
  2012. +        return;         // eyes don't have pain frames
  2013.  
  2014.      if (self.weapon == IT_AXE)
  2015.          player_axpain1 ();
  2016. @@ -357,7 +357,7 @@
  2017.  
  2018.  void() DeathBubblesSpawn =
  2019.  {
  2020. -local entity    bubble;
  2021. +local entity    bubble;
  2022.      if (self.owner.waterlevel != 3)
  2023.          return;
  2024.      bubble = spawn();
  2025. @@ -381,7 +381,7 @@
  2026.  
  2027.  void(float num_bubbles) DeathBubbles =
  2028.  {
  2029. -local entity    bubble_spawner;
  2030. +local entity    bubble_spawner;
  2031.      
  2032.      bubble_spawner = spawn();
  2033.      setorigin (bubble_spawner, self.origin);
  2034. @@ -398,7 +398,7 @@
  2035.  
  2036.  void() DeathSound =
  2037.  {
  2038. -local float        rs;
  2039. +local float             rs;
  2040.  
  2041.      // water death sounds
  2042.      if (self.waterlevel == 3)
  2043. @@ -442,12 +442,12 @@
  2044.  
  2045.      if (dm > -50)
  2046.      {
  2047. -//        dprint ("level 1\n");
  2048. +//              dprint ("level 1\n");
  2049.          v = v * 0.7;
  2050.      }
  2051.      else if (dm > -200)
  2052.      {
  2053. -//        dprint ("level 3\n");
  2054. +//              dprint ("level 3\n");
  2055.          v = v * 2;
  2056.      }
  2057.      else
  2058. @@ -458,7 +458,7 @@
  2059.  
  2060.  void(string gibname, float dm) ThrowGib =
  2061.  {
  2062. -    local    entity new;
  2063. +    local   entity new;
  2064.  
  2065.      new = spawn();
  2066.      new.origin = self.origin;
  2067. @@ -523,14 +523,14 @@
  2068.  
  2069.  void() PlayerDie =
  2070.  {
  2071. -    local    float    i;
  2072. +    local   float   i;
  2073.      
  2074.      self.items = self.items - (self.items & IT_INVISIBILITY);
  2075. -    self.invisible_finished = 0;    // don't die as eyes
  2076. +    self.invisible_finished = 0;    // don't die as eyes
  2077.      self.invincible_finished = 0;
  2078.      self.super_damage_finished = 0;
  2079.      self.radsuit_finished = 0;
  2080. -    self.modelindex = modelindex_player;    // don't use eyes
  2081. +    self.modelindex = modelindex_player;    // don't use eyes
  2082.  
  2083.      if (deathmatch || coop)
  2084.          DropBackpack();
  2085. @@ -579,9 +579,9 @@
  2086.  };
  2087.  
  2088.  void() set_suicide_frame =
  2089. -{    // used by klill command and diconnect command
  2090. +{       // used by klill command and diconnect command
  2091.      if (self.model != "progs/player.mdl")
  2092. -        return;    // allready gibbed
  2093. +        return; // allready gibbed
  2094.      self.frame = $deatha11;
  2095.      self.solid = SOLID_NOT;
  2096.      self.movetype = MOVETYPE_TOSS;
  2097. @@ -590,70 +590,70 @@
  2098.  };
  2099.  
  2100.  
  2101. -void()    player_diea1    =    [    $deatha1,    player_diea2    ] {};
  2102. -void()    player_diea2    =    [    $deatha2,    player_diea3    ] {};
  2103. -void()    player_diea3    =    [    $deatha3,    player_diea4    ] {};
  2104. -void()    player_diea4    =    [    $deatha4,    player_diea5    ] {};
  2105. -void()    player_diea5    =    [    $deatha5,    player_diea6    ] {};
  2106. -void()    player_diea6    =    [    $deatha6,    player_diea7    ] {};
  2107. -void()    player_diea7    =    [    $deatha7,    player_diea8    ] {};
  2108. -void()    player_diea8    =    [    $deatha8,    player_diea9    ] {};
  2109. -void()    player_diea9    =    [    $deatha9,    player_diea10    ] {};
  2110. -void()    player_diea10    =    [    $deatha10,    player_diea11    ] {};
  2111. -void()    player_diea11    =    [    $deatha11,    player_diea11 ] {PlayerDead();};
  2112. -
  2113. -void()    player_dieb1    =    [    $deathb1,    player_dieb2    ] {};
  2114. -void()    player_dieb2    =    [    $deathb2,    player_dieb3    ] {};
  2115. -void()    player_dieb3    =    [    $deathb3,    player_dieb4    ] {};
  2116. -void()    player_dieb4    =    [    $deathb4,    player_dieb5    ] {};
  2117. -void()    player_dieb5    =    [    $deathb5,    player_dieb6    ] {};
  2118. -void()    player_dieb6    =    [    $deathb6,    player_dieb7    ] {};
  2119. -void()    player_dieb7    =    [    $deathb7,    player_dieb8    ] {};
  2120. -void()    player_dieb8    =    [    $deathb8,    player_dieb9    ] {};
  2121. -void()    player_dieb9    =    [    $deathb9,    player_dieb9    ] {PlayerDead();};
  2122. -
  2123. -void()    player_diec1    =    [    $deathc1,    player_diec2    ] {};
  2124. -void()    player_diec2    =    [    $deathc2,    player_diec3    ] {};
  2125. -void()    player_diec3    =    [    $deathc3,    player_diec4    ] {};
  2126. -void()    player_diec4    =    [    $deathc4,    player_diec5    ] {};
  2127. -void()    player_diec5    =    [    $deathc5,    player_diec6    ] {};
  2128. -void()    player_diec6    =    [    $deathc6,    player_diec7    ] {};
  2129. -void()    player_diec7    =    [    $deathc7,    player_diec8    ] {};
  2130. -void()    player_diec8    =    [    $deathc8,    player_diec9    ] {};
  2131. -void()    player_diec9    =    [    $deathc9,    player_diec10    ] {};
  2132. -void()    player_diec10    =    [    $deathc10,    player_diec11    ] {};
  2133. -void()    player_diec11    =    [    $deathc11,    player_diec12    ] {};
  2134. -void()    player_diec12    =    [    $deathc12,    player_diec13    ] {};
  2135. -void()    player_diec13    =    [    $deathc13,    player_diec14    ] {};
  2136. -void()    player_diec14    =    [    $deathc14,    player_diec15    ] {};
  2137. -void()    player_diec15    =    [    $deathc15,    player_diec15 ] {PlayerDead();};
  2138. -
  2139. -void()    player_died1    =    [    $deathd1,    player_died2    ] {};
  2140. -void()    player_died2    =    [    $deathd2,    player_died3    ] {};
  2141. -void()    player_died3    =    [    $deathd3,    player_died4    ] {};
  2142. -void()    player_died4    =    [    $deathd4,    player_died5    ] {};
  2143. -void()    player_died5    =    [    $deathd5,    player_died6    ] {};
  2144. -void()    player_died6    =    [    $deathd6,    player_died7    ] {};
  2145. -void()    player_died7    =    [    $deathd7,    player_died8    ] {};
  2146. -void()    player_died8    =    [    $deathd8,    player_died9    ] {};
  2147. -void()    player_died9    =    [    $deathd9,    player_died9    ] {PlayerDead();};
  2148. -
  2149. -void()    player_diee1    =    [    $deathe1,    player_diee2    ] {};
  2150. -void()    player_diee2    =    [    $deathe2,    player_diee3    ] {};
  2151. -void()    player_diee3    =    [    $deathe3,    player_diee4    ] {};
  2152. -void()    player_diee4    =    [    $deathe4,    player_diee5    ] {};
  2153. -void()    player_diee5    =    [    $deathe5,    player_diee6    ] {};
  2154. -void()    player_diee6    =    [    $deathe6,    player_diee7    ] {};
  2155. -void()    player_diee7    =    [    $deathe7,    player_diee8    ] {};
  2156. -void()    player_diee8    =    [    $deathe8,    player_diee9    ] {};
  2157. -void()    player_diee9    =    [    $deathe9,    player_diee9    ] {PlayerDead();};
  2158. -
  2159. -void()    player_die_ax1    =    [    $axdeth1,    player_die_ax2    ] {};
  2160. -void()    player_die_ax2    =    [    $axdeth2,    player_die_ax3    ] {};
  2161. -void()    player_die_ax3    =    [    $axdeth3,    player_die_ax4    ] {};
  2162. -void()    player_die_ax4    =    [    $axdeth4,    player_die_ax5    ] {};
  2163. -void()    player_die_ax5    =    [    $axdeth5,    player_die_ax6    ] {};
  2164. -void()    player_die_ax6    =    [    $axdeth6,    player_die_ax7    ] {};
  2165. -void()    player_die_ax7    =    [    $axdeth7,    player_die_ax8    ] {};
  2166. -void()    player_die_ax8    =    [    $axdeth8,    player_die_ax9    ] {};
  2167. -void()    player_die_ax9    =    [    $axdeth9,    player_die_ax9    ] {PlayerDead();};
  2168. +void()  player_diea1    =       [       $deatha1,       player_diea2    ] {};
  2169. +void()  player_diea2    =       [       $deatha2,       player_diea3    ] {};
  2170. +void()  player_diea3    =       [       $deatha3,       player_diea4    ] {};
  2171. +void()  player_diea4    =       [       $deatha4,       player_diea5    ] {};
  2172. +void()  player_diea5    =       [       $deatha5,       player_diea6    ] {};
  2173. +void()  player_diea6    =       [       $deatha6,       player_diea7    ] {};
  2174. +void()  player_diea7    =       [       $deatha7,       player_diea8    ] {};
  2175. +void()  player_diea8    =       [       $deatha8,       player_diea9    ] {};
  2176. +void()  player_diea9    =       [       $deatha9,       player_diea10   ] {};
  2177. +void()  player_diea10   =       [       $deatha10,      player_diea11   ] {};
  2178. +void()  player_diea11   =       [       $deatha11,      player_diea11 ] {PlayerDead();};
  2179. +
  2180. +void()  player_dieb1    =       [       $deathb1,       player_dieb2    ] {};
  2181. +void()  player_dieb2    =       [       $deathb2,       player_dieb3    ] {};
  2182. +void()  player_dieb3    =       [       $deathb3,       player_dieb4    ] {};
  2183. +void()  player_dieb4    =       [       $deathb4,       player_dieb5    ] {};
  2184. +void()  player_dieb5    =       [       $deathb5,       player_dieb6    ] {};
  2185. +void()  player_dieb6    =       [       $deathb6,       player_dieb7    ] {};
  2186. +void()  player_dieb7    =       [       $deathb7,       player_dieb8    ] {};
  2187. +void()  player_dieb8    =       [       $deathb8,       player_dieb9    ] {};
  2188. +void()  player_dieb9    =       [       $deathb9,       player_dieb9    ] {PlayerDead();};
  2189. +
  2190. +void()  player_diec1    =       [       $deathc1,       player_diec2    ] {};
  2191. +void()  player_diec2    =       [       $deathc2,       player_diec3    ] {};
  2192. +void()  player_diec3    =       [       $deathc3,       player_diec4    ] {};
  2193. +void()  player_diec4    =       [       $deathc4,       player_diec5    ] {};
  2194. +void()  player_diec5    =       [       $deathc5,       player_diec6    ] {};
  2195. +void()  player_diec6    =       [       $deathc6,       player_diec7    ] {};
  2196. +void()  player_diec7    =       [       $deathc7,       player_diec8    ] {};
  2197. +void()  player_diec8    =       [       $deathc8,       player_diec9    ] {};
  2198. +void()  player_diec9    =       [       $deathc9,       player_diec10   ] {};
  2199. +void()  player_diec10   =       [       $deathc10,      player_diec11   ] {};
  2200. +void()  player_diec11   =       [       $deathc11,      player_diec12   ] {};
  2201. +void()  player_diec12   =       [       $deathc12,      player_diec13   ] {};
  2202. +void()  player_diec13   =       [       $deathc13,      player_diec14   ] {};
  2203. +void()  player_diec14   =       [       $deathc14,      player_diec15   ] {};
  2204. +void()  player_diec15   =       [       $deathc15,      player_diec15 ] {PlayerDead();};
  2205. +
  2206. +void()  player_died1    =       [       $deathd1,       player_died2    ] {};
  2207. +void()  player_died2    =       [       $deathd2,       player_died3    ] {};
  2208. +void()  player_died3    =       [       $deathd3,       player_died4    ] {};
  2209. +void()  player_died4    =       [       $deathd4,       player_died5    ] {};
  2210. +void()  player_died5    =       [       $deathd5,       player_died6    ] {};
  2211. +void()  player_died6    =       [       $deathd6,       player_died7    ] {};
  2212. +void()  player_died7    =       [       $deathd7,       player_died8    ] {};
  2213. +void()  player_died8    =       [       $deathd8,       player_died9    ] {};
  2214. +void()  player_died9    =       [       $deathd9,       player_died9    ] {PlayerDead();};
  2215. +
  2216. +void()  player_diee1    =       [       $deathe1,       player_diee2    ] {};
  2217. +void()  player_diee2    =       [       $deathe2,       player_diee3    ] {};
  2218. +void()  player_diee3    =       [       $deathe3,       player_diee4    ] {};
  2219. +void()  player_diee4    =       [       $deathe4,       player_diee5    ] {};
  2220. +void()  player_diee5    =       [       $deathe5,       player_diee6    ] {};
  2221. +void()  player_diee6    =       [       $deathe6,       player_diee7    ] {};
  2222. +void()  player_diee7    =       [       $deathe7,       player_diee8    ] {};
  2223. +void()  player_diee8    =       [       $deathe8,       player_diee9    ] {};
  2224. +void()  player_diee9    =       [       $deathe9,       player_diee9    ] {PlayerDead();};
  2225. +
  2226. +void()  player_die_ax1  =       [       $axdeth1,       player_die_ax2  ] {};
  2227. +void()  player_die_ax2  =       [       $axdeth2,       player_die_ax3  ] {};
  2228. +void()  player_die_ax3  =       [       $axdeth3,       player_die_ax4  ] {};
  2229. +void()  player_die_ax4  =       [       $axdeth4,       player_die_ax5  ] {};
  2230. +void()  player_die_ax5  =       [       $axdeth5,       player_die_ax6  ] {};
  2231. +void()  player_die_ax6  =       [       $axdeth6,       player_die_ax7  ] {};
  2232. +void()  player_die_ax7  =       [       $axdeth7,       player_die_ax8  ] {};
  2233. +void()  player_die_ax8  =       [       $axdeth8,       player_die_ax9  ] {};
  2234. +void()  player_die_ax9  =       [       $axdeth9,       player_die_ax9  ] {PlayerDead();};
  2235. diff -ur --new-file v101qc/progdefs.h progs/progdefs.h
  2236. --- v101qc/progdefs.h    Thu Jan  1 08:00:00 1970
  2237. +++ progs/progdefs.h    Sat Aug 17 23:10:52 1996
  2238. @@ -0,0 +1,143 @@
  2239. +
  2240. +/* file generated by qcc, do not modify */
  2241. +
  2242. +typedef struct
  2243. +{    int    pad[28];
  2244. +    int    self;
  2245. +    int    other;
  2246. +    int    world;
  2247. +    float    time;
  2248. +    float    frametime;
  2249. +    float    force_retouch;
  2250. +    string_t    mapname;
  2251. +    float    deathmatch;
  2252. +    float    coop;
  2253. +    float    teamplay;
  2254. +    float    serverflags;
  2255. +    float    total_secrets;
  2256. +    float    total_monsters;
  2257. +    float    found_secrets;
  2258. +    float    killed_monsters;
  2259. +    float    parm1;
  2260. +    float    parm2;
  2261. +    float    parm3;
  2262. +    float    parm4;
  2263. +    float    parm5;
  2264. +    float    parm6;
  2265. +    float    parm7;
  2266. +    float    parm8;
  2267. +    float    parm9;
  2268. +    float    parm10;
  2269. +    float    parm11;
  2270. +    float    parm12;
  2271. +    float    parm13;
  2272. +    float    parm14;
  2273. +    float    parm15;
  2274. +    float    parm16;
  2275. +    vec3_t    v_forward;
  2276. +    vec3_t    v_up;
  2277. +    vec3_t    v_right;
  2278. +    float    trace_allsolid;
  2279. +    float    trace_startsolid;
  2280. +    float    trace_fraction;
  2281. +    vec3_t    trace_endpos;
  2282. +    vec3_t    trace_plane_normal;
  2283. +    float    trace_plane_dist;
  2284. +    int    trace_ent;
  2285. +    float    trace_inopen;
  2286. +    float    trace_inwater;
  2287. +    int    msg_entity;
  2288. +    func_t    main;
  2289. +    func_t    StartFrame;
  2290. +    func_t    PlayerPreThink;
  2291. +    func_t    PlayerPostThink;
  2292. +    func_t    ClientKill;
  2293. +    func_t    ClientConnect;
  2294. +    func_t    PutClientInServer;
  2295. +    func_t    ClientDisconnect;
  2296. +    func_t    SetNewParms;
  2297. +    func_t    SetChangeParms;
  2298. +} globalvars_t;
  2299. +
  2300. +typedef struct
  2301. +{
  2302. +    float    modelindex;
  2303. +    vec3_t    absmin;
  2304. +    vec3_t    absmax;
  2305. +    float    ltime;
  2306. +    float    movetype;
  2307. +    float    solid;
  2308. +    vec3_t    origin;
  2309. +    vec3_t    oldorigin;
  2310. +    vec3_t    velocity;
  2311. +    vec3_t    angles;
  2312. +    vec3_t    avelocity;
  2313. +    vec3_t    punchangle;
  2314. +    string_t    classname;
  2315. +    string_t    model;
  2316. +    float    frame;
  2317. +    float    skin;
  2318. +    float    effects;
  2319. +    vec3_t    mins;
  2320. +    vec3_t    maxs;
  2321. +    vec3_t    size;
  2322. +    func_t    touch;
  2323. +    func_t    use;
  2324. +    func_t    think;
  2325. +    func_t    blocked;
  2326. +    float    nextthink;
  2327. +    int    groundentity;
  2328. +    float    health;
  2329. +    float    frags;
  2330. +    float    weapon;
  2331. +    string_t    weaponmodel;
  2332. +    float    weaponframe;
  2333. +    float    currentammo;
  2334. +    float    ammo_shells;
  2335. +    float    ammo_nails;
  2336. +    float    ammo_rockets;
  2337. +    float    ammo_cells;
  2338. +    float    items;
  2339. +    float    takedamage;
  2340. +    int    chain;
  2341. +    float    deadflag;
  2342. +    vec3_t    view_ofs;
  2343. +    float    button0;
  2344. +    float    button1;
  2345. +    float    button2;
  2346. +    float    impulse;
  2347. +    float    fixangle;
  2348. +    vec3_t    v_angle;
  2349. +    float    idealpitch;
  2350. +    string_t    netname;
  2351. +    int    enemy;
  2352. +    float    flags;
  2353. +    float    colormap;
  2354. +    float    team;
  2355. +    float    max_health;
  2356. +    float    teleport_time;
  2357. +    float    armortype;
  2358. +    float    armorvalue;
  2359. +    float    waterlevel;
  2360. +    float    watertype;
  2361. +    float    ideal_yaw;
  2362. +    float    yaw_speed;
  2363. +    int    aiment;
  2364. +    int    goalentity;
  2365. +    float    spawnflags;
  2366. +    string_t    target;
  2367. +    string_t    targetname;
  2368. +    float    dmg_take;
  2369. +    float    dmg_save;
  2370. +    int    dmg_inflictor;
  2371. +    int    owner;
  2372. +    vec3_t    movedir;
  2373. +    string_t    message;
  2374. +    float    sounds;
  2375. +    string_t    noise;
  2376. +    string_t    noise1;
  2377. +    string_t    noise2;
  2378. +    string_t    noise3;
  2379. +} entvars_t;
  2380. +
  2381. +#define PROGHEADER_CRC 5927
  2382. diff -ur --new-file v101qc/progs.src progs/progs.src
  2383. --- v101qc/progs.src    Sun Aug 18 02:29:36 1996
  2384. +++ progs/progs.src    Wed Aug 14 18:46:28 1996
  2385. @@ -6,6 +6,7 @@
  2386.  ai.qc
  2387.  combat.qc
  2388.  items.qc
  2389. +cbnmods.qc
  2390.  weapons.qc
  2391.  world.qc
  2392.  client.qc
  2393. @@ -27,9 +28,9 @@
  2394.  zombie.qc
  2395.  boss.qc
  2396.  
  2397. -tarbaby.qc        // registered
  2398. -hknight.qc        // registered
  2399. -fish.qc            // registered
  2400. -shalrath.qc        // registered
  2401. -enforcer.qc        // registered
  2402. -oldone.qc        // registered
  2403. +tarbaby.qc              // registered
  2404. +hknight.qc              // registered
  2405. +fish.qc                 // registered
  2406. +shalrath.qc             // registered
  2407. +enforcer.qc             // registered
  2408. +oldone.qc               // registered
  2409. diff -ur --new-file v101qc/triggers.qc progs/triggers.qc
  2410. --- v101qc/triggers.qc    Sun Aug 18 02:29:36 1996
  2411. +++ progs/triggers.qc    Thu Aug 15 23:29:42 1996
  2412. @@ -9,8 +9,8 @@
  2413.  
  2414.  //=============================================================================
  2415.  
  2416. -float    SPAWNFLAG_NOMESSAGE = 1;
  2417. -float    SPAWNFLAG_NOTOUCH = 1;
  2418. +float   SPAWNFLAG_NOMESSAGE = 1;
  2419. +float   SPAWNFLAG_NOTOUCH = 1;
  2420.  
  2421.  // the wait time has passed, so set back up for another activation
  2422.  void() multi_wait =
  2423. @@ -31,7 +31,7 @@
  2424.  {
  2425.      if (self.nextthink > time)
  2426.      {
  2427. -        return;        // allready been triggered
  2428. +        return;         // allready been triggered
  2429.      }
  2430.  
  2431.      if (self.classname == "trigger_secret")
  2432. @@ -52,13 +52,13 @@
  2433.      
  2434.      SUB_UseTargets();
  2435.  
  2436. -    if (self.wait > 0)    
  2437. +    if (self.wait > 0)      
  2438.      {
  2439.          self.think = multi_wait;
  2440.          self.nextthink = time + self.wait;
  2441.      }
  2442.      else
  2443. -    {    // we can't just remove (self) here, because this is a touch function
  2444. +    {       // we can't just remove (self) here, because this is a touch function
  2445.          // called wheil C code is looping through area links...
  2446.          self.touch = SUB_Null;
  2447.          self.nextthink = time + 0.1;
  2448. @@ -88,7 +88,7 @@
  2449.      {
  2450.          makevectors (other.angles);
  2451.          if (v_forward * self.movedir < 0)
  2452. -            return;        // not facing the right way
  2453. +            return;         // not facing the right way
  2454.      }
  2455.      
  2456.      self.enemy = other;
  2457. @@ -102,9 +102,9 @@
  2458.  If notouch is set, the trigger is only fired by other entities, not by touching.
  2459.  NOTOUCH has been obsoleted by trigger_relay!
  2460.  sounds
  2461. -1)    secret
  2462. -2)    beep beep
  2463. -3)    large switch
  2464. +1)      secret
  2465. +2)      beep beep
  2466. +3)      large switch
  2467.  4)
  2468.  set "message" to text string
  2469.  */
  2470. @@ -140,7 +140,7 @@
  2471.          self.th_die = multi_killed;
  2472.          self.takedamage = DAMAGE_YES;
  2473.          self.solid = SOLID_BBOX;
  2474. -        setorigin (self, self.origin);    // make sure it links into the world
  2475. +        setorigin (self, self.origin);  // make sure it links into the world
  2476.      }
  2477.      else
  2478.      {
  2479. @@ -159,9 +159,9 @@
  2480.  if "killtarget" is set, any objects that have a matching "target" will be removed when the trigger is fired.
  2481.  if "angle" is set, the trigger will only fire when someone is facing the direction of the angle.  Use "360" for an angle of 0.
  2482.  sounds
  2483. -1)    secret
  2484. -2)    beep beep
  2485. -3)    large switch
  2486. +1)      secret
  2487. +2)      beep beep
  2488. +3)      large switch
  2489.  4)
  2490.  set "message" to text string
  2491.  */
  2492. @@ -187,8 +187,8 @@
  2493.  /*QUAKED trigger_secret (.5 .5 .5) ?
  2494.  secret counter trigger
  2495.  sounds
  2496. -1)    secret
  2497. -2)    beep beep
  2498. +1)      secret
  2499. +2)      beep beep
  2500.  3)
  2501.  4)
  2502.  set "message" to text string
  2503. @@ -276,13 +276,13 @@
  2504.  ==============================================================================
  2505.  */
  2506.  
  2507. -float    PLAYER_ONLY    = 1;
  2508. -float    SILENT = 2;
  2509. +float   PLAYER_ONLY     = 1;
  2510. +float   SILENT = 2;
  2511.  
  2512.  void() play_teleport =
  2513.  {
  2514. -    local    float v;
  2515. -    local    string tmpstr;
  2516. +    local   float v;
  2517. +    local   string tmpstr;
  2518.  
  2519.      v = random() * 5;
  2520.      if (v < 1)
  2521. @@ -326,7 +326,7 @@
  2522.          if (other.invincible_finished > time)
  2523.              self.classname = "teledeath2";
  2524.          if (self.owner.classname != "player")
  2525. -        {    // other monsters explode themselves
  2526. +        {       // other monsters explode themselves
  2527.              T_Damage (self.owner, self, self, 50000);
  2528.              return;
  2529.          }
  2530. @@ -342,7 +342,7 @@
  2531.  
  2532.  void(vector org, entity death_owner) spawn_tdeath =
  2533.  {
  2534. -local entity    death;
  2535. +local entity    death;
  2536.  
  2537.      death = spawn();
  2538.      death.classname = "teledeath";
  2539. @@ -356,25 +356,29 @@
  2540.      death.think = SUB_Remove;
  2541.      death.owner = death_owner;
  2542.      
  2543. -    force_retouch = 2;        // make sure even still objects get hit
  2544. +    force_retouch = 2;              // make sure even still objects get hit
  2545.  };
  2546.  
  2547.  void() teleport_touch =
  2548.  {
  2549. -local entity    t;
  2550. -local vector    org;
  2551. +local entity    t;
  2552. +local vector    org;
  2553.  
  2554.      if (self.targetname)
  2555.      {
  2556.          if (self.nextthink < time)
  2557.          {
  2558. -            return;        // not fired yet
  2559. +            return;         // not fired yet
  2560.          }
  2561.      }
  2562.  
  2563. -    if (self.spawnflags & PLAYER_ONLY)
  2564. +/*        if (self.spawnflags & PLAYER_ONLY)
  2565.      {
  2566. +//PATCH - CN, Aug 96: make rockets and grenades teleport
  2567. +bprint (other.classname);
  2568.          if (other.classname != "player")
  2569. +          if (other.classname != "grenade")
  2570. +            if (other.classname != "rocket")
  2571.              return;
  2572.      }
  2573.  
  2574. @@ -384,6 +388,8 @@
  2575.  
  2576.      SUB_UseTargets ();
  2577.  
  2578. +*/
  2579. +
  2580.  // put a tfog where the player was
  2581.      spawn_tfog (other.origin);
  2582.  
  2583. @@ -410,7 +416,7 @@
  2584.      other.angles = t.mangle;
  2585.      if (other.classname == "player")
  2586.      {
  2587. -        other.fixangle = 1;        // turn this way immediately
  2588. +        other.fixangle = 1;             // turn this way immediately
  2589.          other.teleport_time = time + 0.7;
  2590.          if (other.flags & FL_ONGROUND)
  2591.              other.flags = other.flags - FL_ONGROUND;
  2592. @@ -436,7 +442,7 @@
  2593.  void() teleport_use =
  2594.  {
  2595.      self.nextthink = time + 0.2;
  2596. -    force_retouch = 2;        // make sure even still objects get hit
  2597. +    force_retouch = 2;              // make sure even still objects get hit
  2598.      self.think = SUB_Null;
  2599.  };
  2600.  
  2601. diff -ur --new-file v101qc/weapons.qc progs/weapons.qc
  2602. --- v101qc/weapons.qc    Sun Aug 18 02:29:36 1996
  2603. +++ progs/weapons.qc    Sat Aug 17 22:34:22 1996
  2604. @@ -6,22 +6,21 @@
  2605.  void(vector org, vector vel, float damage) SpawnBlood;
  2606.  void() SuperDamageSound;
  2607.  
  2608. -
  2609.  // called by worldspawn
  2610.  void() W_Precache =
  2611.  {
  2612. -    precache_sound ("weapons/r_exp3.wav");    // new rocket explosion
  2613. -    precache_sound ("weapons/rocket1i.wav");    // spike gun
  2614. +    precache_sound ("weapons/r_exp3.wav");  // new rocket explosion
  2615. +    precache_sound ("weapons/rocket1i.wav");        // spike gun
  2616.      precache_sound ("weapons/sgun1.wav");
  2617. -    precache_sound ("weapons/guncock.wav");    // player shotgun
  2618. -    precache_sound ("weapons/ric1.wav");    // ricochet (used in c code)
  2619. -    precache_sound ("weapons/ric2.wav");    // ricochet (used in c code)
  2620. -    precache_sound ("weapons/ric3.wav");    // ricochet (used in c code)
  2621. -    precache_sound ("weapons/spike2.wav");    // super spikes
  2622. -    precache_sound ("weapons/tink1.wav");    // spikes tink (used in c code)
  2623. -    precache_sound ("weapons/grenade.wav");    // grenade launcher
  2624. -    precache_sound ("weapons/bounce.wav");        // grenade bounce
  2625. -    precache_sound ("weapons/shotgn2.wav");    // super shotgun
  2626. +    precache_sound ("weapons/guncock.wav"); // player shotgun
  2627. +    precache_sound ("weapons/ric1.wav");    // ricochet (used in c code)
  2628. +    precache_sound ("weapons/ric2.wav");    // ricochet (used in c code)
  2629. +    precache_sound ("weapons/ric3.wav");    // ricochet (used in c code)
  2630. +    precache_sound ("weapons/spike2.wav");  // super spikes
  2631. +    precache_sound ("weapons/tink1.wav");   // spikes tink (used in c code)
  2632. +    precache_sound ("weapons/grenade.wav"); // grenade launcher
  2633. +    precache_sound ("weapons/bounce.wav");          // grenade bounce
  2634. +    precache_sound ("weapons/shotgn2.wav"); // super shotgun
  2635.  };
  2636.  
  2637.  float() crandom =
  2638. @@ -36,8 +35,8 @@
  2639.  */
  2640.  void() W_FireAxe =
  2641.  {
  2642. -    local    vector    source;
  2643. -    local    vector    org;
  2644. +    local   vector  source;
  2645. +    local   vector  org;
  2646.  
  2647.      source = self.origin + '0 0 16';
  2648.      traceline (source, source + v_forward*64, FALSE, self);
  2649. @@ -53,7 +52,7 @@
  2650.          T_Damage (trace_ent, self, self, 20);
  2651.      }
  2652.      else
  2653. -    {    // hit wall
  2654. +    {       // hit wall
  2655.          sound (self, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
  2656.          WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  2657.          WriteByte (MSG_BROADCAST, TE_GUNSHOT);
  2658. @@ -69,7 +68,7 @@
  2659.  
  2660.  vector() wall_velocity =
  2661.  {
  2662. -    local vector    vel;
  2663. +    local vector    vel;
  2664.      
  2665.      vel = normalize (self.velocity);
  2666.      vel = normalize(vel + v_up*(random()- 0.5) + v_right*(random()- 0.5));
  2667. @@ -87,8 +86,8 @@
  2668.  */
  2669.  void(vector org, vector vel) SpawnMeatSpray =
  2670.  {
  2671. -    local    entity missile, mpuff;
  2672. -    local    vector    org;
  2673. +    local   entity missile, mpuff;
  2674. +    local   vector  org;
  2675.  
  2676.      missile = spawn ();
  2677.      missile.owner = self;
  2678. @@ -107,7 +106,7 @@
  2679.      missile.think = SUB_Remove;
  2680.  
  2681.      setmodel (missile, "progs/zom_gib.mdl");
  2682. -    setsize (missile, '0 0 0', '0 0 0');        
  2683. +    setsize (missile, '0 0 0', '0 0 0');            
  2684.      setorigin (missile, org);
  2685.  };
  2686.  
  2687. @@ -128,7 +127,7 @@
  2688.  */
  2689.  void(float damage) spawn_touchblood =
  2690.  {
  2691. -    local vector    vel;
  2692. +    local vector    vel;
  2693.  
  2694.      vel = wall_velocity () * 0.2;
  2695.      SpawnBlood (self.origin + vel*0.01, vel, damage);
  2696. @@ -155,8 +154,8 @@
  2697.  ==============================================================================
  2698.  */
  2699.  
  2700. -entity    multi_ent;
  2701. -float    multi_damage;
  2702. +entity  multi_ent;
  2703. +float   multi_damage;
  2704.  
  2705.  void() ClearMultiDamage =
  2706.  {
  2707. @@ -201,7 +200,7 @@
  2708.  */
  2709.  void(float damage, vector dir) TraceAttack =
  2710.  {
  2711. -    local    vector    vel, org;
  2712. +    local   vector  vel, org;
  2713.      
  2714.      vel = normalize(dir + v_up*crandom() + v_right*crandom());
  2715.      vel = vel + 2*trace_plane_normal;
  2716. @@ -234,8 +233,8 @@
  2717.  */
  2718.  void(float shotcount, vector dir, vector spread) FireBullets =
  2719.  {
  2720. -    local    vector direction;
  2721. -    local    vector    src;
  2722. +    local   vector direction;
  2723. +    local   vector  src;
  2724.      
  2725.      makevectors(self.v_angle);
  2726.  
  2727. @@ -265,7 +264,7 @@
  2728.  {
  2729.      local vector dir;
  2730.  
  2731. -    sound (self, CHAN_WEAPON, "weapons/guncock.wav", 1, ATTN_NORM);    
  2732. +    sound (self, CHAN_WEAPON, "weapons/guncock.wav", 1, ATTN_NORM); 
  2733.  
  2734.      self.punchangle_x = -2;
  2735.      
  2736. @@ -290,7 +289,7 @@
  2737.          return;
  2738.      }
  2739.          
  2740. -    sound (self ,CHAN_WEAPON, "weapons/shotgn2.wav", 1, ATTN_NORM);    
  2741. +    sound (self ,CHAN_WEAPON, "weapons/shotgn2.wav", 1, ATTN_NORM); 
  2742.  
  2743.      self.punchangle_x = -4;
  2744.      
  2745. @@ -308,12 +307,12 @@
  2746.  ==============================================================================
  2747.  */
  2748.  
  2749. -void()    s_explode1    =    [0,        s_explode2] {};
  2750. -void()    s_explode2    =    [1,        s_explode3] {};
  2751. -void()    s_explode3    =    [2,        s_explode4] {};
  2752. -void()    s_explode4    =    [3,        s_explode5] {};
  2753. -void()    s_explode5    =    [4,        s_explode6] {};
  2754. -void()    s_explode6    =    [5,        SUB_Remove] {};
  2755. +void()  s_explode1      =       [0,             s_explode2] {};
  2756. +void()  s_explode2      =       [1,             s_explode3] {};
  2757. +void()  s_explode3      =       [2,             s_explode4] {};
  2758. +void()  s_explode4      =       [3,             s_explode5] {};
  2759. +void()  s_explode5      =       [4,             s_explode6] {};
  2760. +void()  s_explode6      =       [5,             SUB_Remove] {};
  2761.  
  2762.  void() BecomeExplosion =
  2763.  {
  2764. @@ -327,10 +326,10 @@
  2765.  
  2766.  void() T_MissileTouch =
  2767.  {
  2768. -    local float    damg;
  2769. +    local float     damg;
  2770.  
  2771.      if (other == self.owner)
  2772. -        return;        // don't explode on owner
  2773. +        return;         // don't explode on owner
  2774.  
  2775.      if (pointcontents(self.origin) == CONTENT_SKY)
  2776.      {
  2777. @@ -343,7 +342,7 @@
  2778.      if (other.health)
  2779.      {
  2780.          if (other.classname == "monster_shambler")
  2781. -            damg = damg * 0.5;    // mostly immune
  2782. +            damg = damg * 0.5;      // mostly immune
  2783.          T_Damage (other, self, self.owner, damg );
  2784.      }
  2785.  
  2786. @@ -351,7 +350,7 @@
  2787.      // was done in the impact
  2788.      T_RadiusDamage (self, self.owner, 120, other);
  2789.  
  2790. -//    sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM);
  2791. +//      sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM);
  2792.      self.origin = self.origin - 8*normalize(self.velocity);
  2793.  
  2794.      WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  2795. @@ -364,7 +363,6 @@
  2796.  };
  2797.  
  2798.  
  2799. -
  2800.  /*
  2801.  ================
  2802.  W_FireRocket
  2803. @@ -372,7 +370,8 @@
  2804.  */
  2805.  void() W_FireRocket =
  2806.  {
  2807. -    local    entity missile, mpuff;
  2808. +    local   entity missile, mpuff;
  2809. +    local   vector recoil;
  2810.      
  2811.      self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
  2812.      
  2813. @@ -385,22 +384,35 @@
  2814.      missile.movetype = MOVETYPE_FLYMISSILE;
  2815.      missile.solid = SOLID_BBOX;
  2816.          
  2817. -// set missile speed    
  2818. +// set missile speed    
  2819.  
  2820.      makevectors (self.v_angle);
  2821.      missile.velocity = aim(self, 1000);
  2822. +    recoil = missile.velocity * 150;  // CN_PATCH - calculate recoil
  2823.      missile.velocity = missile.velocity * 1000;
  2824.      missile.angles = vectoangles(missile.velocity);
  2825.      
  2826.      missile.touch = T_MissileTouch;
  2827.      
  2828. -// set missile duration
  2829. -    missile.nextthink = time + 5;
  2830. -    missile.think = SUB_Remove;
  2831.  
  2832.      setmodel (missile, "progs/missile.mdl");
  2833. -    setsize (missile, '0 0 0', '0 0 0');        
  2834. +    setsize (missile, '0 0 0', '0 0 0');            
  2835.      setorigin (missile, self.origin + v_forward*8 + '0 0 16');
  2836. +
  2837. +
  2838. +//CN_PATCH - Aug 96: Setup for missiles in water and player recoil
  2839. +    missile.nextthink = time + 0.1;
  2840. +    missile.duration = time + 6;
  2841. +    missile.think = CN_Missile_Think;
  2842. +    missile.jump_flag = FALSE; // use these fields for our own use
  2843. +    missile.swim_flag = FALSE;
  2844. +    missile.classname = "rocket";
  2845. +
  2846. +    // Give some good 'ol Newtonian recoil
  2847. +    self.velocity = self.velocity - recoil;
  2848. +    self.avelocity = vectoangles(self.velocity);
  2849. +// END CN_PATCH
  2850. +
  2851.  };
  2852.  
  2853.  /*
  2854. @@ -418,8 +430,8 @@
  2855.  */
  2856.  void(vector p1, vector p2, entity from, float damage) LightningDamage =
  2857.  {
  2858. -    local entity        e1, e2;
  2859. -    local vector        f;
  2860. +    local entity            e1, e2;
  2861. +    local vector            f;
  2862.      
  2863.      f = p2 - p1;
  2864.      normalize (f);
  2865. @@ -462,7 +474,7 @@
  2866.  
  2867.  void() W_FireLightning =
  2868.  {
  2869. -    local    vector        org;
  2870. +    local   vector          org;
  2871.  
  2872.      if (self.ammo_cells < 1)
  2873.      {
  2874. @@ -526,17 +538,18 @@
  2875.  void() GrenadeTouch =
  2876.  {
  2877.      if (other == self.owner)
  2878. -        return;        // don't explode on owner
  2879. +        return;         // don't explode on owner
  2880.      if (other.takedamage == DAMAGE_AIM)
  2881.      {
  2882.          GrenadeExplode();
  2883.          return;
  2884.      }
  2885. -    sound (self, CHAN_WEAPON, "weapons/bounce.wav", 1, ATTN_NORM);    // bounce sound
  2886. +    sound (self, CHAN_WEAPON, "weapons/bounce.wav", 1, ATTN_NORM);  // bounce sound
  2887.      if (self.velocity == '0 0 0')
  2888.          self.avelocity = '0 0 0';
  2889.  };
  2890.  
  2891. +
  2892.  /*
  2893.  ================
  2894.  W_FireGrenade
  2895. @@ -544,7 +557,8 @@
  2896.  */
  2897.  void() W_FireGrenade =
  2898.  {
  2899. -    local    entity missile, mpuff;
  2900. +    local   entity missile, mpuff;
  2901. +    local   vector recoil;
  2902.      
  2903.      self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
  2904.      
  2905. @@ -558,7 +572,7 @@
  2906.      missile.solid = SOLID_BBOX;
  2907.      missile.classname = "grenade";
  2908.          
  2909. -// set missile speed    
  2910. +// set missile speed    
  2911.  
  2912.      makevectors (self.v_angle);
  2913.  
  2914. @@ -571,19 +585,31 @@
  2915.          missile.velocity_z = 200;
  2916.      }
  2917.  
  2918. +    recoil = missile.velocity * 0.234;  //CN_PATCH calculate recoil
  2919. +
  2920.      missile.avelocity = '300 300 300';
  2921.  
  2922.      missile.angles = vectoangles(missile.velocity);
  2923.      
  2924.      missile.touch = GrenadeTouch;
  2925.      
  2926. -// set missile duration
  2927. -    missile.nextthink = time + 2.5;
  2928. -    missile.think = GrenadeExplode;
  2929.  
  2930.      setmodel (missile, "progs/grenade.mdl");
  2931. -    setsize (missile, '0 0 0', '0 0 0');        
  2932. +    setsize (missile, '0 0 0', '0 0 0');            
  2933.      setorigin (missile, self.origin);
  2934. +
  2935. +//CN_PATCH - Aug 96: Setup for missiles in water and player recoil
  2936. +    missile.nextthink = time + 0.1;
  2937. +    missile.duration = time + 2.5;
  2938. +    missile.think = CN_Missile_Think;
  2939. +    missile.jump_flag = FALSE;  //id's fields used for our own purpose
  2940. +    missile.swim_flag = FALSE;
  2941. +
  2942. +    //Give the player some good 'ol Newtonian recoil
  2943. +    self.velocity = self.velocity - recoil;
  2944. +    self.avelocity = vectoangles(self.velocity);
  2945. +//END CN_PATCH
  2946. +
  2947.  };
  2948.  
  2949.  
  2950. @@ -611,19 +637,25 @@
  2951.      
  2952.      newmis.touch = spike_touch;
  2953.      newmis.classname = "spike";
  2954. -    newmis.think = SUB_Remove;
  2955. -    newmis.nextthink = time + 6;
  2956.      setmodel (newmis, "progs/spike.mdl");
  2957. -    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);        
  2958. +    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);               
  2959.      setorigin (newmis, org);
  2960.  
  2961.      newmis.velocity = dir * 1000;
  2962. +
  2963. +//CN_PATCH - Aug 96: Setup for missiles in water and player recoil
  2964. +    newmis.nextthink = time + 0.1;
  2965. +    newmis.duration = time + 6;
  2966. +    newmis.think = CN_Missile_Think;
  2967. +    newmis.jump_flag = FALSE;  //id's fields used for our own purpose
  2968. +    newmis.swim_flag = FALSE;
  2969. +//END CN_PATCH
  2970.  };
  2971.  
  2972.  void() W_FireSuperSpikes =
  2973.  {
  2974. -    local vector    dir;
  2975. -    local entity    old;
  2976. +    local vector    dir;
  2977. +    local entity    old;
  2978.      
  2979.      sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
  2980.      self.attack_finished = time + 0.2;
  2981. @@ -632,14 +664,14 @@
  2982.      launch_spike (self.origin + '0 0 16', dir);
  2983.      newmis.touch = superspike_touch;
  2984.      setmodel (newmis, "progs/s_spike.mdl");
  2985. -    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);        
  2986. +    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);               
  2987.      self.punchangle_x = -2;
  2988.  };
  2989.  
  2990.  void(float ox) W_FireSpikes =
  2991.  {
  2992. -    local vector    dir;
  2993. -    local entity    old;
  2994. +    local vector    dir;
  2995. +    local entity    old;
  2996.      
  2997.      makevectors (self.v_angle);
  2998.      
  2999. @@ -675,7 +707,7 @@
  3000.          return;
  3001.  
  3002.      if (other.solid == SOLID_TRIGGER)
  3003. -        return;    // trigger field, do nothing
  3004. +        return; // trigger field, do nothing
  3005.  
  3006.      if (pointcontents(self.origin) == CONTENT_SKY)
  3007.      {
  3008. @@ -715,7 +747,7 @@
  3009.          return;
  3010.  
  3011.      if (other.solid == SOLID_TRIGGER)
  3012. -        return;    // trigger field, do nothing
  3013. +        return; // trigger field, do nothing
  3014.  
  3015.      if (pointcontents(self.origin) == CONTENT_SKY)
  3016.      {
  3017. @@ -753,7 +785,7 @@
  3018.  
  3019.  void() W_SetCurrentAmmo =
  3020.  {
  3021. -    player_run ();        // get out of any weapon firing states
  3022. +    player_run ();          // get out of any weapon firing states
  3023.  
  3024.      self.items = self.items - ( self.items & (IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS) );
  3025.      
  3026. @@ -822,7 +854,7 @@
  3027.  
  3028.  float() W_BestWeapon =
  3029.  {
  3030. -    local    float    it;
  3031. +    local   float   it;
  3032.      
  3033.      it = self.items;
  3034.  
  3035. @@ -871,24 +903,25 @@
  3036.  An attack impulse can be triggered now
  3037.  ============
  3038.  */
  3039. -void()    player_axe1;
  3040. -void()    player_axeb1;
  3041. -void()    player_axec1;
  3042. -void()    player_axed1;
  3043. -void()    player_shot1;
  3044. -void()    player_nail1;
  3045. -void()    player_light1;
  3046. -void()    player_rocket1;
  3047. +void()  player_axe1;
  3048. +void()  player_axeb1;
  3049. +void()  player_axec1;
  3050. +void()  player_axed1;
  3051. +void()  player_shot1;
  3052. +void()  player_nail1;
  3053. +void()  player_light1;
  3054. +void()  player_rocket1;
  3055.  
  3056.  void() W_Attack =
  3057.  {
  3058. -    local    float    r;
  3059. +    local   float   r;
  3060. +    local   string  s;
  3061.  
  3062.      if (!W_CheckNoAmmo ())
  3063.          return;
  3064.  
  3065. -    makevectors    (self.v_angle);            // calculate forward angle for velocity
  3066. -    self.show_hostile = time + 1;    // wake monsters up
  3067. +    makevectors     (self.v_angle);                 // calculate forward angle for velocity
  3068. +    self.show_hostile = time + 1;   // wake monsters up
  3069.  
  3070.      if (self.weapon == IT_AXE)
  3071.      {
  3072. @@ -906,15 +939,97 @@
  3073.      }
  3074.      else if (self.weapon == IT_SHOTGUN)
  3075.      {
  3076. +
  3077. +//CN_PATCH - Aug 96: calculate jamming of shotgun
  3078. +      if (self.use_counter_shot > 20)
  3079. +      {
  3080. +        //re-init for next sample quanta
  3081. +        self.use_counter_shot = 0.0;
  3082. +        self.use_av_shot = 0.0;
  3083. +        self.use_last_shot = time;
  3084. +      } else 
  3085. +      {
  3086. +        // get average firing rate
  3087. +        self.use_counter_shot = self.use_counter_shot + 1.0;
  3088. +        self.use_av_shot = (self.use_av_shot + (time - self.use_last_shot))/2.0;
  3089. +        self.use_last_shot = time;
  3090. +      }
  3091. +
  3092. +      //look at whether to jam weapon or not
  3093. +      if ((self.use_counter_shot > 6.0) && (self.jammed_shot < 1.0))
  3094. +      {
  3095. +        //firing more than 6 - start testing over-use
  3096. +        if ((self.use_av_shot < 0.52) && (random() > 0.93))
  3097. +        {
  3098. +          self.jammed_shot = 1.0;
  3099. +        }
  3100. +      } else
  3101. +      {
  3102. +        //look at unjaming the weapon
  3103. +        if ((self.use_av_shot > 2.0) && (self.use_counter_shot > 6.0)) {
  3104. +          self.jammed_shot = 0.0;
  3105. +          sprint (self, "Unjammed the Shotgun!\n");
  3106. +        }
  3107. +      }
  3108. +      
  3109. +      if (self.jammed_shot < 1.0)
  3110. +      {
  3111.          player_shot1 ();
  3112.          W_FireShotgun ();
  3113.          self.attack_finished = time + 0.5;
  3114. +      } else
  3115. +      {
  3116. +        sprint (self,"Shotgun jammed!\n");
  3117. +        self.attack_finished = time + 0.4;
  3118. +      }
  3119. +//END CN_PATCH
  3120.      }
  3121.      else if (self.weapon == IT_SUPER_SHOTGUN)
  3122.      {
  3123. +
  3124. +//CN_PATCH - Aug 96: calculate jamming of s-shotgun
  3125. +      if (self.use_counter_ss > 20)
  3126. +      {
  3127. +        //re-init for next sample quanta
  3128. +        self.use_counter_ss = 0.0;
  3129. +        self.use_av_ss = 0.0;
  3130. +        self.use_last_ss = time;
  3131. +      } else 
  3132. +      {
  3133. +        // get average firing rate
  3134. +        self.use_counter_ss = self.use_counter_ss + 1.0;
  3135. +        self.use_av_ss = (self.use_av_ss + (time - self.use_last_ss))/2.0;
  3136. +        self.use_last_ss = time;
  3137. +      }
  3138. +
  3139. +      //look at whether to jam weapon or not
  3140. +      if ((self.use_counter_ss > 6.0) && (self.jammed_ss < 1.0))
  3141. +      {
  3142. +        //firing more than 6 - start testing over-use
  3143. +        if ((self.use_av_ss < 0.74) && (random() > 0.86))
  3144. +        {
  3145. +          self.jammed_ss = 1.0;
  3146. +        }
  3147. +      } else
  3148. +      {
  3149. +        //look at unjaming the weapon
  3150. +        if ((self.use_av_ss > 3.0) && (self.use_counter_ss > 6.0)) {
  3151. +          self.jammed_ss = 0.0;
  3152. +          sprint (self,"Unjammed the Super-Shotgun!\n");
  3153. +        }
  3154. +      }
  3155. +      
  3156. +      if (self.jammed_ss < 1.0)
  3157. +      {
  3158.          player_shot1 ();
  3159.          W_FireSuperShotgun ();
  3160.          self.attack_finished = time + 0.7;
  3161. +      } else
  3162. +      {
  3163. +        sprint (self,"Super-Shotgun jammed!\n");
  3164. +        self.attack_finished = time + 0.6;
  3165. +      }
  3166. +//END CN_PATCH
  3167.      }
  3168.      else if (self.weapon == IT_NAILGUN)
  3169.      {
  3170. @@ -926,15 +1041,81 @@
  3171.      }
  3172.      else if (self.weapon == IT_GRENADE_LAUNCHER)
  3173.      {
  3174. +//CN_PATCH - Aug 96: calculate if GL blows up
  3175. +      if (self.use_counter_gl > 10)
  3176. +      {
  3177. +        //re-init for next sample quanta
  3178. +        self.use_counter_gl = 0.0;
  3179. +        self.use_av_gl = 0.0;
  3180. +        self.use_last_gl = time;
  3181. +      } else 
  3182. +      {
  3183. +        // get average firing rate
  3184. +        self.use_counter_gl = self.use_counter_gl + 1.0;
  3185. +        self.use_av_gl = (self.use_av_gl + (time - self.use_last_gl))/2.0;
  3186. +        self.use_last_gl = time;
  3187. +      }
  3188. +
  3189. +      //look at whether to jam weapon or not
  3190. +      if ((self.use_counter_gl > 4.0) && (self.jammed_gl < 1.0))
  3191. +      {
  3192. +        //firing more than 4 - start testing over-use
  3193. +        if ((self.use_av_gl < 0.64) && (random() > 0.65))
  3194. +        {
  3195. +          self.jammed_gl = 1.0;
  3196. +        }
  3197. +      }
  3198. +      
  3199. +      if (self.jammed_gl < 1.0)
  3200. +      {
  3201.          player_rocket1();
  3202.          W_FireGrenade();
  3203.          self.attack_finished = time + 0.6;
  3204. +      } else
  3205. +      {
  3206. +        self.jammed_death = 1;
  3207. +        T_RadiusDamage (self, self, 35*self.ammo_rockets, world);
  3208. +      }
  3209. +//END CN_PATCH
  3210.      }
  3211.      else if (self.weapon == IT_ROCKET_LAUNCHER)
  3212.      {
  3213. +//CN_PATCH - Aug 96: calculate if RL blows up
  3214. +      if (self.use_counter_rocket > 10)
  3215. +      {
  3216. +        //re-init for next sample quanta
  3217. +        self.use_counter_rocket = 0.0;
  3218. +        self.use_av_rocket = 0.0;
  3219. +        self.use_last_rocket = time;
  3220. +      } else 
  3221. +      {
  3222. +        // get average firing rate
  3223. +        self.use_counter_rocket = self.use_counter_rocket + 1.0;
  3224. +        self.use_av_rocket = (self.use_av_rocket + (time - self.use_last_rocket))/2.0;
  3225. +        self.use_last_rocket = time;
  3226. +      }
  3227. +
  3228. +      //look at whether to jam weapon or not
  3229. +      if ((self.use_counter_rocket > 3.0) && (self.jammed_rocket < 1.0))
  3230. +      {
  3231. +        //firing more than 3 - start testing over-use
  3232. +        if ((self.use_av_rocket < 0.9) && (random() > 0.58))
  3233. +        {
  3234. +          self.jammed_rocket = 1.0;
  3235. +        }
  3236. +      }
  3237. +      
  3238. +      if (self.jammed_rocket < 1.0)
  3239. +      {
  3240.          player_rocket1();
  3241.          W_FireRocket();
  3242.          self.attack_finished = time + 0.8;
  3243. +      } else
  3244. +      {
  3245. +        self.jammed_death = 2;
  3246. +        T_RadiusDamage (self, self, 35*self.ammo_rockets, world);
  3247. +      }
  3248. +//END CN_PATCH
  3249.      }
  3250.      else if (self.weapon == IT_LIGHTNING)
  3251.      {
  3252. @@ -952,7 +1133,7 @@
  3253.  */
  3254.  void() W_ChangeWeapon =
  3255.  {
  3256. -    local    float    it, am, fl;
  3257. +    local   float   it, am, fl;
  3258.      
  3259.      it = self.items;
  3260.      am = 0;
  3261. @@ -972,7 +1153,7 @@
  3262.          fl = IT_SUPER_SHOTGUN;
  3263.          if (self.ammo_shells < 2)
  3264.              am = 1;
  3265. -    }        
  3266. +    }               
  3267.      else if (self.impulse == 4)
  3268.      {
  3269.          fl = IT_NAILGUN;
  3270. @@ -1007,13 +1188,13 @@
  3271.      self.impulse = 0;
  3272.      
  3273.      if (!(self.items & fl))
  3274. -    {    // don't have the weapon or the ammo
  3275. +    {       // don't have the weapon or the ammo
  3276.          sprint (self, "no weapon.\n");
  3277.          return;
  3278.      }
  3279.      
  3280.      if (am)
  3281. -    {    // don't have the ammo
  3282. +    {       // don't have the ammo
  3283.          sprint (self, "not enough ammo.\n");
  3284.          return;
  3285.      }
  3286. @@ -1021,7 +1202,7 @@
  3287.  //
  3288.  // set weapon, set ammo
  3289.  //
  3290. -    self.weapon = fl;        
  3291. +    self.weapon = fl;               
  3292.      W_SetCurrentAmmo ();
  3293.  };
  3294.  
  3295. @@ -1065,7 +1246,7 @@
  3296.  */
  3297.  void() CycleWeaponCommand =
  3298.  {
  3299. -    local    float    it, am;
  3300. +    local   float   it, am;
  3301.      
  3302.      it = self.items;
  3303.      self.impulse = 0;
  3304. @@ -1089,7 +1270,7 @@
  3305.              self.weapon = IT_SUPER_SHOTGUN;
  3306.              if (self.ammo_shells < 2)
  3307.                  am = 1;
  3308. -        }        
  3309. +        }               
  3310.          else if (self.weapon == IT_SUPER_SHOTGUN)
  3311.          {
  3312.              self.weapon = IT_NAILGUN;
  3313. @@ -1169,6 +1350,8 @@
  3314.          CycleWeaponCommand ();
  3315.      if (self.impulse == 11)
  3316.          ServerflagsCommand ();
  3317. +    if (self.impulse == 20)
  3318. +      CN_Ditch_Rockets ();
  3319.  
  3320.      if (self.impulse == 255)
  3321.          QuadCheat ();
  3322.