home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / quake / programs / relwep13 / relwep13.pat < prev    next >
Encoding:
Text File  |  1996-08-22  |  132.3 KB  |  4,343 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    Thu Aug 22 15:02:00 1996
  4. @@ -0,0 +1,288 @@
  5. +/*-------------------------------------------------------------------
  6. +Filename : cbnmods.qc
  7. +Author   : Cameron Newham
  8. +Version  : 1.4
  9. +Date     : 96/08/22
  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. +CN_Client_Init_Think
  22. +CN_NG_Jammed
  23. +CN_SNG_Jammed
  24. +--------------------------------------------------------------------*/
  25. +
  26. +void() bubble_bob;
  27. +void() GrenadeExplode; //Needed for CN_Missile_Think
  28. +void(float num_bubbles) DeathBubbles;
  29. +
  30. +/*-------------------------------------------------------------------
  31. +Slightly modified version of Id's DeathBubblesSpawn
  32. +--------------------------------------------------------------------*/
  33. +void() MissileBubblesSpawn =
  34. +{
  35. +local entity    bubble;
  36. +        bubble = spawn();
  37. +        setmodel (bubble, "progs/s_bubble.spr");
  38. +        setorigin (bubble, self.owner.origin);
  39. +        bubble.movetype = MOVETYPE_NOCLIP;
  40. +        bubble.solid = SOLID_NOT;
  41. +        bubble.velocity = '0 0 15';
  42. +        bubble.nextthink = time + 0.5;
  43. +        bubble.think = bubble_bob;
  44. +        bubble.classname = "bubble";
  45. +        bubble.frame = 0;
  46. +        bubble.cnt = 0;
  47. +        setsize (bubble, '-8 -8 -8', '8 8 8');
  48. +        self.nextthink = time + 0.1;
  49. +        self.think = MissileBubblesSpawn;
  50. +        self.air_finished = self.air_finished + 1;
  51. +        if (self.air_finished >= self.bubble_count)
  52. +                remove(self);
  53. +};
  54. +
  55. +/*---------------------CN_Missile_Bubbles----------------------------
  56. +Makes an underwater entity look like a real underwater entity by
  57. +spraying out bubbles.  This is designed for use with rockets.
  58. +--------------------------------------------------------------------*/
  59. +void(float num_bubbles) CN_Missile_Bubbles =
  60. +{
  61. +  local vector  rocket_origin;
  62. +  local entity  bubble_spawner;
  63. +        
  64. +        //rocket_origin = self.origin + ('0 -50 -50');
  65. +        bubble_spawner = spawn();
  66. +        setorigin (bubble_spawner, self.origin + '0 0 -60');
  67. +        bubble_spawner.movetype = MOVETYPE_NONE;
  68. +        bubble_spawner.solid = SOLID_NOT;
  69. +        bubble_spawner.nextthink = time + 0.1;
  70. +        bubble_spawner.think = MissileBubblesSpawn;
  71. +        bubble_spawner.air_finished = 0;
  72. +        bubble_spawner.owner = self;
  73. +        bubble_spawner.bubble_count = num_bubbles;
  74. +        return;
  75. +};
  76. +
  77. +
  78. +/*----------------------CN_Missile_Think-----------------------------
  79. +Missile Velocity Correction.
  80. +Correct the velocity of spikes, rockets and grenades underwater.  
  81. +Simulates water resistance.  Also calls CN_Missile_Bubbles for rockets
  82. +underwater.  Rockets are slowed in water and speed up again in air,
  83. +while grenades are slowed by each passage through water.
  84. +--------------------------------------------------------------------*/
  85. +void() CN_Missile_Think =
  86. +{
  87. +  local vector v1;
  88. +  local vector v2;
  89. +
  90. +  // if it's a grenade then we must make it explode after
  91. +  // it's duration expires
  92. +
  93. +  if ((self.classname == "grenade") && (time > self.duration))
  94. +  {
  95. +    // this is a grenade and it's past its use-by date
  96. +    self.think = GrenadeExplode;
  97. +    self.nextthink = time + 0.1;
  98. +  }
  99. +  else
  100. +  if (self.duration < time)
  101. +    self.think = SUB_Remove;
  102. +  else
  103. +  {
  104. +    self.nextthink = time + 0.1;
  105. +
  106. +    v1 = self.origin;
  107. +    v2 = v1;
  108. +    traceline (v1, v2, TRUE, self);
  109. +
  110. +    if (trace_inwater == TRUE) 
  111. +    {
  112. +      if ((random() > 0.72) && (self.classname == "rocket"))
  113. +        CN_Missile_Bubbles(1);
  114. +
  115. +      if (self.jump_flag == FALSE)
  116. +      {
  117. +        // correct velocity underwater if not underwater
  118. +        // (jump_flag) already.
  119. +        self.jump_flag = TRUE;  // now in water
  120. +        self.swim_flag = TRUE;  // water->air transition not done
  121. +        self.velocity = self.velocity * 0.4292;
  122. +        self.angles = vectoangles(self.velocity);
  123. +      }
  124. +    }
  125. +    else
  126. +    {
  127. +      // make sure we only do this for 1 water/surf transition
  128. +      if (self.swim_flag == TRUE) 
  129. +      {
  130. +        if (self.classname == "rocket")
  131. +        {
  132. +          // correct velocity out of water for rockets
  133. +          self.velocity = self.velocity * 2.33;
  134. +        }
  135. +        self.jump_flag = FALSE;  //out of water
  136. +        self.swim_flag = FALSE;  //water->air transition finished
  137. +      }
  138. +    }
  139. +  }
  140. +  
  141. +};
  142. +
  143. +/*------------------------CN_Ditch_Rockets---------------------------
  144. +Removes half your rockets, places them in a backpack and ejects
  145. +it to the world.  You'll need this for when you get too many rockets
  146. +and get weighed down.
  147. +--------------------------------------------------------------------*/
  148. +void() CN_Ditch_Rockets =
  149. +{
  150. +        local entity back_pack;
  151. +        local float  num_to_ditch;  
  152. +
  153. +        // if we have none or one then return!
  154. +        if (self.ammo_rockets < 2)
  155. +          return;
  156. +
  157. +        // spawn a backpack
  158. +        back_pack = spawn();
  159. +
  160. +        // calculate number to ditch and set appropriate amounts
  161. +        // for entity and backpack
  162. +        num_to_ditch = self.ammo_rockets / 2;
  163. +        num_to_ditch = floor(num_to_ditch);
  164. +        back_pack.ammo_rockets = num_to_ditch;
  165. +        self.ammo_rockets = self.ammo_rockets - num_to_ditch;
  166. +
  167. +
  168. +        back_pack.owner = self;
  169. +        makevectors(self.v_angle);
  170. +        setorigin(back_pack, self.origin + '0 0 45');
  171. +        back_pack.velocity = aim(self, 1000);
  172. +        back_pack.velocity_x = back_pack.velocity_x * -340;
  173. +        back_pack.velocity_y = back_pack.velocity_y * -340;
  174. +        back_pack.velocity_z = back_pack.velocity_z * 380;
  175. +        back_pack.angles = vectoangles(back_pack.velocity);
  176. +        back_pack.flags = FL_ITEM;
  177. +        back_pack.solid = SOLID_TRIGGER;
  178. +        back_pack.movetype = MOVETYPE_TOSS;
  179. +        back_pack.nextthink = time + 0.2;
  180. +
  181. +        setmodel (back_pack, "progs/backpack.mdl");
  182. +        setsize(back_pack, '-16 -16 0', '16 16 56');
  183. +        back_pack.touch = BackpackTouch;
  184. +        back_pack.nextthink = time + 120;    // remove pack after 120 secs
  185. +        back_pack.think = SUB_Remove;
  186. +
  187. +        sprint(self, "Dumped Rockets\n");
  188. +
  189. +        W_SetCurrentAmmo();
  190. +};
  191. +
  192. +/*--------------------CN_Client_Init_Think---------------------------
  193. +Startup messages
  194. +--------------------------------------------------------------------*/
  195. +void() CN_Client_Init_Think =
  196. +{
  197. +  sprint (self, "Realistic Weapons Version 1.3\n");
  198. +  sprint (self, "by C. Newham (w_australia)\n");
  199. +  sprint (self, "* Type 'help-rw' for help\n");
  200. +  sprint (self, "* Type 'features-rw' for mod features\n");
  201. +
  202. +  stuffcmd (self, "alias features-rw \"impulse 183\"\n");
  203. +  stuffcmd (self, "alias dumpr \"impulse 182\"\n");
  204. +  stuffcmd (self, "alias last \"impulse 181\"\n");
  205. +  stuffcmd (self, "alias help-rw \"impulse 180\"\n");
  206. +};
  207. +
  208. +/*-------------------------CN_NG_Jammed-----------------------------
  209. +See if Nailgun is jammed and possibly unjam it.
  210. +--------------------------------------------------------------------*/
  211. +void() CN_NG_Jammed =
  212. +{
  213. +          if ((self.use_counter_ng > 20) ||
  214. +              ((time - self.use_last_ng) > 2.5))
  215. +          {
  216. +            //re-init for next sample quanta
  217. +            //also do it if > 2.5 secs since last fire because of
  218. +            //buggy algorithm i've used for unjamming
  219. +            self.use_counter_ng = 0.0;
  220. +            self.use_av_ng = 0.0;
  221. +            self.use_last_ng = time;
  222. +            self.jammed_ng = 0;
  223. +          } else 
  224. +          {
  225. +            // get average firing rate
  226. +            self.use_counter_ng = self.use_counter_ng + 1.0;
  227. +            self.use_av_ng = (self.use_av_ng + (time - self.use_last_ng))/2.0;
  228. +            self.use_last_ng = time;
  229. +          }
  230. +
  231. +          //look at whether to jam weapon or not
  232. +          if ((self.use_counter_ng > 3.0) && (self.jammed_ng < 1.0))
  233. +          {
  234. +            //firing more than 3 - start testing over-use
  235. +            if ((self.use_av_ng < 0.22) && (random() > 0.9675))
  236. +            {
  237. +              self.jammed_ng = 1.0;
  238. +            }
  239. +          } else
  240. +          {
  241. +            //look at unjaming the weapon
  242. +            if ((self.use_av_ng > 2.2) && (self.use_counter_ng > 10.0)) {
  243. +              self.jammed_ng = 0.0;
  244. +              sprint (self, "Unjammed the Nailgun!\n");
  245. +            }
  246. +          }
  247. +};      
  248. +
  249. +/*-------------------------CN_SNG_Jammed----------------------------
  250. +See if Super-Nailgun is jammed and possibly unjam it.
  251. +--------------------------------------------------------------------*/
  252. +void() CN_SNG_Jammed =
  253. +{
  254. +  local float delta_use;
  255. +
  256. +
  257. +          delta_use = time - self.use_last_sng;
  258. +          if ((self.use_counter_sng > 20) ||
  259. +              ( delta_use > 2.5))
  260. +          {
  261. +            //re-init for next sample quanta
  262. +            //also do it if > 2.5 secs since last fire because of
  263. +            //buggy algorithm i've used for unjamming
  264. +            self.use_counter_sng = 0.0;
  265. +            self.use_av_sng = 0.0;
  266. +            self.use_last_sng = time;
  267. +            self.jammed_sng = 0;
  268. +          } else 
  269. +          {
  270. +            // get average firing rate
  271. +            self.use_counter_sng = self.use_counter_sng + 1.0;
  272. +            self.use_av_sng = (self.use_av_sng + (time - self.use_last_sng))/2.0;
  273. +            self.use_last_sng = time;
  274. +          }
  275. +
  276. +          //look at whether to jam weapon or not
  277. +          if ((self.use_counter_sng > 3.0) && (self.jammed_sng < 1.0))
  278. +          {
  279. +            //firing more than 3 - start testing over-use
  280. +            if ((self.use_av_sng < 0.22) && (random() > 0.945))
  281. +            {
  282. +              self.jammed_sng = 1.0;
  283. +            }
  284. +          } else
  285. +          {
  286. +            //look at unjaming the weapon
  287. +            if ((self.use_av_sng > 2.2) && (self.use_counter_sng > 10.0)) {
  288. +              self.jammed_sng = 0.0;
  289. +              sprint (self, "Unjammed the Perforator!\n");
  290. +            }
  291. +          }
  292. +};
  293. diff -ur --new-file v101qc/client.qc progs/client.qc
  294. --- v101qc/client.qc    Sun Aug 18 02:29:36 1996
  295. +++ progs/client.qc    Thu Aug 22 12:03:58 1996
  296. @@ -7,7 +7,7 @@
  297.  void (vector org) spawn_tfog;
  298.  void (vector org, entity death_owner) spawn_tdeath;
  299.  
  300. -float    modelindex_eyes, modelindex_player;
  301. +float   modelindex_eyes, modelindex_player;
  302.  
  303.  /*
  304.  =============================================================================
  305. @@ -17,8 +17,8 @@
  306.  =============================================================================
  307.  */
  308.  
  309. -float    intermission_running;
  310. -float    intermission_exittime;
  311. +float   intermission_running;
  312. +float   intermission_exittime;
  313.  
  314.  /*QUAKED info_intermission (1 0.5 0.5) (-16 -16 -16) (16 16 16)
  315.  This is the camera point for the intermission.
  316. @@ -73,7 +73,7 @@
  317.      if (serverflags)
  318.      {
  319.          if (world.model == "maps/start.bsp")
  320. -            SetNewParms ();        // take away all stuff on starting new episode
  321. +            SetNewParms ();         // take away all stuff on starting new episode
  322.      }
  323.      
  324.      self.items = parm1;
  325. @@ -96,13 +96,13 @@
  326.  */
  327.  entity() FindIntermission =
  328.  {
  329. -    local    entity spot;
  330. -    local    float cyc;
  331. +    local   entity spot;
  332. +    local   float cyc;
  333.  
  334.  // look for info_intermission first
  335.      spot = find (world, classname, "info_intermission");
  336.      if (spot)
  337. -    {    // pick a random one
  338. +    {       // pick a random one
  339.          cyc = random() * 4;
  340.          while (cyc > 1)
  341.          {
  342. @@ -131,7 +131,7 @@
  343.  string nextmap;
  344.  void() GotoNextMap =
  345.  {
  346. -    if (cvar("samelevel"))    // if samelevel is set, stay on same level
  347. +    if (cvar("samelevel"))  // if samelevel is set, stay on same level
  348.          changelevel (mapname);
  349.      else
  350.          changelevel (nextmap);
  351. @@ -209,7 +209,7 @@
  352.      if (intermission_running == 3)
  353.      {
  354.          if (!cvar("registered"))
  355. -        {    // shareware episode has been completed, go to sell screen
  356. +        {       // shareware episode has been completed, go to sell screen
  357.              WriteByte (MSG_ALL, SVC_SELLSCREEN);
  358.              return;
  359.          }
  360. @@ -246,7 +246,7 @@
  361.  
  362.  void() execute_changelevel =
  363.  {
  364. -    local entity    pos;
  365. +    local entity    pos;
  366.  
  367.      intermission_running = 1;
  368.      
  369. @@ -267,7 +267,7 @@
  370.      {
  371.          other.view_ofs = '0 0 0';
  372.          other.angles = other.v_angle = pos.mangle;
  373. -        other.fixangle = TRUE;        // turn this way immediately
  374. +        other.fixangle = TRUE;          // turn this way immediately
  375.          other.nextthink = time + 0.5;
  376.          other.takedamage = DAMAGE_NO;
  377.          other.solid = SOLID_NOT;
  378. @@ -275,7 +275,7 @@
  379.          other.modelindex = 0;
  380.          setorigin (other, pos.origin);
  381.          other = find (other, classname, "player");
  382. -    }    
  383. +    }       
  384.  
  385.      WriteByte (MSG_ALL, SVC_INTERMISSION);
  386.  };
  387. @@ -283,7 +283,7 @@
  388.  
  389.  void() changelevel_touch =
  390.  {
  391. -    local entity    pos;
  392. +    local entity    pos;
  393.  
  394.      if (other.classname != "player")
  395.          return;
  396. @@ -301,7 +301,7 @@
  397.      SUB_UseTargets ();
  398.  
  399.      if ( (self.spawnflags & 1) && (deathmatch == 0) )
  400. -    {    // NO_INTERMISSION
  401. +    {       // NO_INTERMISSION
  402.          GotoNextMap();
  403.          return;
  404.      }
  405. @@ -346,7 +346,7 @@
  406.          CopyToBodyQue (self);
  407.          // get the spawn parms as they were at level start
  408.          setspawnparms (self);
  409. -        // respawn        
  410. +        // respawn              
  411.          PutClientInServer ();
  412.      }
  413.      else if (deathmatch)
  414. @@ -355,11 +355,11 @@
  415.          CopyToBodyQue (self);
  416.          // set default spawn parms
  417.          SetNewParms ();
  418. -        // respawn        
  419. +        // respawn              
  420.          PutClientInServer ();
  421.      }
  422.      else
  423. -    {    // restart the entire server
  424. +    {       // restart the entire server
  425.          localcmd ("restart\n");
  426.      }
  427.  };
  428. @@ -378,7 +378,7 @@
  429.      bprint (" suicides\n");
  430.      set_suicide_frame ();
  431.      self.modelindex = modelindex_player;
  432. -    self.frags = self.frags - 2;    // extra penalty
  433. +    self.frags = self.frags - 2;    // extra penalty
  434.      respawn ();
  435.  };
  436.  
  437. @@ -396,7 +396,7 @@
  438.  */
  439.  entity() SelectSpawnPoint =
  440.  {
  441. -    local    entity spot;
  442. +    local   entity spot;
  443.      
  444.  // testinfo_player_start is only found in regioned levels
  445.      spot = find (world, classname, "testplayerstart");
  446. @@ -422,7 +422,7 @@
  447.      }
  448.  
  449.      if (serverflags)
  450. -    {    // return with a rune to start
  451. +    {       // return with a rune to start
  452.          spot = find (world, classname, "info_player_start2");
  453.          if (spot)
  454.              return spot;
  455. @@ -448,7 +448,7 @@
  456.  
  457.  void() PutClientInServer =
  458.  {
  459. -    local    entity spot;
  460. +    local   entity spot;
  461.  
  462.      self.classname = "player";
  463.      self.health = 100;
  464. @@ -459,7 +459,7 @@
  465.      self.max_health = 100;
  466.      self.flags = FL_CLIENT;
  467.      self.air_finished = time + 12;
  468. -    self.dmg = 2;           // initial water damage
  469. +    self.dmg = 2;                   // initial water damage
  470.      self.super_damage_finished = 0;
  471.      self.radsuit_finished = 0;
  472.      self.invisible_finished = 0;
  473. @@ -467,6 +467,30 @@
  474.      self.effects = 0;
  475.      self.invincible_time = 0;
  476.  
  477. +// CN_PATCH - Aug 96: unreliable weapons code
  478. +    self.use_counter_shot = 0;
  479. +    self.use_last_shot = 0;
  480. +    self.use_av_shot = 0;
  481. +    self.jammed_shot = 0;
  482. +    self.use_counter_ng = 0;
  483. +    self.use_last_ng = 0;
  484. +    self.use_av_ng = 0;
  485. +    self.jammed_ng = 0;
  486. +    self.use_counter_rocket = 0;
  487. +    self.use_last_rocket = 0;
  488. +    self.use_av_rocket = 0;
  489. +    self.jammed_rocket = 0;
  490. +    self.use_counter_gl = 0;
  491. +    self.use_last_gl = 0;
  492. +    self.use_av_gl = 0;
  493. +    self.jammed_gl = 0;
  494. +    self.use_counter_ss = 0;
  495. +    self.use_last_ss = 0;
  496. +    self.use_av_ss = 0;
  497. +    self.jammed_ss = 0;
  498. +    self.jammed_death = 0;
  499. +//END CN_PATCH
  500. +
  501.      DecodeLevelParms ();
  502.      
  503.      W_SetCurrentAmmo ();
  504. @@ -483,7 +507,7 @@
  505.  
  506.      self.origin = spot.origin + '0 0 1';
  507.      self.angles = spot.angles;
  508. -    self.fixangle = TRUE;        // turn this way immediately
  509. +    self.fixangle = TRUE;           // turn this way immediately
  510.  
  511.  // oh, this is a hack!
  512.      setmodel (self, "progs/eyes.mdl");
  513. @@ -505,6 +529,10 @@
  514.      }
  515.  
  516.      spawn_tdeath (self.origin, self);
  517. +//CN_PATCH - set up for Client initialisation
  518. +  self.nextthink = time + 0.1;
  519. +  self.think = CN_Client_Init_Think;
  520. +//END CN_PATCH
  521.  };
  522.  
  523.  
  524. @@ -581,7 +609,7 @@
  525.  
  526.  void() DumpScore =
  527.  {
  528. -    local entity    e, sort, walk;
  529. +    local entity    e, sort, walk;
  530.  
  531.      if (world.chain)
  532.          error ("DumpScore: world.chain is set");
  533. @@ -629,7 +657,7 @@
  534.  
  535.  // print the list
  536.      
  537. -    bprint ("\n");    
  538. +    bprint ("\n");  
  539.      while (sort)
  540.      {
  541.          PrintClientScore (sort);
  542. @@ -648,7 +676,7 @@
  543.  // find a trigger changelevel
  544.      o = find(world, classname, "trigger_changelevel");
  545.      if (!o || mapname == "start")
  546. -    {    // go back to same map if no trigger_changelevel
  547. +    {       // go back to same map if no trigger_changelevel
  548.          o = spawn();
  549.          o.map = mapname;
  550.      }
  551. @@ -671,10 +699,10 @@
  552.  */
  553.  void() CheckRules =
  554.  {
  555. -    local    float        timelimit;
  556. -    local    float        fraglimit;
  557. +    local   float           timelimit;
  558. +    local   float           fraglimit;
  559.      
  560. -    if (gameover)    // someone else quit the game already
  561. +    if (gameover)   // someone else quit the game already
  562.          return;
  563.          
  564.      timelimit = cvar("timelimit") * 60;
  565. @@ -708,15 +736,15 @@
  566.          localcmd ("killserver\n");
  567.  */
  568.          return;
  569. -    }    
  570. +    }       
  571.  };
  572.  
  573.  //============================================================================
  574.  
  575.  void() PlayerDeathThink =
  576.  {
  577. -    local entity    old_self;
  578. -    local float        forward;
  579. +    local entity    old_self;
  580. +    local float             forward;
  581.  
  582.      if ((self.flags & FL_ONGROUND))
  583.      {
  584. @@ -724,7 +752,7 @@
  585.          forward = forward - 20;
  586.          if (forward <= 0)
  587.              self.velocity = '0 0 0';
  588. -        else    
  589. +        else    
  590.              self.velocity = forward * normalize(self.velocity);
  591.      }
  592.  
  593. @@ -781,11 +809,11 @@
  594.          return;
  595.  
  596.      if ( !(self.flags & FL_JUMPRELEASED) )
  597. -        return;        // don't pogo stick
  598. +        return;         // don't pogo stick
  599.  
  600.      self.flags = self.flags - (self.flags & FL_JUMPRELEASED);
  601.  
  602. -    self.flags = self.flags - FL_ONGROUND;    // don't stairwalk
  603. +    self.flags = self.flags - FL_ONGROUND;  // don't stairwalk
  604.      
  605.      self.button2 = 0;
  606.  // player jumping sound
  607. @@ -800,7 +828,7 @@
  608.  
  609.  ============
  610.  */
  611. -.float    dmgtime;
  612. +.float  dmgtime;
  613.  
  614.  void() WaterMove =
  615.  {
  616. @@ -820,7 +848,7 @@
  617.          self.dmg = 2;
  618.      }
  619.      else if (self.air_finished < time)
  620. -    {    // drown!
  621. +    {       // drown!
  622.          if (self.pain_finished < time)
  623.          {
  624.              self.dmg = self.dmg + 2;
  625. @@ -834,7 +862,7 @@
  626.      if (!self.waterlevel)
  627.      {
  628.          if (self.flags & FL_INWATER)
  629. -        {    
  630. +        {       
  631.              // play leave water sound
  632.              sound (self, CHAN_BODY, "misc/outwater.wav", 1, ATTN_NORM);
  633.              self.flags = self.flags - FL_INWATER;
  634. @@ -843,7 +871,7 @@
  635.      }
  636.  
  637.      if (self.watertype == CONTENT_LAVA)
  638. -    {    // do damage
  639. +    {       // do damage
  640.          if (self.dmgtime < time)
  641.          {
  642.              if (self.radsuit_finished > time)
  643. @@ -855,7 +883,7 @@
  644.          }
  645.      }
  646.      else if (self.watertype == CONTENT_SLIME)
  647. -    {    // do damage
  648. +    {       // do damage
  649.          if (self.dmgtime < time && self.radsuit_finished < time)
  650.          {
  651.              self.dmgtime = time + 1;
  652. @@ -864,7 +892,7 @@
  653.      }
  654.      
  655.      if ( !(self.flags & FL_INWATER) )
  656. -    {    
  657. +    {       
  658.  
  659.  // player enter water sound
  660.  
  661. @@ -896,17 +924,17 @@
  662.      end = start + v_forward*24;
  663.      traceline (start, end, TRUE, self);
  664.      if (trace_fraction < 1)
  665. -    {    // solid at waist
  666. +    {       // solid at waist
  667.          start_z = start_z + self.maxs_z - 8;
  668.          end = start + v_forward*24;
  669.          self.movedir = trace_plane_normal * -50;
  670.          traceline (start, end, TRUE, self);
  671.          if (trace_fraction == 1)
  672. -        {    // open at eye level
  673. +        {       // open at eye level
  674.              self.flags = self.flags | FL_WATERJUMP;
  675.              self.velocity_z = 225;
  676.              self.flags = self.flags - (self.flags & FL_JUMPRELEASED);
  677. -            self.teleport_time = time + 2;    // safety net
  678. +            self.teleport_time = time + 2;  // safety net
  679.              return;
  680.          }
  681.      }
  682. @@ -922,19 +950,50 @@
  683.  */
  684.  void() PlayerPreThink =
  685.  {
  686. -    local    float    mspeed, aspeed;
  687. -    local    float    r;
  688. +    local   float   mspeed, aspeed;
  689. +    local   float   r;
  690. +    local   float   c_ashley;  // a fat person
  691. +    local   string  fs;
  692.  
  693.      if (intermission_running)
  694.      {
  695. -        IntermissionThink ();    // otherwise a button could be missed between
  696. -        return;                    // the think tics
  697. +        IntermissionThink ();   // otherwise a button could be missed between
  698. +        return;                                 // the think tics
  699.      }
  700.  
  701.      if (self.view_ofs == '0 0 0')
  702. -        return;        // intermission or finale
  703. +        return;         // intermission or finale
  704. +
  705. +//CN_PATCH - Aug 96: Calculate restricted movement by weight of rockets/armour
  706. +//                    and increased movement by health++
  707. +
  708. +    // allow 1 rocket with no weight restriction to allow for
  709. +    // getting to places in id's levels
  710. +    if (self.ammo_rockets > 1)
  711. +      c_ashley = 0.5 + ((20 - self.ammo_rockets) * 0.025);
  712. +    else
  713. +      c_ashley = 1.0;
  714. +
  715. +    c_ashley = c_ashley * (0.9 + (200 - self.armorvalue) * 0.0005);
  716. +
  717. +    //Now check for health > 100 and give slight speed advantage
  718. +    if (self.health > 100)
  719. +    {
  720. +      c_ashley = c_ashley + ((self.health - 100) * 0.002);
  721. +      if (c_ashley > 1.0)
  722. +        c_ashley = 1.0;  //Normalise to 1 maximum
  723. +    }
  724.  
  725. -    makevectors (self.v_angle);        // is this still used
  726. +    self.velocity_x = self.velocity_x *  c_ashley;
  727. +    self.velocity_y = self.velocity_y *  c_ashley;
  728. +
  729. +    // don't fall down slower than normal
  730. +    if (self.velocity_z > 0)
  731. +      self.velocity_z = self.velocity_z *  c_ashley;
  732. +    self.avelocity = vectoangles(self.velocity);
  733. +//END CN_PATCH
  734. +
  735. +    makevectors (self.v_angle);             // is this still used
  736.  
  737.      CheckRules ();
  738.      WaterMove ();
  739. @@ -949,7 +1008,7 @@
  740.      }
  741.      
  742.      if (self.deadflag == DEAD_DYING)
  743. -        return;    // dying, so do nothing
  744. +        return; // dying, so do nothing
  745.  
  746.      if (self.button2)
  747.      {
  748. @@ -958,7 +1017,7 @@
  749.      else
  750.          self.flags = self.flags | FL_JUMPRELEASED;
  751.  
  752. -// teleporters can force a non-moving pause time    
  753. +// teleporters can force a non-moving pause time        
  754.      if (time < self.pausetime)
  755.          self.velocity = '0 0 0';
  756.  };
  757. @@ -1004,7 +1063,7 @@
  758.          }
  759.  
  760.          if (self.invisible_finished < time)
  761. -        {    // just stopped
  762. +        {       // just stopped
  763.              self.items = self.items - IT_INVISIBILITY;
  764.              self.invisible_finished = 0;
  765.              self.invisible_time = 0;
  766. @@ -1015,7 +1074,7 @@
  767.          self.modelindex = modelindex_eyes;
  768.      }
  769.      else
  770. -        self.modelindex = modelindex_player;    // don't use eyes
  771. +        self.modelindex = modelindex_player;    // don't use eyes
  772.  
  773.  // invincibility
  774.      if (self.invincible_finished)
  775. @@ -1039,7 +1098,7 @@
  776.          }
  777.          
  778.          if (self.invincible_finished < time)
  779. -        {    // just stopped
  780. +        {       // just stopped
  781.              self.items = self.items - IT_INVULNERABILITY;
  782.              self.invincible_time = 0;
  783.              self.invincible_finished = 0;
  784. @@ -1064,7 +1123,7 @@
  785.                  stuffcmd (self, "bf\n");
  786.                  sound (self, CHAN_AUTO, "items/damage2.wav", 1, ATTN_NORM);
  787.                  self.super_time = time + 1;
  788. -            }      
  789. +            }         
  790.              
  791.              if (self.super_time < time)
  792.              {
  793. @@ -1074,7 +1133,7 @@
  794.          }
  795.  
  796.          if (self.super_damage_finished < time)
  797. -        {    // just stopped
  798. +        {       // just stopped
  799.              self.items = self.items - IT_QUAD;
  800.              self.super_damage_finished = 0;
  801.              self.super_time = 0;
  802. @@ -1083,12 +1142,12 @@
  803.              self.effects = self.effects | EF_DIMLIGHT;
  804.          else
  805.              self.effects = self.effects - (self.effects & EF_DIMLIGHT);
  806. -    }    
  807. +    }       
  808.  
  809. -// suit    
  810. +// suit 
  811.      if (self.radsuit_finished)
  812.      {
  813. -        self.air_finished = time + 12;        // don't drown
  814. +        self.air_finished = time + 12;          // don't drown
  815.  
  816.  // sound and screen flash when items starts to run out
  817.          if (self.radsuit_finished < time + 3)
  818. @@ -1109,12 +1168,12 @@
  819.          }
  820.  
  821.          if (self.radsuit_finished < time)
  822. -        {    // just stopped
  823. +        {       // just stopped
  824.              self.items = self.items - IT_SUIT;
  825.              self.rad_time = 0;
  826.              self.radsuit_finished = 0;
  827.          }
  828. -    }    
  829. +    }       
  830.  
  831.  };
  832.  
  833. @@ -1128,11 +1187,11 @@
  834.  */
  835.  void() PlayerPostThink =
  836.  {
  837. -    local    float    mspeed, aspeed;
  838. -    local    float    r;
  839. +    local   float   mspeed, aspeed;
  840. +    local   float   r;
  841.  
  842.      if (self.view_ofs == '0 0 0')
  843. -        return;        // intermission or finale
  844. +        return;         // intermission or finale
  845.      if (self.deadflag)
  846.          return;
  847.          
  848. @@ -1140,7 +1199,7 @@
  849.  
  850.      W_WeaponFrame ();
  851.  
  852. -// check to see if player landed and play landing sound    
  853. +// check to see if player landed and play landing sound 
  854.      if ((self.jump_flag < -300) && (self.flags & FL_ONGROUND) && (self.health > 0))
  855.      {
  856.          if (self.watertype == CONTENT_WATER)
  857. @@ -1173,6 +1232,7 @@
  858.  */
  859.  void() ClientConnect =
  860.  {
  861. +sprint (self, "Real Weapons Installed\n");
  862.      bprint (self.netname);
  863.      bprint (" entered the game\n");
  864.      
  865. @@ -1196,6 +1256,10 @@
  866.      // if the level end trigger has been activated, just return
  867.      // since they aren't *really* leaving
  868.  
  869. +//CN_PATCH
  870. +  last_player_time = time;
  871. +//END CN_PATCH
  872. +
  873.      // let everyone else know
  874.      bprint (self.netname);
  875.      bprint (" left the game with ");
  876. @@ -1214,8 +1278,8 @@
  877.  */
  878.  void(entity targ, entity attacker) ClientObituary =
  879.  {
  880. -    local    float rnum;
  881. -    local    string deathstring, deathstring2;
  882. +    local   float rnum;
  883. +    local   string deathstring, deathstring2;
  884.      rnum = random();
  885.  
  886.      if (targ.classname == "player")
  887. @@ -1255,9 +1319,17 @@
  888.                      return;
  889.                  }
  890.                  if (targ.weapon == 16)
  891. +                  if (targ.jammed_death == 0)
  892.                      bprint (" tries to put the pin back in\n");
  893. +                  else  //CN_PATCH
  894. +                    bprint ("'s Grenade Launcher exploded!\n");
  895.                  else if (rnum)
  896. +                {
  897. +                  if (targ.jammed_death == 0)
  898.                      bprint (" becomes bored with life\n");
  899. +                  else //CN_PATCH
  900. +                    bprint ("'s Rocket Launcher exploded!\n");
  901. +                }
  902.                  else
  903.                      bprint (" checks if his weapon is loaded\n");
  904.                  return;
  905. @@ -1329,7 +1401,7 @@
  906.          }
  907.          else
  908.          {
  909. -            targ.frags = targ.frags - 1;        // killed self
  910. +            targ.frags = targ.frags - 1;            // killed self
  911.              rnum = targ.watertype;
  912.  
  913.              bprint (targ.netname);
  914. @@ -1356,10 +1428,14 @@
  915.                      bprint (" burst into flames\n");
  916.                      return;
  917.                  }
  918. -                if (random() < 0.5)
  919. +                if (random() < 0.2)
  920. +                  if (random() < 0.6)
  921.                      bprint (" turned into hot slag\n");
  922. -                else
  923. +                  else
  924.                      bprint (" visits the Volcano God\n");
  925. +                else
  926. +                  bprint (" goes for a dip in the lava!\n");
  927. +
  928.                  return;
  929.              }
  930.  
  931. @@ -1406,7 +1482,7 @@
  932.                  return;
  933.              }
  934.              if (attacker.solid == SOLID_BSP && attacker != world)
  935. -            {    
  936. +            {       
  937.                  bprint (" was squished\n");
  938.                  return;
  939.              }
  940. diff -ur --new-file v101qc/combat.qc progs/combat.qc
  941. --- v101qc/combat.qc    Sun Aug 18 02:29:36 1996
  942. +++ progs/combat.qc    Wed Aug 21 22:07:32 1996
  943. @@ -61,10 +61,10 @@
  944.      self = targ;
  945.      
  946.      if (self.health < -99)
  947. -        self.health = -99;        // don't let sbar look bad if a player
  948. +        self.health = -99;              // don't let sbar look bad if a player
  949.  
  950.      if (self.movetype == MOVETYPE_PUSH || self.movetype == MOVETYPE_NONE)
  951. -    {    // doors, triggers, etc
  952. +    {       // doors, triggers, etc
  953.          self.th_die ();
  954.          self = oself;
  955.          return;
  956. @@ -101,10 +101,10 @@
  957.  */
  958.  void(entity targ, entity inflictor, entity attacker, float damage) T_Damage=
  959.  {
  960. -    local    vector    dir;
  961. -    local    entity    oldself;
  962. -    local    float    save;
  963. -    local    float    take;
  964. +    local   vector  dir;
  965. +    local   entity  oldself;
  966. +    local   float   save;
  967. +    local   float   take;
  968.  
  969.      if (!targ.takedamage)
  970.          return;
  971. @@ -122,7 +122,7 @@
  972.      if (save >= targ.armorvalue)
  973.      {
  974.          save = targ.armorvalue;
  975. -        targ.armortype = 0;    // lost all armor
  976. +        targ.armortype = 0;     // lost all armor
  977.          targ.items = targ.items - (targ.items & (IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3));
  978.      }
  979.      
  980. @@ -161,7 +161,9 @@
  981.      }
  982.  
  983.  // team play damage avoidance
  984. -    if ( (teamplay == 1) && (targ.team > 0)&&(targ.team == attacker.team) )
  985. +//CN_PATCH - check for jammed death. If none, then return.
  986. +    if ( (teamplay == 1) && (targ.team > 0)&&(targ.team == attacker.team) 
  987. +         && (self.jammed_death == 0))
  988.          return;
  989.          
  990.  // do the damage
  991. @@ -198,7 +200,7 @@
  992.          self.th_pain (attacker, take);
  993.      // nightmare mode monsters don't go into pain frames often
  994.          if (skill == 3)
  995. -            self.pain_finished = time + 5;        
  996. +            self.pain_finished = time + 5;          
  997.      }
  998.  
  999.      self = oldself;
  1000. @@ -211,9 +213,9 @@
  1001.  */
  1002.  void(entity inflictor, entity attacker, float damage, entity ignore) T_RadiusDamage =
  1003.  {
  1004. -    local    float     points;
  1005. -    local    entity    head;
  1006. -    local    vector    org;
  1007. +    local   float   points;
  1008. +    local   entity  head;
  1009. +    local   vector  org;
  1010.  
  1011.      head = findradius(inflictor.origin, damage+40);
  1012.      
  1013. @@ -233,8 +235,8 @@
  1014.                  if (points > 0)
  1015.                  {
  1016.                      if (CanDamage (head, inflictor))
  1017. -                    {    // shambler takes half damage from all explosions
  1018. -                        if (head.classname == "monster_shambler")                        
  1019. +                    {       // shambler takes half damage from all explosions
  1020. +                        if (head.classname == "monster_shambler")                                               
  1021.                              T_Damage (head, inflictor, attacker, points*0.5);
  1022.                          else
  1023.                              T_Damage (head, inflictor, attacker, points);
  1024. @@ -253,8 +255,8 @@
  1025.  */
  1026.  void(entity attacker, float damage) T_BeamDamage =
  1027.  {
  1028. -    local    float     points;
  1029. -    local    entity    head;
  1030. +    local   float   points;
  1031. +    local   entity  head;
  1032.      
  1033.      head = findradius(attacker.origin, damage+40);
  1034.      
  1035. @@ -272,7 +274,7 @@
  1036.              {
  1037.                  if (CanDamage (head, attacker))
  1038.                  {
  1039. -                    if (head.classname == "monster_shambler")                        
  1040. +                    if (head.classname == "monster_shambler")                                               
  1041.                          T_Damage (head, attacker, attacker, points*0.5);
  1042.                      else
  1043.                          T_Damage (head, attacker, attacker, points);
  1044. diff -ur --new-file v101qc/defs.qc progs/defs.qc
  1045. --- v101qc/defs.qc    Sun Aug 18 02:29:36 1996
  1046. +++ progs/defs.qc    Thu Aug 22 11:41:58 1996
  1047. @@ -10,13 +10,13 @@
  1048.  //
  1049.  // system globals
  1050.  //
  1051. -entity        self;
  1052. -entity        other;
  1053. -entity        world;
  1054. -float        time;
  1055. -float        frametime;
  1056. +entity          self;
  1057. +entity          other;
  1058. +entity          world;
  1059. +float           time;
  1060. +float           frametime;
  1061.  
  1062. -float        force_retouch;        // force all entities to touch triggers
  1063. +float           force_retouch;          // force all entities to touch triggers
  1064.                                  // next frame.  this is needed because
  1065.                                  // non-moving things don't normally scan
  1066.                                  // for triggers, and when a trigger is
  1067. @@ -24,69 +24,69 @@
  1068.                                  // needs to catch everything.
  1069.                                  // decremented each frame, so set to 2
  1070.                                  // to guarantee everything is touched
  1071. -string        mapname;
  1072. +string          mapname;
  1073.  
  1074. -float        deathmatch;
  1075. -float        coop;
  1076. -float        teamplay;
  1077. +float           deathmatch;
  1078. +float           coop;
  1079. +float           teamplay;
  1080.  
  1081. -float        serverflags;        // propagated from level to level, used to
  1082. +float           serverflags;            // propagated from level to level, used to
  1083.                                  // keep track of completed episodes
  1084.  
  1085. -float        total_secrets;
  1086. -float        total_monsters;
  1087. +float           total_secrets;
  1088. +float           total_monsters;
  1089.  
  1090. -float        found_secrets;        // number of secrets found
  1091. -float        killed_monsters;    // number of monsters killed
  1092. +float           found_secrets;          // number of secrets found
  1093. +float           killed_monsters;        // number of monsters killed
  1094.  
  1095.  
  1096.  // spawnparms are used to encode information about clients across server
  1097.  // level changes
  1098. -float        parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
  1099. +float           parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
  1100.  
  1101.  //
  1102.  // global variables set by built in functions
  1103. -//    
  1104. -vector        v_forward, v_up, v_right;    // set by makevectors()
  1105. +//      
  1106. +vector          v_forward, v_up, v_right;       // set by makevectors()
  1107.      
  1108.  // set by traceline / tracebox
  1109. -float        trace_allsolid;
  1110. -float        trace_startsolid;
  1111. -float        trace_fraction;
  1112. -vector        trace_endpos;
  1113. -vector        trace_plane_normal;
  1114. -float        trace_plane_dist;
  1115. -entity        trace_ent;
  1116. -float        trace_inopen;
  1117. -float        trace_inwater;
  1118. +float           trace_allsolid;
  1119. +float           trace_startsolid;
  1120. +float           trace_fraction;
  1121. +vector          trace_endpos;
  1122. +vector          trace_plane_normal;
  1123. +float           trace_plane_dist;
  1124. +entity          trace_ent;
  1125. +float           trace_inopen;
  1126. +float           trace_inwater;
  1127.  
  1128. -entity        msg_entity;                // destination of single entity writes
  1129. +entity          msg_entity;                             // destination of single entity writes
  1130.  
  1131.  //
  1132.  // required prog functions
  1133.  //
  1134. -void()         main;                        // only for testing
  1135. +void()          main;                                           // only for testing
  1136.  
  1137. -void()        StartFrame;
  1138. +void()          StartFrame;
  1139.  
  1140. -void()         PlayerPreThink;
  1141. -void()         PlayerPostThink;
  1142. +void()          PlayerPreThink;
  1143. +void()          PlayerPostThink;
  1144.  
  1145. -void()        ClientKill;
  1146. -void()        ClientConnect;
  1147. -void()         PutClientInServer;        // call after setting the parm1... parms
  1148. -void()        ClientDisconnect;
  1149. +void()          ClientKill;
  1150. +void()          ClientConnect;
  1151. +void()          PutClientInServer;              // call after setting the parm1... parms
  1152. +void()          ClientDisconnect;
  1153.  
  1154. -void()        SetNewParms;            // called when a client first connects to
  1155. +void()          SetNewParms;                    // called when a client first connects to
  1156.                                      // a server. sets parms so they can be
  1157.                                      // saved off for restarts
  1158.  
  1159. -void()        SetChangeParms;            // call to set parms for self so they can
  1160. +void()          SetChangeParms;                 // call to set parms for self so they can
  1161.                                      // be saved for a level transition
  1162.  
  1163.  
  1164.  //================================================
  1165. -void        end_sys_globals;        // flag for structure dumping
  1166. +void            end_sys_globals;                // flag for structure dumping
  1167.  //================================================
  1168.  
  1169.  /*
  1170. @@ -100,115 +100,115 @@
  1171.  //
  1172.  // system fields (*** = do not set in prog code, maintained by C code)
  1173.  //
  1174. -.float        modelindex;        // *** model index in the precached list
  1175. -.vector        absmin, absmax;    // *** origin + mins / maxs
  1176. +.float          modelindex;             // *** model index in the precached list
  1177. +.vector         absmin, absmax; // *** origin + mins / maxs
  1178.  
  1179. -.float        ltime;            // local time for entity
  1180. -.float        movetype;
  1181. -.float        solid;
  1182. -
  1183. -.vector        origin;            // ***
  1184. -.vector        oldorigin;        // ***
  1185. -.vector        velocity;
  1186. -.vector        angles;
  1187. -.vector        avelocity;
  1188. -
  1189. -.vector        punchangle;        // temp angle adjust from damage or recoil
  1190. -
  1191. -.string        classname;        // spawn function
  1192. -.string        model;
  1193. -.float        frame;
  1194. -.float        skin;
  1195. -.float        effects;
  1196. -
  1197. -.vector        mins, maxs;        // bounding box extents reletive to origin
  1198. -.vector        size;            // maxs - mins
  1199. -
  1200. -.void()        touch;
  1201. -.void()        use;
  1202. -.void()        think;
  1203. -.void()        blocked;        // for doors or plats, called when can't push other
  1204. +.float          ltime;                  // local time for entity
  1205. +.float          movetype;
  1206. +.float          solid;
  1207. +
  1208. +.vector         origin;                 // ***
  1209. +.vector         oldorigin;              // ***
  1210. +.vector         velocity;
  1211. +.vector         angles;
  1212. +.vector         avelocity;
  1213. +
  1214. +.vector         punchangle;             // temp angle adjust from damage or recoil
  1215. +
  1216. +.string         classname;              // spawn function
  1217. +.string         model;
  1218. +.float          frame;
  1219. +.float          skin;
  1220. +.float          effects;
  1221. +
  1222. +.vector         mins, maxs;             // bounding box extents reletive to origin
  1223. +.vector         size;                   // maxs - mins
  1224. +
  1225. +.void()         touch;
  1226. +.void()         use;
  1227. +.void()         think;
  1228. +.void()         blocked;                // for doors or plats, called when can't push other
  1229.  
  1230. -.float        nextthink;
  1231. -.entity        groundentity;
  1232. +.float          nextthink;
  1233. +.entity         groundentity;
  1234.  
  1235.  // stats
  1236. -.float        health;
  1237. -.float        frags;
  1238. -.float        weapon;            // one of the IT_SHOTGUN, etc flags
  1239. -.string        weaponmodel;
  1240. -.float        weaponframe;
  1241. -.float        currentammo;
  1242. -.float        ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  1243. +.float          health;
  1244. +.float          frags;
  1245. +.float          weapon;                 // one of the IT_SHOTGUN, etc flags
  1246. +.string         weaponmodel;
  1247. +.float          weaponframe;
  1248. +.float          currentammo;
  1249. +.float          ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  1250.  
  1251. -.float        items;            // bit flags
  1252. +.float          items;                  // bit flags
  1253.  
  1254. -.float        takedamage;
  1255. -.entity        chain;
  1256. -.float        deadflag;
  1257. +.float          takedamage;
  1258. +.entity         chain;
  1259. +.float          deadflag;
  1260.  
  1261. -.vector        view_ofs;            // add to origin to get eye point
  1262. +.vector         view_ofs;                       // add to origin to get eye point
  1263.  
  1264.  
  1265. -.float        button0;        // fire
  1266. -.float        button1;        // use
  1267. -.float        button2;        // jump
  1268. +.float          button0;                // fire
  1269. +.float          button1;                // use
  1270. +.float          button2;                // jump
  1271.  
  1272. -.float        impulse;        // weapon changes
  1273. +.float          impulse;                // weapon changes
  1274.  
  1275. -.float        fixangle;
  1276. -.vector        v_angle;        // view / targeting angle for players
  1277. -.float        idealpitch;        // calculated pitch angle for lookup up slopes
  1278. +.float          fixangle;
  1279. +.vector         v_angle;                // view / targeting angle for players
  1280. +.float          idealpitch;             // calculated pitch angle for lookup up slopes
  1281.  
  1282.  
  1283. -.string        netname;
  1284. +.string         netname;
  1285.  
  1286. -.entity     enemy;
  1287. +.entity         enemy;
  1288.  
  1289. -.float        flags;
  1290. +.float          flags;
  1291.  
  1292. -.float        colormap;
  1293. -.float        team;
  1294. +.float          colormap;
  1295. +.float          team;
  1296.  
  1297. -.float        max_health;        // players maximum health is stored here
  1298. +.float          max_health;             // players maximum health is stored here
  1299.  
  1300. -.float        teleport_time;    // don't back up
  1301. +.float          teleport_time;  // don't back up
  1302.  
  1303. -.float        armortype;        // save this fraction of incoming damage
  1304. -.float        armorvalue;
  1305. +.float          armortype;              // save this fraction of incoming damage
  1306. +.float          armorvalue;
  1307.  
  1308. -.float        waterlevel;        // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
  1309. -.float        watertype;        // a contents value
  1310. +.float          waterlevel;             // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
  1311. +.float          watertype;              // a contents value
  1312.  
  1313. -.float        ideal_yaw;
  1314. -.float        yaw_speed;
  1315. +.float          ideal_yaw;
  1316. +.float          yaw_speed;
  1317.  
  1318. -.entity        aiment;
  1319. +.entity         aiment;
  1320.  
  1321. -.entity     goalentity;        // a movetarget or an enemy
  1322. +.entity         goalentity;             // a movetarget or an enemy
  1323.  
  1324. -.float        spawnflags;
  1325. +.float          spawnflags;
  1326.  
  1327. -.string        target;
  1328. -.string        targetname;
  1329. +.string         target;
  1330. +.string         targetname;
  1331.  
  1332.  // damage is accumulated through a frame. and sent as one single
  1333.  // message, so the super shotgun doesn't generate huge messages
  1334. -.float        dmg_take;
  1335. -.float        dmg_save;
  1336. -.entity        dmg_inflictor;
  1337. +.float          dmg_take;
  1338. +.float          dmg_save;
  1339. +.entity         dmg_inflictor;
  1340.  
  1341. -.entity        owner;        // who launched a missile
  1342. -.vector        movedir;    // mostly for doors, but also used for waterjump
  1343. +.entity         owner;          // who launched a missile
  1344. +.vector         movedir;        // mostly for doors, but also used for waterjump
  1345.  
  1346. -.string        message;        // trigger messages
  1347. +.string         message;                // trigger messages
  1348.  
  1349. -.float        sounds;        // either a cd track number or sound number
  1350. +.float          sounds;         // either a cd track number or sound number
  1351.  
  1352. -.string        noise, noise1, noise2, noise3;    // contains names of wavs to play
  1353. +.string         noise, noise1, noise2, noise3;  // contains names of wavs to play
  1354.  
  1355.  //================================================
  1356. -void        end_sys_fields;            // flag for structure dumping
  1357. +void            end_sys_fields;                 // flag for structure dumping
  1358.  //================================================
  1359.  
  1360.  /*
  1361. @@ -224,330 +224,361 @@
  1362.  // constants
  1363.  //
  1364.  
  1365. -float    FALSE                    = 0;
  1366. -float     TRUE                    = 1;
  1367. +float   FALSE                                   = 0;
  1368. +float   TRUE                                    = 1;
  1369.  
  1370.  // edict.flags
  1371. -float    FL_FLY                    = 1;
  1372. -float    FL_SWIM                    = 2;
  1373. -float    FL_CLIENT                = 8;    // set for all client edicts
  1374. -float    FL_INWATER                = 16;    // for enter / leave water splash
  1375. -float    FL_MONSTER                = 32;
  1376. -float    FL_GODMODE                = 64;    // player cheat
  1377. -float    FL_NOTARGET                = 128;    // player cheat
  1378. -float    FL_ITEM                    = 256;    // extra wide size for bonus items
  1379. -float    FL_ONGROUND                = 512;    // standing on something
  1380. -float    FL_PARTIALGROUND        = 1024;    // not all corners are valid
  1381. -float    FL_WATERJUMP            = 2048;    // player jumping out of water
  1382. -float    FL_JUMPRELEASED            = 4096;    // for jump debouncing
  1383. +float   FL_FLY                                  = 1;
  1384. +float   FL_SWIM                                 = 2;
  1385. +float   FL_CLIENT                               = 8;    // set for all client edicts
  1386. +float   FL_INWATER                              = 16;   // for enter / leave water splash
  1387. +float   FL_MONSTER                              = 32;
  1388. +float   FL_GODMODE                              = 64;   // player cheat
  1389. +float   FL_NOTARGET                             = 128;  // player cheat
  1390. +float   FL_ITEM                                 = 256;  // extra wide size for bonus items
  1391. +float   FL_ONGROUND                             = 512;  // standing on something
  1392. +float   FL_PARTIALGROUND                = 1024; // not all corners are valid
  1393. +float   FL_WATERJUMP                    = 2048; // player jumping out of water
  1394. +float   FL_JUMPRELEASED                 = 4096; // for jump debouncing
  1395.  
  1396.  // edict.movetype values
  1397. -float    MOVETYPE_NONE            = 0;    // never moves
  1398. -//float    MOVETYPE_ANGLENOCLIP    = 1;
  1399. -//float    MOVETYPE_ANGLECLIP        = 2;
  1400. -float    MOVETYPE_WALK            = 3;    // players only
  1401. -float    MOVETYPE_STEP            = 4;    // discrete, not real time unless fall
  1402. -float    MOVETYPE_FLY            = 5;
  1403. -float    MOVETYPE_TOSS            = 6;    // gravity
  1404. -float    MOVETYPE_PUSH            = 7;    // no clip to world, push and crush
  1405. -float    MOVETYPE_NOCLIP            = 8;
  1406. -float    MOVETYPE_FLYMISSILE        = 9;    // fly with extra size against monsters
  1407. -float    MOVETYPE_BOUNCE            = 10;
  1408. -float    MOVETYPE_BOUNCEMISSILE    = 11;    // bounce with extra size
  1409. +float   MOVETYPE_NONE                   = 0;    // never moves
  1410. +//float MOVETYPE_ANGLENOCLIP    = 1;
  1411. +//float MOVETYPE_ANGLECLIP              = 2;
  1412. +float   MOVETYPE_WALK                   = 3;    // players only
  1413. +float   MOVETYPE_STEP                   = 4;    // discrete, not real time unless fall
  1414. +float   MOVETYPE_FLY                    = 5;
  1415. +float   MOVETYPE_TOSS                   = 6;    // gravity
  1416. +float   MOVETYPE_PUSH                   = 7;    // no clip to world, push and crush
  1417. +float   MOVETYPE_NOCLIP                 = 8;
  1418. +float   MOVETYPE_FLYMISSILE             = 9;    // fly with extra size against monsters
  1419. +float   MOVETYPE_BOUNCE                 = 10;
  1420. +float   MOVETYPE_BOUNCEMISSILE  = 11;   // bounce with extra size
  1421.  
  1422.  // edict.solid values
  1423. -float    SOLID_NOT                = 0;    // no interaction with other objects
  1424. -float    SOLID_TRIGGER            = 1;    // touch on edge, but not blocking
  1425. -float    SOLID_BBOX                = 2;    // touch on edge, block
  1426. -float    SOLID_SLIDEBOX            = 3;    // touch on edge, but not an onground
  1427. -float    SOLID_BSP                = 4;    // bsp clip, touch on edge, block
  1428. +float   SOLID_NOT                               = 0;    // no interaction with other objects
  1429. +float   SOLID_TRIGGER                   = 1;    // touch on edge, but not blocking
  1430. +float   SOLID_BBOX                              = 2;    // touch on edge, block
  1431. +float   SOLID_SLIDEBOX                  = 3;    // touch on edge, but not an onground
  1432. +float   SOLID_BSP                               = 4;    // bsp clip, touch on edge, block
  1433.  
  1434.  // range values
  1435. -float    RANGE_MELEE                = 0;
  1436. -float    RANGE_NEAR                = 1;
  1437. -float    RANGE_MID                = 2;
  1438. -float    RANGE_FAR                = 3;
  1439. +float   RANGE_MELEE                             = 0;
  1440. +float   RANGE_NEAR                              = 1;
  1441. +float   RANGE_MID                               = 2;
  1442. +float   RANGE_FAR                               = 3;
  1443.  
  1444.  // deadflag values
  1445.  
  1446. -float    DEAD_NO                    = 0;
  1447. -float    DEAD_DYING                = 1;
  1448. -float    DEAD_DEAD                = 2;
  1449. -float    DEAD_RESPAWNABLE        = 3;
  1450. +float   DEAD_NO                                 = 0;
  1451. +float   DEAD_DYING                              = 1;
  1452. +float   DEAD_DEAD                               = 2;
  1453. +float   DEAD_RESPAWNABLE                = 3;
  1454.  
  1455.  // takedamage values
  1456.  
  1457. -float    DAMAGE_NO                = 0;
  1458. -float    DAMAGE_YES                = 1;
  1459. -float    DAMAGE_AIM                = 2;
  1460. +float   DAMAGE_NO                               = 0;
  1461. +float   DAMAGE_YES                              = 1;
  1462. +float   DAMAGE_AIM                              = 2;
  1463.  
  1464.  // items
  1465. -float    IT_AXE                    = 4096;
  1466. -float    IT_SHOTGUN                = 1;
  1467. -float    IT_SUPER_SHOTGUN        = 2;
  1468. -float    IT_NAILGUN                = 4;
  1469. -float    IT_SUPER_NAILGUN        = 8;
  1470. -float    IT_GRENADE_LAUNCHER        = 16;
  1471. -float    IT_ROCKET_LAUNCHER        = 32;
  1472. -float    IT_LIGHTNING            = 64;
  1473. -float    IT_EXTRA_WEAPON            = 128;
  1474. -
  1475. -float    IT_SHELLS                = 256;
  1476. -float    IT_NAILS                = 512;
  1477. -float    IT_ROCKETS                = 1024;
  1478. -float    IT_CELLS                = 2048;
  1479. -
  1480. -float    IT_ARMOR1                = 8192;
  1481. -float    IT_ARMOR2                = 16384;
  1482. -float    IT_ARMOR3                = 32768;
  1483. -float    IT_SUPERHEALTH            = 65536;
  1484. -
  1485. -float    IT_KEY1                    = 131072;
  1486. -float    IT_KEY2                    = 262144;
  1487. -
  1488. -float    IT_INVISIBILITY            = 524288;
  1489. -float    IT_INVULNERABILITY        = 1048576;
  1490. -float    IT_SUIT                    = 2097152;
  1491. -float    IT_QUAD                    = 4194304;
  1492. +float   IT_AXE                                  = 4096;
  1493. +float   IT_SHOTGUN                              = 1;
  1494. +float   IT_SUPER_SHOTGUN                = 2;
  1495. +float   IT_NAILGUN                              = 4;
  1496. +float   IT_SUPER_NAILGUN                = 8;
  1497. +float   IT_GRENADE_LAUNCHER             = 16;
  1498. +float   IT_ROCKET_LAUNCHER              = 32;
  1499. +float   IT_LIGHTNING                    = 64;
  1500. +float   IT_EXTRA_WEAPON                 = 128;
  1501. +
  1502. +float   IT_SHELLS                               = 256;
  1503. +float   IT_NAILS                                = 512;
  1504. +float   IT_ROCKETS                              = 1024;
  1505. +float   IT_CELLS                                = 2048;
  1506. +
  1507. +float   IT_ARMOR1                               = 8192;
  1508. +float   IT_ARMOR2                               = 16384;
  1509. +float   IT_ARMOR3                               = 32768;
  1510. +float   IT_SUPERHEALTH                  = 65536;
  1511. +
  1512. +float   IT_KEY1                                 = 131072;
  1513. +float   IT_KEY2                                 = 262144;
  1514. +
  1515. +float   IT_INVISIBILITY                 = 524288;
  1516. +float   IT_INVULNERABILITY              = 1048576;
  1517. +float   IT_SUIT                                 = 2097152;
  1518. +float   IT_QUAD                                 = 4194304;
  1519.  
  1520.  // point content values
  1521.  
  1522. -float    CONTENT_EMPTY            = -1;
  1523. -float    CONTENT_SOLID            = -2;
  1524. -float    CONTENT_WATER            = -3;
  1525. -float    CONTENT_SLIME            = -4;
  1526. -float    CONTENT_LAVA            = -5;
  1527. -float    CONTENT_SKY                = -6;
  1528. -
  1529. -float    STATE_TOP        = 0;
  1530. -float    STATE_BOTTOM    = 1;
  1531. -float    STATE_UP        = 2;
  1532. -float    STATE_DOWN        = 3;
  1533. -
  1534. -vector    VEC_ORIGIN = '0 0 0';
  1535. -vector    VEC_HULL_MIN = '-16 -16 -24';
  1536. -vector    VEC_HULL_MAX = '16 16 32';
  1537. +float   CONTENT_EMPTY                   = -1;
  1538. +float   CONTENT_SOLID                   = -2;
  1539. +float   CONTENT_WATER                   = -3;
  1540. +float   CONTENT_SLIME                   = -4;
  1541. +float   CONTENT_LAVA                    = -5;
  1542. +float   CONTENT_SKY                             = -6;
  1543. +
  1544. +float   STATE_TOP               = 0;
  1545. +float   STATE_BOTTOM    = 1;
  1546. +float   STATE_UP                = 2;
  1547. +float   STATE_DOWN              = 3;
  1548. +
  1549. +vector  VEC_ORIGIN = '0 0 0';
  1550. +vector  VEC_HULL_MIN = '-16 -16 -24';
  1551. +vector  VEC_HULL_MAX = '16 16 32';
  1552.  
  1553. -vector    VEC_HULL2_MIN = '-32 -32 -24';
  1554. -vector    VEC_HULL2_MAX = '32 32 64';
  1555. +vector  VEC_HULL2_MIN = '-32 -32 -24';
  1556. +vector  VEC_HULL2_MAX = '32 32 64';
  1557.  
  1558.  // protocol bytes
  1559. -float    SVC_TEMPENTITY        = 23;
  1560. -float    SVC_KILLEDMONSTER    = 27;
  1561. -float    SVC_FOUNDSECRET        = 28;
  1562. -float    SVC_INTERMISSION    = 30;
  1563. -float    SVC_FINALE            = 31;
  1564. -float    SVC_CDTRACK            = 32;
  1565. -float    SVC_SELLSCREEN        = 33;
  1566. -
  1567. -
  1568. -float    TE_SPIKE        = 0;
  1569. -float    TE_SUPERSPIKE    = 1;
  1570. -float    TE_GUNSHOT        = 2;
  1571. -float    TE_EXPLOSION    = 3;
  1572. -float    TE_TAREXPLOSION    = 4;
  1573. -float    TE_LIGHTNING1    = 5;
  1574. -float    TE_LIGHTNING2    = 6;
  1575. -float    TE_WIZSPIKE        = 7;
  1576. -float    TE_KNIGHTSPIKE    = 8;
  1577. -float    TE_LIGHTNING3    = 9;
  1578. -float    TE_LAVASPLASH    = 10;
  1579. -float    TE_TELEPORT        = 11;
  1580. +float   SVC_TEMPENTITY          = 23;
  1581. +float   SVC_KILLEDMONSTER       = 27;
  1582. +float   SVC_FOUNDSECRET         = 28;
  1583. +float   SVC_INTERMISSION        = 30;
  1584. +float   SVC_FINALE                      = 31;
  1585. +float   SVC_CDTRACK                     = 32;
  1586. +float   SVC_SELLSCREEN          = 33;
  1587. +
  1588. +
  1589. +float   TE_SPIKE                = 0;
  1590. +float   TE_SUPERSPIKE   = 1;
  1591. +float   TE_GUNSHOT              = 2;
  1592. +float   TE_EXPLOSION    = 3;
  1593. +float   TE_TAREXPLOSION = 4;
  1594. +float   TE_LIGHTNING1   = 5;
  1595. +float   TE_LIGHTNING2   = 6;
  1596. +float   TE_WIZSPIKE             = 7;
  1597. +float   TE_KNIGHTSPIKE  = 8;
  1598. +float   TE_LIGHTNING3   = 9;
  1599. +float   TE_LAVASPLASH   = 10;
  1600. +float   TE_TELEPORT             = 11;
  1601.  
  1602.  // sound channels
  1603.  // channel 0 never willingly overrides
  1604.  // other channels (1-7) allways override a playing sound on that channel
  1605. -float    CHAN_AUTO        = 0;
  1606. -float    CHAN_WEAPON        = 1;
  1607. -float    CHAN_VOICE        = 2;
  1608. -float    CHAN_ITEM        = 3;
  1609. -float    CHAN_BODY        = 4;
  1610. -
  1611. -float    ATTN_NONE        = 0;
  1612. -float    ATTN_NORM        = 1;
  1613. -float    ATTN_IDLE        = 2;
  1614. -float    ATTN_STATIC        = 3;
  1615. +float   CHAN_AUTO               = 0;
  1616. +float   CHAN_WEAPON             = 1;
  1617. +float   CHAN_VOICE              = 2;
  1618. +float   CHAN_ITEM               = 3;
  1619. +float   CHAN_BODY               = 4;
  1620. +
  1621. +float   ATTN_NONE               = 0;
  1622. +float   ATTN_NORM               = 1;
  1623. +float   ATTN_IDLE               = 2;
  1624. +float   ATTN_STATIC             = 3;
  1625.  
  1626.  // update types
  1627.  
  1628. -float    UPDATE_GENERAL    = 0;
  1629. -float    UPDATE_STATIC    = 1;
  1630. -float    UPDATE_BINARY    = 2;
  1631. -float    UPDATE_TEMP        = 3;
  1632. +float   UPDATE_GENERAL  = 0;
  1633. +float   UPDATE_STATIC   = 1;
  1634. +float   UPDATE_BINARY   = 2;
  1635. +float   UPDATE_TEMP             = 3;
  1636.  
  1637.  // entity effects
  1638.  
  1639. -float    EF_BRIGHTFIELD    = 1;
  1640. -float    EF_MUZZLEFLASH     = 2;
  1641. -float    EF_BRIGHTLIGHT     = 4;
  1642. -float    EF_DIMLIGHT     = 8;
  1643. +float   EF_BRIGHTFIELD  = 1;
  1644. +float   EF_MUZZLEFLASH  = 2;
  1645. +float   EF_BRIGHTLIGHT  = 4;
  1646. +float   EF_DIMLIGHT     = 8;
  1647.  
  1648.  
  1649.  // messages
  1650. -float    MSG_BROADCAST    = 0;        // unreliable to all
  1651. -float    MSG_ONE            = 1;        // reliable to one (msg_entity)
  1652. -float    MSG_ALL            = 2;        // reliable to all
  1653. -float    MSG_INIT        = 3;        // write to the init string
  1654. +float   MSG_BROADCAST   = 0;            // unreliable to all
  1655. +float   MSG_ONE                 = 1;            // reliable to one (msg_entity)
  1656. +float   MSG_ALL                 = 2;            // reliable to all
  1657. +float   MSG_INIT                = 3;            // write to the init string
  1658.  
  1659.  //================================================
  1660.  
  1661.  //
  1662.  // globals
  1663.  //
  1664. -float    movedist;
  1665. -float    gameover;        // set when a rule exits
  1666. +float   movedist;
  1667. +float   gameover;               // set when a rule exits
  1668.  
  1669. -string    string_null;    // null string, nothing should be held here
  1670. -float    empty_float;
  1671. +string  string_null;    // null string, nothing should be held here
  1672. +float   empty_float;
  1673.  
  1674. -entity    newmis;            // launch_spike sets this after spawning it
  1675. +entity  newmis;                 // launch_spike sets this after spawning it
  1676.  
  1677. -entity    activator;        // the entity that activated a trigger or brush
  1678. +entity  activator;              // the entity that activated a trigger or brush
  1679.  
  1680. -entity    damage_attacker;    // set by T_Damage
  1681. -float    framecount;
  1682. +entity  damage_attacker;        // set by T_Damage
  1683. +float   framecount;
  1684.  
  1685. -float        skill;
  1686. +float           skill;
  1687. +
  1688. +float last_player_time;  //CN_PATCH - last player on server (server time).
  1689.  
  1690.  //================================================
  1691.  
  1692.  //
  1693.  // world fields (FIXME: make globals)
  1694.  //
  1695. -.string        wad;
  1696. -.string     map;
  1697. -.float        worldtype;    // 0=medieval 1=metal 2=base
  1698. +.string         wad;
  1699. +.string         map;
  1700. +.float          worldtype;      // 0=medieval 1=metal 2=base
  1701.  
  1702.  //================================================
  1703.  
  1704. -.string        killtarget;
  1705. +.string         killtarget;
  1706.  
  1707.  //
  1708.  // quakeed fields
  1709.  //
  1710. -.float        light_lev;        // not used by game, but parsed by light util
  1711. -.float        style;
  1712. +.float          light_lev;              // not used by game, but parsed by light util
  1713. +.float          style;
  1714.  
  1715.  
  1716.  //
  1717.  // monster ai
  1718.  //
  1719. -.void()        th_stand;
  1720. -.void()        th_walk;
  1721. -.void()        th_run;
  1722. -.void()        th_missile;
  1723. -.void()        th_melee;
  1724. -.void(entity attacker, float damage)        th_pain;
  1725. -.void()        th_die;
  1726. -
  1727. -.entity        oldenemy;        // mad at this player before taking damage
  1728. -
  1729. -.float        speed;
  1730. -
  1731. -.float    lefty;
  1732. -
  1733. -.float    search_time;
  1734. -.float    attack_state;
  1735. -
  1736. -float    AS_STRAIGHT        = 1;
  1737. -float    AS_SLIDING        = 2;
  1738. -float    AS_MELEE        = 3;
  1739. -float    AS_MISSILE        = 4;
  1740. +.void()         th_stand;
  1741. +.void()         th_walk;
  1742. +.void()         th_run;
  1743. +.void()         th_missile;
  1744. +.void()         th_melee;
  1745. +.void(entity attacker, float damage)            th_pain;
  1746. +.void()         th_die;
  1747. +
  1748. +.entity         oldenemy;               // mad at this player before taking damage
  1749. +
  1750. +.float          speed;
  1751. +
  1752. +.float  lefty;
  1753. +
  1754. +.float  search_time;
  1755. +.float  attack_state;
  1756. +
  1757. +float   AS_STRAIGHT             = 1;
  1758. +float   AS_SLIDING              = 2;
  1759. +float   AS_MELEE                = 3;
  1760. +float   AS_MISSILE              = 4;
  1761.  
  1762.  //
  1763.  // player only fields
  1764.  //
  1765. -.float        walkframe;
  1766. -
  1767. -.float         attack_finished;
  1768. -.float        pain_finished;
  1769. +.float          walkframe;
  1770.  
  1771. -.float        invincible_finished;
  1772. -.float        invisible_finished;
  1773. -.float        super_damage_finished;
  1774. -.float        radsuit_finished;
  1775. +.float          attack_finished;
  1776. +.float          pain_finished;
  1777.  
  1778. -.float        invincible_time, invincible_sound;
  1779. -.float        invisible_time, invisible_sound;
  1780. -.float        super_time, super_sound;
  1781. -.float        rad_time;
  1782. -.float        fly_sound;
  1783. +//CN_PATCH - Cameron Newham, Aug 96: relwep variables
  1784. +.float          duration;  // duration of rocket existance
  1785. +.float          use_counter_shot;
  1786. +.float          use_av_shot;
  1787. +.float          use_last_shot;
  1788. +.float          jammed_shot;
  1789. +.float          use_counter_ng;
  1790. +.float          use_av_ng;
  1791. +.float          use_last_ng;
  1792. +.float          jammed_ng;
  1793. +.float          use_counter_sng;
  1794. +.float          use_av_sng;
  1795. +.float          use_last_sng;
  1796. +.float          jammed_sng;
  1797. +.float          use_counter_rocket;
  1798. +.float          use_av_rocket;
  1799. +.float          use_last_rocket;
  1800. +.float          jammed_rocket;
  1801. +.float          use_counter_gl;
  1802. +.float          use_av_gl;
  1803. +.float          use_last_gl;
  1804. +.float          jammed_gl;
  1805. +.float          use_counter_ss;
  1806. +.float          use_av_ss;
  1807. +.float          use_last_ss;
  1808. +.float          jammed_ss;
  1809. +.float          jammed_death; //0 = none  1 = gl  2 = rl
  1810. +//END CN_PATCH
  1811. +
  1812. +.float          invincible_finished;
  1813. +.float          invisible_finished;
  1814. +.float          super_damage_finished;
  1815. +.float          radsuit_finished;
  1816. +
  1817. +.float          invincible_time, invincible_sound;
  1818. +.float          invisible_time, invisible_sound;
  1819. +.float          super_time, super_sound;
  1820. +.float          rad_time;
  1821. +.float          fly_sound;
  1822.  
  1823. -.float        axhitme;
  1824. +.float          axhitme;
  1825.  
  1826. -.float        show_hostile;    // set to time+0.2 whenever a client fires a
  1827. +.float          show_hostile;   // set to time+0.2 whenever a client fires a
  1828.                              // weapon or takes damage.  Used to alert
  1829.                              // monsters that otherwise would let the player go
  1830. -.float        jump_flag;        // player jump flag
  1831. -.float        swim_flag;        // player swimming sound flag
  1832. -.float        air_finished;    // when time > air_finished, start drowning
  1833. -.float        bubble_count;    // keeps track of the number of bubbles
  1834. -.string        deathtype;        // keeps track of how the player died
  1835. +.float          jump_flag;              // player jump flag
  1836. +.float          swim_flag;              // player swimming sound flag
  1837. +.float          air_finished;   // when time > air_finished, start drowning
  1838. +.float          bubble_count;   // keeps track of the number of bubbles
  1839. +.string         deathtype;              // keeps track of how the player died
  1840.  
  1841.  //
  1842.  // object stuff
  1843.  //
  1844. -.string        mdl;
  1845. -.vector        mangle;            // angle at start
  1846. +.string         mdl;
  1847. +.vector         mangle;                 // angle at start
  1848.  
  1849. -.vector        oldorigin;        // only used by secret door
  1850. +.vector         oldorigin;              // only used by secret door
  1851.  
  1852. -.float        t_length, t_width;
  1853. +.float          t_length, t_width;
  1854.  
  1855.  
  1856.  //
  1857.  // doors, etc
  1858.  //
  1859. -.vector        dest, dest1, dest2;
  1860. -.float        wait;            // time from firing to restarting
  1861. -.float        delay;            // time from activation to firing
  1862. -.entity        trigger_field;    // door's trigger entity
  1863. -.string        noise4;
  1864. +.vector         dest, dest1, dest2;
  1865. +.float          wait;                   // time from firing to restarting
  1866. +.float          delay;                  // time from activation to firing
  1867. +.entity         trigger_field;  // door's trigger entity
  1868. +.string         noise4;
  1869.  
  1870.  //
  1871.  // monsters
  1872.  //
  1873. -.float         pausetime;
  1874. -.entity     movetarget;
  1875. +.float          pausetime;
  1876. +.entity         movetarget;
  1877.  
  1878.  
  1879.  //
  1880.  // doors
  1881.  //
  1882. -.float        aflag;
  1883. -.float        dmg;            // damage done by door when hit
  1884. +.float          aflag;
  1885. +.float          dmg;                    // damage done by door when hit
  1886.      
  1887.  //
  1888.  // misc
  1889.  //
  1890. -.float        cnt;             // misc flag
  1891. +.float          cnt;                    // misc flag
  1892.      
  1893.  //
  1894.  // subs
  1895.  //
  1896. -.void()        think1;
  1897. -.vector        finaldest, finalangle;
  1898. +.void()         think1;
  1899. +.vector         finaldest, finalangle;
  1900.  
  1901.  //
  1902.  // triggers
  1903.  //
  1904. -.float        count;            // for counting triggers
  1905. +.float          count;                  // for counting triggers
  1906.  
  1907.  
  1908.  //
  1909.  // plats / doors / buttons
  1910.  //
  1911. -.float        lip;
  1912. -.float        state;
  1913. -.vector        pos1, pos2;        // top and bottom positions
  1914. -.float        height;
  1915. +.float          lip;
  1916. +.float          state;
  1917. +.vector         pos1, pos2;             // top and bottom positions
  1918. +.float          height;
  1919.  
  1920.  //
  1921.  // sounds
  1922.  //
  1923. -.float        waitmin, waitmax;
  1924. -.float        distance;
  1925. -.float        volume;
  1926. +.float          waitmin, waitmax;
  1927. +.float          distance;
  1928. +.float          volume;
  1929.  
  1930.  
  1931.  
  1932. @@ -559,110 +590,110 @@
  1933.  // builtin functions
  1934.  //
  1935.  
  1936. -void(vector ang)    makevectors        = #1;        // sets v_forward, etc globals
  1937. -void(entity e, vector o) setorigin    = #2;
  1938. -void(entity e, string m) setmodel    = #3;        // set movetype and solid first
  1939. +void(vector ang)        makevectors             = #1;           // sets v_forward, etc globals
  1940. +void(entity e, vector o) setorigin      = #2;
  1941. +void(entity e, string m) setmodel       = #3;           // set movetype and solid first
  1942.  void(entity e, vector min, vector max) setsize = #4;
  1943.  // #5 was removed
  1944. -void() break                        = #6;
  1945. -float() random                        = #7;        // returns 0 - 1
  1946. +void() break                                            = #6;
  1947. +float() random                                          = #7;           // returns 0 - 1
  1948.  void(entity e, float chan, string samp, float vol, float atten) sound = #8;
  1949. -vector(vector v) normalize            = #9;
  1950. -void(string e) error                = #10;
  1951. -void(string e) objerror                = #11;
  1952. -float(vector v) vlen                = #12;
  1953. -float(vector v) vectoyaw            = #13;
  1954. -entity() spawn                        = #14;
  1955. -void(entity e) remove                = #15;
  1956. +vector(vector v) normalize                      = #9;
  1957. +void(string e) error                            = #10;
  1958. +void(string e) objerror                         = #11;
  1959. +float(vector v) vlen                            = #12;
  1960. +float(vector v) vectoyaw                        = #13;
  1961. +entity() spawn                                          = #14;
  1962. +void(entity e) remove                           = #15;
  1963.  
  1964.  // sets trace_* globals
  1965.  // nomonsters can be:
  1966.  // An entity will also be ignored for testing if forent == test,
  1967.  // forent->owner == test, or test->owner == forent
  1968.  // a forent of world is ignored
  1969. -void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;    
  1970. +void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;    
  1971.  
  1972. -entity() checkclient                = #17;    // returns a client to look for
  1973. +entity() checkclient                            = #17;  // returns a client to look for
  1974.  entity(entity start, .string fld, string match) find = #18;
  1975. -string(string s) precache_sound        = #19;
  1976. -string(string s) precache_model        = #20;
  1977. +string(string s) precache_sound         = #19;
  1978. +string(string s) precache_model         = #20;
  1979.  void(entity client, string s)stuffcmd = #21;
  1980.  entity(vector org, float rad) findradius = #22;
  1981. -void(string s) bprint                = #23;
  1982. +void(string s) bprint                           = #23;
  1983.  void(entity client, string s) sprint = #24;
  1984. -void(string s) dprint                = #25;
  1985. -string(float f) ftos                = #26;
  1986. -string(vector v) vtos                = #27;
  1987. -void() coredump                        = #28;        // prints all edicts
  1988. -void() traceon                        = #29;        // turns statment trace on
  1989. -void() traceoff                        = #30;
  1990. -void(entity e) eprint                = #31;        // prints an entire edict
  1991. -float(float yaw, float dist) walkmove    = #32;    // returns TRUE or FALSE
  1992. +void(string s) dprint                           = #25;
  1993. +string(float f) ftos                            = #26;
  1994. +string(vector v) vtos                           = #27;
  1995. +void() coredump                                         = #28;          // prints all edicts
  1996. +void() traceon                                          = #29;          // turns statment trace on
  1997. +void() traceoff                                         = #30;
  1998. +void(entity e) eprint                           = #31;          // prints an entire edict
  1999. +float(float yaw, float dist) walkmove   = #32;  // returns TRUE or FALSE
  2000.  // #33 was removed
  2001. -float(float yaw, float dist) droptofloor= #34;    // TRUE if landed on floor
  2002. +float(float yaw, float dist) droptofloor= #34;  // TRUE if landed on floor
  2003.  void(float style, string value) lightstyle = #35;
  2004. -float(float v) rint                    = #36;        // round to nearest int
  2005. -float(float v) floor                = #37;        // largest integer <= v
  2006. -float(float v) ceil                    = #38;        // smallest integer >= v
  2007. +float(float v) rint                                     = #36;          // round to nearest int
  2008. +float(float v) floor                            = #37;          // largest integer <= v
  2009. +float(float v) ceil                                     = #38;          // smallest integer >= v
  2010.  // #39 was removed
  2011. -float(entity e) checkbottom            = #40;        // true if self is on ground
  2012. -float(vector v) pointcontents        = #41;        // returns a CONTENT_*
  2013. +float(entity e) checkbottom                     = #40;          // true if self is on ground
  2014. +float(vector v) pointcontents           = #41;          // returns a CONTENT_*
  2015.  // #42 was removed
  2016.  float(float f) fabs = #43;
  2017. -vector(entity e, float speed) aim = #44;        // returns the shooting vector
  2018. -float(string s) cvar = #45;                        // return cvar.value
  2019. -void(string s) localcmd = #46;                    // put string into local que
  2020. -entity(entity e) nextent = #47;                    // for looping through all ents
  2021. +vector(entity e, float speed) aim = #44;                // returns the shooting vector
  2022. +float(string s) cvar = #45;                                             // return cvar.value
  2023. +void(string s) localcmd = #46;                                  // put string into local que
  2024. +entity(entity e) nextent = #47;                                 // for looping through all ents
  2025.  void(vector o, vector d, float color, float count) particle = #48;// start a particle effect
  2026. -void() ChangeYaw = #49;                        // turn towards self.ideal_yaw
  2027. +void() ChangeYaw = #49;                                         // turn towards self.ideal_yaw
  2028.                                              // at self.yaw_speed
  2029.  // #50 was removed
  2030. -vector(vector v) vectoangles            = #51;
  2031. +vector(vector v) vectoangles                    = #51;
  2032.  
  2033.  //
  2034.  // direct client message generation
  2035.  //
  2036. -void(float to, float f) WriteByte        = #52;
  2037. -void(float to, float f) WriteChar        = #53;
  2038. -void(float to, float f) WriteShort        = #54;
  2039. -void(float to, float f) WriteLong        = #55;
  2040. -void(float to, float f) WriteCoord        = #56;
  2041. -void(float to, float f) WriteAngle        = #57;
  2042. -void(float to, string s) WriteString    = #58;
  2043. -void(float to, entity s) WriteEntity    = #59;
  2044. +void(float to, float f) WriteByte               = #52;
  2045. +void(float to, float f) WriteChar               = #53;
  2046. +void(float to, float f) WriteShort              = #54;
  2047. +void(float to, float f) WriteLong               = #55;
  2048. +void(float to, float f) WriteCoord              = #56;
  2049. +void(float to, float f) WriteAngle              = #57;
  2050. +void(float to, string s) WriteString    = #58;
  2051. +void(float to, entity s) WriteEntity    = #59;
  2052.  
  2053.  //
  2054.  // broadcast client message generation
  2055.  //
  2056.  
  2057. -// void(float f) bWriteByte        = #59;
  2058. -// void(float f) bWriteChar        = #60;
  2059. -// void(float f) bWriteShort        = #61;
  2060. -// void(float f) bWriteLong        = #62;
  2061. -// void(float f) bWriteCoord        = #63;
  2062. -// void(float f) bWriteAngle        = #64;
  2063. -// void(string s) bWriteString    = #65;
  2064. +// void(float f) bWriteByte             = #59;
  2065. +// void(float f) bWriteChar             = #60;
  2066. +// void(float f) bWriteShort            = #61;
  2067. +// void(float f) bWriteLong             = #62;
  2068. +// void(float f) bWriteCoord            = #63;
  2069. +// void(float f) bWriteAngle            = #64;
  2070. +// void(string s) bWriteString  = #65;
  2071.  // void(entity e) bWriteEntity = #66;
  2072.  
  2073. -void(float step) movetogoal                = #67;
  2074. +void(float step) movetogoal                             = #67;
  2075.  
  2076. -string(string s) precache_file        = #68;    // no effect except for -copy
  2077. -void(entity e) makestatic        = #69;
  2078. +string(string s) precache_file          = #68;  // no effect except for -copy
  2079. +void(entity e) makestatic               = #69;
  2080.  void(string s) changelevel = #70;
  2081.  
  2082.  //#71 was removed
  2083.  
  2084. -void(string var, string val) cvar_set = #72;    // sets cvar.value
  2085. +void(string var, string val) cvar_set = #72;    // sets cvar.value
  2086.  
  2087. -void(entity client, string s) centerprint = #73;    // sprint, but in middle
  2088. +void(entity client, string s) centerprint = #73;        // sprint, but in middle
  2089.  
  2090.  void(vector pos, string samp, float vol, float atten) ambientsound = #74;
  2091.  
  2092. -string(string s) precache_model2    = #75;        // registered version only
  2093. -string(string s) precache_sound2    = #76;        // registered version only
  2094. -string(string s) precache_file2        = #77;        // registered version only
  2095. +string(string s) precache_model2        = #75;          // registered version only
  2096. +string(string s) precache_sound2        = #76;          // registered version only
  2097. +string(string s) precache_file2         = #77;          // registered version only
  2098.  
  2099. -void(entity e) setspawnparms        = #78;        // set parm1... to the
  2100. +void(entity e) setspawnparms            = #78;          // set parm1... to the
  2101.                                                  // values at level start
  2102.                                                  // for coop respawn
  2103.  
  2104. @@ -681,7 +712,7 @@
  2105.  void() SUB_Remove;
  2106.  
  2107.  //
  2108. -//    combat.qc
  2109. +//      combat.qc
  2110.  //
  2111.  void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
  2112.  
  2113. diff -ur --new-file v101qc/items.qc progs/items.qc
  2114. --- v101qc/items.qc    Sun Aug 18 02:29:36 1996
  2115. +++ progs/items.qc    Wed Aug 21 13:15:08 1996
  2116. @@ -5,9 +5,9 @@
  2117.  
  2118.  void() SUB_regen =
  2119.  {
  2120. -    self.model = self.mdl;        // restore original model
  2121. -    self.solid = SOLID_TRIGGER;    // allow it to be touched again
  2122. -    sound (self, CHAN_VOICE, "items/itembk2.wav", 1, ATTN_NORM);    // play respawn sound
  2123. +    self.model = self.mdl;          // restore original model
  2124. +    self.solid = SOLID_TRIGGER;     // allow it to be touched again
  2125. +    sound (self, CHAN_VOICE, "items/itembk2.wav", 1, ATTN_NORM);    // play respawn sound
  2126.      setorigin (self, self.origin);
  2127.  };
  2128.  
  2129. @@ -35,12 +35,12 @@
  2130.  */
  2131.  void() PlaceItem =
  2132.  {
  2133. -    local float    oldz;
  2134. +    local float     oldz;
  2135.  
  2136. -    self.mdl = self.model;        // so it can be restored on respawn
  2137. -    self.flags = FL_ITEM;        // make extra wide
  2138. +    self.mdl = self.model;          // so it can be restored on respawn
  2139. +    self.flags = FL_ITEM;           // make extra wide
  2140.      self.solid = SOLID_TRIGGER;
  2141. -    self.movetype = MOVETYPE_TOSS;    
  2142. +    self.movetype = MOVETYPE_TOSS;  
  2143.      self.velocity = '0 0 0';
  2144.      self.origin_z = self.origin_z + 6;
  2145.      oldz = self.origin_z;
  2146. @@ -63,7 +63,7 @@
  2147.  */
  2148.  void() StartItem =
  2149.  {
  2150. -    self.nextthink = time + 0.2;    // items start after other solids
  2151. +    self.nextthink = time + 0.2;    // items start after other solids
  2152.      self.think = PlaceItem;
  2153.  };
  2154.  
  2155. @@ -103,14 +103,14 @@
  2156.  one point per second.
  2157.  */
  2158.  
  2159. -float    H_ROTTEN = 1;
  2160. -float    H_MEGA = 2;
  2161. -.float    healamount, healtype;
  2162. +float   H_ROTTEN = 1;
  2163. +float   H_MEGA = 2;
  2164. +.float  healamount, healtype;
  2165.  void() health_touch;
  2166.  void() item_megahealth_rot;
  2167.  
  2168.  void() item_health =
  2169. -{    
  2170. +{       
  2171.      self.touch = health_touch;
  2172.  
  2173.      if (self.spawnflags & H_ROTTEN)
  2174. @@ -149,8 +149,8 @@
  2175.  
  2176.  void() health_touch =
  2177.  {
  2178. -    local    float amount;
  2179. -    local    string    s;
  2180. +    local   float amount;
  2181. +    local   string  s;
  2182.      
  2183.      if (other.classname != "player")
  2184.          return;
  2185. @@ -191,7 +191,7 @@
  2186.      }
  2187.      else
  2188.      {
  2189. -        if (deathmatch != 2)        // deathmatch 2 is the silly old rules
  2190. +        if (deathmatch != 2)            // deathmatch 2 is the silly old rules
  2191.          {
  2192.              if (deathmatch)
  2193.                  self.nextthink = time + 20;
  2194. @@ -200,8 +200,8 @@
  2195.      }
  2196.      
  2197.      activator = other;
  2198. -    SUB_UseTargets();                // fire all targets / killtargets
  2199. -};    
  2200. +    SUB_UseTargets();                               // fire all targets / killtargets
  2201. +};      
  2202.  
  2203.  void() item_megahealth_rot =
  2204.  {
  2205. @@ -218,7 +218,7 @@
  2206.  // just blindly subtract the flag off
  2207.      other.items = other.items - (other.items & IT_SUPERHEALTH);
  2208.      
  2209. -    if (deathmatch == 1)    // deathmatch 2 is silly old rules
  2210. +    if (deathmatch == 1)    // deathmatch 2 is silly old rules
  2211.      {
  2212.          self.nextthink = time + 20;
  2213.          self.think = SUB_regen;
  2214. @@ -237,7 +237,7 @@
  2215.  
  2216.  void() armor_touch =
  2217.  {
  2218. -    local    float    type, value, bit;
  2219. +    local   float   type, value, bit;
  2220.      
  2221.      if (other.health <= 0)
  2222.          return;
  2223. @@ -281,7 +281,7 @@
  2224.      stuffcmd (other, "bf\n");
  2225.      
  2226.      activator = other;
  2227. -    SUB_UseTargets();                // fire all targets / killtargets
  2228. +    SUB_UseTargets();                               // fire all targets / killtargets
  2229.  };
  2230.  
  2231.  
  2232. @@ -338,10 +338,10 @@
  2233.          other.ammo_shells = 100;
  2234.      if (other.ammo_nails > 200)
  2235.          other.ammo_nails = 200;
  2236. -    if (other.ammo_rockets > 100)
  2237. -        other.ammo_rockets = 100;        
  2238. +    if (other.ammo_rockets > 20)
  2239. +        other.ammo_rockets = 20; //CN_PATCH changed 100 to 20
  2240.      if (other.ammo_cells > 100)
  2241. -        other.ammo_cells = 100;        
  2242. +        other.ammo_cells = 100;         
  2243.  };
  2244.  
  2245.  
  2246. @@ -368,7 +368,7 @@
  2247.  
  2248.  Deathmatch weapon change rules for picking up a weapon
  2249.  
  2250. -.float        ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  2251. +.float          ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  2252.  =============
  2253.  */
  2254.  void(float old, float new) Deathmatch_Weapon =
  2255. @@ -391,14 +391,14 @@
  2256.  
  2257.  void() weapon_touch =
  2258.  {
  2259. -    local    float    hadammo, best, new, old;
  2260. -    local    entity    stemp;
  2261. -    local    float    leave;
  2262. +    local   float   hadammo, best, new, old;
  2263. +    local   entity  stemp;
  2264. +    local   float   leave;
  2265.  
  2266.      if (!(other.flags & FL_CLIENT))
  2267.          return;
  2268.  
  2269. -// if the player was using his best weapon, change up to the new one if better        
  2270. +// if the player was using his best weapon, change up to the new one if better          
  2271.      stemp = self;
  2272.      self = other;
  2273.      best = W_BestWeapon();
  2274. @@ -413,7 +413,7 @@
  2275.      {
  2276.          if (leave && (other.items & IT_NAILGUN) )
  2277.              return;
  2278. -        hadammo = other.ammo_nails;            
  2279. +        hadammo = other.ammo_nails;                     
  2280.          new = IT_NAILGUN;
  2281.          other.ammo_nails = other.ammo_nails + 30;
  2282.      }
  2283. @@ -421,7 +421,7 @@
  2284.      {
  2285.          if (leave && (other.items & IT_SUPER_NAILGUN) )
  2286.              return;
  2287. -        hadammo = other.ammo_rockets;            
  2288. +        hadammo = other.ammo_rockets;                   
  2289.          new = IT_SUPER_NAILGUN;
  2290.          other.ammo_nails = other.ammo_nails + 30;
  2291.      }
  2292. @@ -429,7 +429,7 @@
  2293.      {
  2294.          if (leave && (other.items & IT_SUPER_SHOTGUN) )
  2295.              return;
  2296. -        hadammo = other.ammo_rockets;            
  2297. +        hadammo = other.ammo_rockets;                   
  2298.          new = IT_SUPER_SHOTGUN;
  2299.          other.ammo_shells = other.ammo_shells + 5;
  2300.      }
  2301. @@ -437,7 +437,7 @@
  2302.      {
  2303.          if (leave && (other.items & IT_ROCKET_LAUNCHER) )
  2304.              return;
  2305. -        hadammo = other.ammo_rockets;            
  2306. +        hadammo = other.ammo_rockets;                   
  2307.          new = IT_ROCKET_LAUNCHER;
  2308.          other.ammo_rockets = other.ammo_rockets + 5;
  2309.      }
  2310. @@ -445,7 +445,7 @@
  2311.      {
  2312.          if (leave && (other.items & IT_GRENADE_LAUNCHER) )
  2313.              return;
  2314. -        hadammo = other.ammo_rockets;            
  2315. +        hadammo = other.ammo_rockets;                   
  2316.          new = IT_GRENADE_LAUNCHER;
  2317.          other.ammo_rockets = other.ammo_rockets + 5;
  2318.      }
  2319. @@ -453,7 +453,7 @@
  2320.      {
  2321.          if (leave && (other.items & IT_LIGHTNING) )
  2322.              return;
  2323. -        hadammo = other.ammo_rockets;            
  2324. +        hadammo = other.ammo_rockets;                   
  2325.          new = IT_LIGHTNING;
  2326.          other.ammo_cells = other.ammo_cells + 15;
  2327.      }
  2328. @@ -496,7 +496,7 @@
  2329.      self.think = SUB_regen;
  2330.      
  2331.      activator = other;
  2332. -    SUB_UseTargets();                // fire all targets / killtargets
  2333. +    SUB_UseTargets();                               // fire all targets / killtargets
  2334.  };
  2335.  
  2336.  
  2337. @@ -596,15 +596,15 @@
  2338.  
  2339.  void() ammo_touch =
  2340.  {
  2341. -local entity    stemp;
  2342. -local float        best;
  2343. +local entity    stemp;
  2344. +local float             best;
  2345.  
  2346.      if (other.classname != "player")
  2347.          return;
  2348.      if (other.health <= 0)
  2349.          return;
  2350.  
  2351. -// if the player was using his best weapon, change up to the new one if better        
  2352. +// if the player was using his best weapon, change up to the new one if better          
  2353.      stemp = self;
  2354.      self = other;
  2355.      best = W_BestWeapon();
  2356. @@ -627,15 +627,15 @@
  2357.          other.ammo_nails = other.ammo_nails + self.aflag;
  2358.      }
  2359.  
  2360. -//    rockets
  2361. +//      rockets
  2362.      if (self.weapon == 3)
  2363.      {
  2364. -        if (other.ammo_rockets >= 100)
  2365. +        if (other.ammo_rockets >= 20)  //CN_PATCH changed 100 to 20
  2366.              return;
  2367.          other.ammo_rockets = other.ammo_rockets + self.aflag;
  2368.      }
  2369.  
  2370. -//    cells
  2371. +//      cells
  2372.      if (self.weapon == 4)
  2373.      {
  2374.          if (other.ammo_cells >= 200)
  2375. @@ -678,7 +678,7 @@
  2376.      self.think = SUB_regen;
  2377.  
  2378.      activator = other;
  2379. -    SUB_UseTargets();                // fire all targets / killtargets
  2380. +    SUB_UseTargets();                               // fire all targets / killtargets
  2381.  };
  2382.  
  2383.  
  2384. @@ -869,8 +869,8 @@
  2385.  
  2386.  void() key_touch =
  2387.  {
  2388. -local entity    stemp;
  2389. -local float        best;
  2390. +local entity    stemp;
  2391. +local float             best;
  2392.  
  2393.      if (other.classname != "player")
  2394.          return;
  2395. @@ -888,13 +888,13 @@
  2396.      other.items = other.items | self.items;
  2397.  
  2398.      if (!coop)
  2399. -    {    
  2400. +    {       
  2401.          self.solid = SOLID_NOT;
  2402.          self.model = string_null;
  2403.      }
  2404.  
  2405.      activator = other;
  2406. -    SUB_UseTargets();                // fire all targets / killtargets
  2407. +    SUB_UseTargets();                               // fire all targets / killtargets
  2408.  };
  2409.  
  2410.  
  2411. @@ -1005,8 +1005,8 @@
  2412.  
  2413.  void() sigil_touch =
  2414.  {
  2415. -local entity    stemp;
  2416. -local float        best;
  2417. +local entity    stemp;
  2418. +local float             best;
  2419.  
  2420.      if (other.classname != "player")
  2421.          return;
  2422. @@ -1020,10 +1020,10 @@
  2423.      self.solid = SOLID_NOT;
  2424.      self.model = string_null;
  2425.      serverflags = serverflags | (self.spawnflags & 15);
  2426. -    self.classname = "";        // so rune doors won't find it
  2427. +    self.classname = "";            // so rune doors won't find it
  2428.      
  2429.      activator = other;
  2430. -    SUB_UseTargets();                // fire all targets / killtargets
  2431. +    SUB_UseTargets();                               // fire all targets / killtargets
  2432.  };
  2433.  
  2434.  
  2435. @@ -1078,8 +1078,8 @@
  2436.  
  2437.  void() powerup_touch =
  2438.  {
  2439. -local entity    stemp;
  2440. -local float        best;
  2441. +local entity    stemp;
  2442. +local float             best;
  2443.  
  2444.      if (other.classname != "player")
  2445.          return;
  2446. @@ -1101,7 +1101,7 @@
  2447.              self.nextthink = time + 60;
  2448.          
  2449.          self.think = SUB_regen;
  2450. -    }    
  2451. +    }       
  2452.  
  2453.      sound (other, CHAN_VOICE, self.noise, 1, ATTN_NORM);
  2454.      stuffcmd (other, "bf\n");
  2455. @@ -1132,10 +1132,10 @@
  2456.      {
  2457.          other.super_time = 1;
  2458.          other.super_damage_finished = time + 30;
  2459. -    }    
  2460. +    }       
  2461.  
  2462.      activator = other;
  2463. -    SUB_UseTargets();                // fire all targets / killtargets
  2464. +    SUB_UseTargets();                               // fire all targets / killtargets
  2465.  };
  2466.  
  2467.  
  2468. @@ -1229,16 +1229,16 @@
  2469.  
  2470.  void() BackpackTouch =
  2471.  {
  2472. -    local string    s;
  2473. -    local    float    best;
  2474. -    local        entity    stemp;
  2475. +    local string    s;
  2476. +    local   float   best;
  2477. +    local           entity  stemp;
  2478.      
  2479.      if (other.classname != "player")
  2480.          return;
  2481.      if (other.health <= 0)
  2482.          return;
  2483.          
  2484. -// if the player was using his best weapon, change up to the new one if better        
  2485. +// if the player was using his best weapon, change up to the new one if better          
  2486.      stemp = self;
  2487.      self = other;
  2488.      best = W_BestWeapon();
  2489. @@ -1309,10 +1309,10 @@
  2490.  */
  2491.  void() DropBackpack =
  2492.  {
  2493. -    local entity    item;
  2494. +    local entity    item;
  2495.  
  2496.      if (!(self.ammo_shells + self.ammo_nails + self.ammo_rockets + self.ammo_cells))
  2497. -        return;    // nothing in it
  2498. +        return; // nothing in it
  2499.  
  2500.      item = spawn();
  2501.      item.origin = self.origin - '0 0 24';
  2502. @@ -1335,6 +1335,6 @@
  2503.      setsize (item, '-16 -16 0', '16 16 56');
  2504.      item.touch = BackpackTouch;
  2505.      
  2506. -    item.nextthink = time + 120;    // remove after 2 minutes
  2507. +    item.nextthink = time + 120;    // remove after 2 minutes
  2508.      item.think = SUB_Remove;
  2509.  };
  2510. diff -ur --new-file v101qc/player.qc progs/player.qc
  2511. --- v101qc/player.qc    Sun Aug 18 02:29:36 1996
  2512. +++ progs/player.qc    Thu Aug 22 14:04:40 1996
  2513. @@ -11,7 +11,7 @@
  2514.  
  2515.  $cd /raid/quake/id1/models/player_4
  2516.  $origin 0 -6 24
  2517. -$base base        
  2518. +$base base              
  2519.  $skin skin
  2520.  
  2521.  //
  2522. @@ -88,7 +88,7 @@
  2523.  
  2524.  void() player_run;
  2525.  
  2526. -void()    player_stand1 =[    $axstnd1,    player_stand1    ]
  2527. +void()  player_stand1 =[        $axstnd1,       player_stand1   ]
  2528.  {
  2529.      self.weaponframe=0;
  2530.      if (self.velocity_x || self.velocity_y)
  2531. @@ -110,10 +110,10 @@
  2532.              self.walkframe = 0;
  2533.          self.frame = $stand1 + self.walkframe;
  2534.      }
  2535. -    self.walkframe = self.walkframe + 1;    
  2536. +    self.walkframe = self.walkframe + 1;    
  2537.  };
  2538.  
  2539. -void()    player_run =[    $rockrun1,    player_run    ]
  2540. +void()  player_run =[   $rockrun1,      player_run      ]
  2541.  {
  2542.      self.weaponframe=0;
  2543.      if (!self.velocity_x && !self.velocity_y)
  2544. @@ -139,52 +139,78 @@
  2545.  };
  2546.  
  2547.  
  2548. -void()    player_shot1 =    [$shotatt1, player_shot2    ] {self.weaponframe=1;
  2549. +void()  player_shot1 =  [$shotatt1, player_shot2        ] {self.weaponframe=1;
  2550.  self.effects = self.effects | EF_MUZZLEFLASH;};
  2551. -void()    player_shot2 =    [$shotatt2, player_shot3    ] {self.weaponframe=2;};
  2552. -void()    player_shot3 =    [$shotatt3, player_shot4    ] {self.weaponframe=3;};
  2553. -void()    player_shot4 =    [$shotatt4, player_shot5    ] {self.weaponframe=4;};
  2554. -void()    player_shot5 =    [$shotatt5, player_shot6    ] {self.weaponframe=5;};
  2555. -void()    player_shot6 =    [$shotatt6, player_run    ] {self.weaponframe=6;};
  2556. -
  2557. -void()    player_axe1 =    [$axatt1, player_axe2    ] {self.weaponframe=1;};
  2558. -void()    player_axe2 =    [$axatt2, player_axe3    ] {self.weaponframe=2;};
  2559. -void()    player_axe3 =    [$axatt3, player_axe4    ] {self.weaponframe=3;W_FireAxe();};
  2560. -void()    player_axe4 =    [$axatt4, player_run    ] {self.weaponframe=4;};
  2561. -
  2562. -void()    player_axeb1 =    [$axattb1, player_axeb2    ] {self.weaponframe=5;};
  2563. -void()    player_axeb2 =    [$axattb2, player_axeb3    ] {self.weaponframe=6;};
  2564. -void()    player_axeb3 =    [$axattb3, player_axeb4    ] {self.weaponframe=7;W_FireAxe();};
  2565. -void()    player_axeb4 =    [$axattb4, player_run    ] {self.weaponframe=8;};
  2566. -
  2567. -void()    player_axec1 =    [$axattc1, player_axec2    ] {self.weaponframe=1;};
  2568. -void()    player_axec2 =    [$axattc2, player_axec3    ] {self.weaponframe=2;};
  2569. -void()    player_axec3 =    [$axattc3, player_axec4    ] {self.weaponframe=3;W_FireAxe();};
  2570. -void()    player_axec4 =    [$axattc4, player_run    ] {self.weaponframe=4;};
  2571. -
  2572. -void()    player_axed1 =    [$axattd1, player_axed2    ] {self.weaponframe=5;};
  2573. -void()    player_axed2 =    [$axattd2, player_axed3    ] {self.weaponframe=6;};
  2574. -void()    player_axed3 =    [$axattd3, player_axed4    ] {self.weaponframe=7;W_FireAxe();};
  2575. -void()    player_axed4 =    [$axattd4, player_run    ] {self.weaponframe=8;};
  2576. +void()  player_shot2 =  [$shotatt2, player_shot3        ] {self.weaponframe=2;};
  2577. +void()  player_shot3 =  [$shotatt3, player_shot4        ] {self.weaponframe=3;};
  2578. +void()  player_shot4 =  [$shotatt4, player_shot5        ] {self.weaponframe=4;};
  2579. +void()  player_shot5 =  [$shotatt5, player_shot6        ] {self.weaponframe=5;};
  2580. +void()  player_shot6 =  [$shotatt6, player_run  ] {self.weaponframe=6;};
  2581. +
  2582. +void()  player_axe1 =   [$axatt1, player_axe2   ] {self.weaponframe=1;};
  2583. +void()  player_axe2 =   [$axatt2, player_axe3   ] {self.weaponframe=2;};
  2584. +void()  player_axe3 =   [$axatt3, player_axe4   ] {self.weaponframe=3;W_FireAxe();};
  2585. +void()  player_axe4 =   [$axatt4, player_run    ] {self.weaponframe=4;};
  2586. +
  2587. +void()  player_axeb1 =  [$axattb1, player_axeb2 ] {self.weaponframe=5;};
  2588. +void()  player_axeb2 =  [$axattb2, player_axeb3 ] {self.weaponframe=6;};
  2589. +void()  player_axeb3 =  [$axattb3, player_axeb4 ] {self.weaponframe=7;W_FireAxe();};
  2590. +void()  player_axeb4 =  [$axattb4, player_run   ] {self.weaponframe=8;};
  2591. +
  2592. +void()  player_axec1 =  [$axattc1, player_axec2 ] {self.weaponframe=1;};
  2593. +void()  player_axec2 =  [$axattc2, player_axec3 ] {self.weaponframe=2;};
  2594. +void()  player_axec3 =  [$axattc3, player_axec4 ] {self.weaponframe=3;W_FireAxe();};
  2595. +void()  player_axec4 =  [$axattc4, player_run   ] {self.weaponframe=4;};
  2596. +
  2597. +void()  player_axed1 =  [$axattd1, player_axed2 ] {self.weaponframe=5;};
  2598. +void()  player_axed2 =  [$axattd2, player_axed3 ] {self.weaponframe=6;};
  2599. +void()  player_axed3 =  [$axattd3, player_axed4 ] {self.weaponframe=7;W_FireAxe();};
  2600. +void()  player_axed4 =  [$axattd4, player_run   ] {self.weaponframe=8;};
  2601.  
  2602.  
  2603.  //============================================================================
  2604.  
  2605.  void() player_nail1   =[$nailatt1, player_nail2  ] 
  2606.  {
  2607. -    self.effects = self.effects | EF_MUZZLEFLASH;
  2608. +local string fl;
  2609. +
  2610.  
  2611.      if (!self.button0)
  2612.          {player_run ();return;}
  2613. -    self.weaponframe = self.weaponframe + 1;
  2614. -    if (self.weaponframe == 9)
  2615. -        self.weaponframe = 1;
  2616. -    SuperDamageSound();
  2617. -    W_FireSpikes (4);
  2618. -    self.attack_finished = time + 0.2;
  2619. +
  2620. +//CN_PATCH - Aug 96: is NG/SNG jammed?
  2621. +    if (self.weapon == IT_NAILGUN)
  2622. +      CN_NG_Jammed();
  2623. +    else
  2624. +      CN_SNG_Jammed();
  2625. +
  2626. +    if (((self.jammed_ng < 1.0) && (self.weapon == IT_NAILGUN)) ||
  2627. +        ((self.jammed_sng < 1.0) && (self.weapon == IT_SUPER_NAILGUN)))
  2628. +    {
  2629. +      self.effects = self.effects | EF_MUZZLEFLASH;
  2630. +      self.weaponframe = self.weaponframe + 1;
  2631. +      if (self.weaponframe == 9)
  2632. +          self.weaponframe = 1;
  2633. +      SuperDamageSound();
  2634. +      W_FireSpikes (4);
  2635. +      self.attack_finished = time + 0.2;
  2636. +    } else
  2637. +    {
  2638. +      self.weaponframe = 0;
  2639. +      if (self.weapon == IT_NAILGUN)
  2640. +        sprint (self,"Nailgun jammed!\n");
  2641. +      else
  2642. +        sprint (self,"Perforator jammed!\n");
  2643. +      self.attack_finished = time + 1;
  2644. +    }
  2645. +//END CN_PATCH
  2646.  };
  2647.  void() player_nail2   =[$nailatt2, player_nail1  ]
  2648.  {
  2649. +//CN_PATCH - check jamming
  2650. +      if (((self.jammed_ng < 1.0) && (self.weapon == IT_NAILGUN)) ||
  2651. +      ((self.jammed_sng < 1.0) && (self.weapon == IT_SUPER_NAILGUN)))
  2652. +      {
  2653.      self.effects = self.effects | EF_MUZZLEFLASH;
  2654.  
  2655.      if (!self.button0)
  2656. @@ -195,6 +221,10 @@
  2657.      SuperDamageSound();
  2658.      W_FireSpikes (-4);
  2659.      self.attack_finished = time + 0.2;
  2660. +      }
  2661. +      else
  2662. +    self.attack_finished = time + 1;
  2663. +//END CN_PATCH
  2664.  };
  2665.  
  2666.  //============================================================================
  2667. @@ -240,7 +270,7 @@
  2668.  
  2669.  void() PainSound =
  2670.  {
  2671. -local float        rs;
  2672. +local float             rs;
  2673.  
  2674.      if (self.health < 0)
  2675.          return;
  2676. @@ -265,7 +295,7 @@
  2677.  // slime pain sounds
  2678.      if (self.watertype == CONTENT_SLIME)
  2679.      {
  2680. -// FIX ME    put in some steam here
  2681. +// FIX ME       put in some steam here
  2682.          if (random() > 0.5)
  2683.              sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
  2684.          else
  2685. @@ -320,19 +350,19 @@
  2686.      return;
  2687.  };
  2688.  
  2689. -void()    player_pain1 =    [    $pain1,    player_pain2    ] {PainSound();self.weaponframe=0;};
  2690. -void()    player_pain2 =    [    $pain2,    player_pain3    ] {};
  2691. -void()    player_pain3 =    [    $pain3,    player_pain4    ] {};
  2692. -void()    player_pain4 =    [    $pain4,    player_pain5    ] {};
  2693. -void()    player_pain5 =    [    $pain5,    player_pain6    ] {};
  2694. -void()    player_pain6 =    [    $pain6,    player_run    ] {};
  2695. -
  2696. -void()    player_axpain1 =    [    $axpain1,    player_axpain2    ] {PainSound();self.weaponframe=0;};
  2697. -void()    player_axpain2 =    [    $axpain2,    player_axpain3    ] {};
  2698. -void()    player_axpain3 =    [    $axpain3,    player_axpain4    ] {};
  2699. -void()    player_axpain4 =    [    $axpain4,    player_axpain5    ] {};
  2700. -void()    player_axpain5 =    [    $axpain5,    player_axpain6    ] {};
  2701. -void()    player_axpain6 =    [    $axpain6,    player_run    ] {};
  2702. +void()  player_pain1 =  [       $pain1, player_pain2    ] {PainSound();self.weaponframe=0;};
  2703. +void()  player_pain2 =  [       $pain2, player_pain3    ] {};
  2704. +void()  player_pain3 =  [       $pain3, player_pain4    ] {};
  2705. +void()  player_pain4 =  [       $pain4, player_pain5    ] {};
  2706. +void()  player_pain5 =  [       $pain5, player_pain6    ] {};
  2707. +void()  player_pain6 =  [       $pain6, player_run      ] {};
  2708. +
  2709. +void()  player_axpain1 =        [       $axpain1,       player_axpain2  ] {PainSound();self.weaponframe=0;};
  2710. +void()  player_axpain2 =        [       $axpain2,       player_axpain3  ] {};
  2711. +void()  player_axpain3 =        [       $axpain3,       player_axpain4  ] {};
  2712. +void()  player_axpain4 =        [       $axpain4,       player_axpain5  ] {};
  2713. +void()  player_axpain5 =        [       $axpain5,       player_axpain6  ] {};
  2714. +void()  player_axpain6 =        [       $axpain6,       player_run      ] {};
  2715.  
  2716.  void() player_pain =
  2717.  {
  2718. @@ -340,7 +370,7 @@
  2719.          return;
  2720.  
  2721.      if (self.invisible_finished > time)
  2722. -        return;        // eyes don't have pain frames
  2723. +        return;         // eyes don't have pain frames
  2724.  
  2725.      if (self.weapon == IT_AXE)
  2726.          player_axpain1 ();
  2727. @@ -357,7 +387,7 @@
  2728.  
  2729.  void() DeathBubblesSpawn =
  2730.  {
  2731. -local entity    bubble;
  2732. +local entity    bubble;
  2733.      if (self.owner.waterlevel != 3)
  2734.          return;
  2735.      bubble = spawn();
  2736. @@ -381,7 +411,7 @@
  2737.  
  2738.  void(float num_bubbles) DeathBubbles =
  2739.  {
  2740. -local entity    bubble_spawner;
  2741. +local entity    bubble_spawner;
  2742.      
  2743.      bubble_spawner = spawn();
  2744.      setorigin (bubble_spawner, self.origin);
  2745. @@ -398,7 +428,7 @@
  2746.  
  2747.  void() DeathSound =
  2748.  {
  2749. -local float        rs;
  2750. +local float             rs;
  2751.  
  2752.      // water death sounds
  2753.      if (self.waterlevel == 3)
  2754. @@ -442,12 +472,12 @@
  2755.  
  2756.      if (dm > -50)
  2757.      {
  2758. -//        dprint ("level 1\n");
  2759. +//              dprint ("level 1\n");
  2760.          v = v * 0.7;
  2761.      }
  2762.      else if (dm > -200)
  2763.      {
  2764. -//        dprint ("level 3\n");
  2765. +//              dprint ("level 3\n");
  2766.          v = v * 2;
  2767.      }
  2768.      else
  2769. @@ -458,7 +488,7 @@
  2770.  
  2771.  void(string gibname, float dm) ThrowGib =
  2772.  {
  2773. -    local    entity new;
  2774. +    local   entity new;
  2775.  
  2776.      new = spawn();
  2777.      new.origin = self.origin;
  2778. @@ -523,14 +553,14 @@
  2779.  
  2780.  void() PlayerDie =
  2781.  {
  2782. -    local    float    i;
  2783. +    local   float   i;
  2784.      
  2785.      self.items = self.items - (self.items & IT_INVISIBILITY);
  2786. -    self.invisible_finished = 0;    // don't die as eyes
  2787. +    self.invisible_finished = 0;    // don't die as eyes
  2788.      self.invincible_finished = 0;
  2789.      self.super_damage_finished = 0;
  2790.      self.radsuit_finished = 0;
  2791. -    self.modelindex = modelindex_player;    // don't use eyes
  2792. +    self.modelindex = modelindex_player;    // don't use eyes
  2793.  
  2794.      if (deathmatch || coop)
  2795.          DropBackpack();
  2796. @@ -579,9 +609,9 @@
  2797.  };
  2798.  
  2799.  void() set_suicide_frame =
  2800. -{    // used by klill command and diconnect command
  2801. +{       // used by klill command and diconnect command
  2802.      if (self.model != "progs/player.mdl")
  2803. -        return;    // allready gibbed
  2804. +        return; // allready gibbed
  2805.      self.frame = $deatha11;
  2806.      self.solid = SOLID_NOT;
  2807.      self.movetype = MOVETYPE_TOSS;
  2808. @@ -590,70 +620,70 @@
  2809.  };
  2810.  
  2811.  
  2812. -void()    player_diea1    =    [    $deatha1,    player_diea2    ] {};
  2813. -void()    player_diea2    =    [    $deatha2,    player_diea3    ] {};
  2814. -void()    player_diea3    =    [    $deatha3,    player_diea4    ] {};
  2815. -void()    player_diea4    =    [    $deatha4,    player_diea5    ] {};
  2816. -void()    player_diea5    =    [    $deatha5,    player_diea6    ] {};
  2817. -void()    player_diea6    =    [    $deatha6,    player_diea7    ] {};
  2818. -void()    player_diea7    =    [    $deatha7,    player_diea8    ] {};
  2819. -void()    player_diea8    =    [    $deatha8,    player_diea9    ] {};
  2820. -void()    player_diea9    =    [    $deatha9,    player_diea10    ] {};
  2821. -void()    player_diea10    =    [    $deatha10,    player_diea11    ] {};
  2822. -void()    player_diea11    =    [    $deatha11,    player_diea11 ] {PlayerDead();};
  2823. -
  2824. -void()    player_dieb1    =    [    $deathb1,    player_dieb2    ] {};
  2825. -void()    player_dieb2    =    [    $deathb2,    player_dieb3    ] {};
  2826. -void()    player_dieb3    =    [    $deathb3,    player_dieb4    ] {};
  2827. -void()    player_dieb4    =    [    $deathb4,    player_dieb5    ] {};
  2828. -void()    player_dieb5    =    [    $deathb5,    player_dieb6    ] {};
  2829. -void()    player_dieb6    =    [    $deathb6,    player_dieb7    ] {};
  2830. -void()    player_dieb7    =    [    $deathb7,    player_dieb8    ] {};
  2831. -void()    player_dieb8    =    [    $deathb8,    player_dieb9    ] {};
  2832. -void()    player_dieb9    =    [    $deathb9,    player_dieb9    ] {PlayerDead();};
  2833. -
  2834. -void()    player_diec1    =    [    $deathc1,    player_diec2    ] {};
  2835. -void()    player_diec2    =    [    $deathc2,    player_diec3    ] {};
  2836. -void()    player_diec3    =    [    $deathc3,    player_diec4    ] {};
  2837. -void()    player_diec4    =    [    $deathc4,    player_diec5    ] {};
  2838. -void()    player_diec5    =    [    $deathc5,    player_diec6    ] {};
  2839. -void()    player_diec6    =    [    $deathc6,    player_diec7    ] {};
  2840. -void()    player_diec7    =    [    $deathc7,    player_diec8    ] {};
  2841. -void()    player_diec8    =    [    $deathc8,    player_diec9    ] {};
  2842. -void()    player_diec9    =    [    $deathc9,    player_diec10    ] {};
  2843. -void()    player_diec10    =    [    $deathc10,    player_diec11    ] {};
  2844. -void()    player_diec11    =    [    $deathc11,    player_diec12    ] {};
  2845. -void()    player_diec12    =    [    $deathc12,    player_diec13    ] {};
  2846. -void()    player_diec13    =    [    $deathc13,    player_diec14    ] {};
  2847. -void()    player_diec14    =    [    $deathc14,    player_diec15    ] {};
  2848. -void()    player_diec15    =    [    $deathc15,    player_diec15 ] {PlayerDead();};
  2849. -
  2850. -void()    player_died1    =    [    $deathd1,    player_died2    ] {};
  2851. -void()    player_died2    =    [    $deathd2,    player_died3    ] {};
  2852. -void()    player_died3    =    [    $deathd3,    player_died4    ] {};
  2853. -void()    player_died4    =    [    $deathd4,    player_died5    ] {};
  2854. -void()    player_died5    =    [    $deathd5,    player_died6    ] {};
  2855. -void()    player_died6    =    [    $deathd6,    player_died7    ] {};
  2856. -void()    player_died7    =    [    $deathd7,    player_died8    ] {};
  2857. -void()    player_died8    =    [    $deathd8,    player_died9    ] {};
  2858. -void()    player_died9    =    [    $deathd9,    player_died9    ] {PlayerDead();};
  2859. -
  2860. -void()    player_diee1    =    [    $deathe1,    player_diee2    ] {};
  2861. -void()    player_diee2    =    [    $deathe2,    player_diee3    ] {};
  2862. -void()    player_diee3    =    [    $deathe3,    player_diee4    ] {};
  2863. -void()    player_diee4    =    [    $deathe4,    player_diee5    ] {};
  2864. -void()    player_diee5    =    [    $deathe5,    player_diee6    ] {};
  2865. -void()    player_diee6    =    [    $deathe6,    player_diee7    ] {};
  2866. -void()    player_diee7    =    [    $deathe7,    player_diee8    ] {};
  2867. -void()    player_diee8    =    [    $deathe8,    player_diee9    ] {};
  2868. -void()    player_diee9    =    [    $deathe9,    player_diee9    ] {PlayerDead();};
  2869. -
  2870. -void()    player_die_ax1    =    [    $axdeth1,    player_die_ax2    ] {};
  2871. -void()    player_die_ax2    =    [    $axdeth2,    player_die_ax3    ] {};
  2872. -void()    player_die_ax3    =    [    $axdeth3,    player_die_ax4    ] {};
  2873. -void()    player_die_ax4    =    [    $axdeth4,    player_die_ax5    ] {};
  2874. -void()    player_die_ax5    =    [    $axdeth5,    player_die_ax6    ] {};
  2875. -void()    player_die_ax6    =    [    $axdeth6,    player_die_ax7    ] {};
  2876. -void()    player_die_ax7    =    [    $axdeth7,    player_die_ax8    ] {};
  2877. -void()    player_die_ax8    =    [    $axdeth8,    player_die_ax9    ] {};
  2878. -void()    player_die_ax9    =    [    $axdeth9,    player_die_ax9    ] {PlayerDead();};
  2879. +void()  player_diea1    =       [       $deatha1,       player_diea2    ] {};
  2880. +void()  player_diea2    =       [       $deatha2,       player_diea3    ] {};
  2881. +void()  player_diea3    =       [       $deatha3,       player_diea4    ] {};
  2882. +void()  player_diea4    =       [       $deatha4,       player_diea5    ] {};
  2883. +void()  player_diea5    =       [       $deatha5,       player_diea6    ] {};
  2884. +void()  player_diea6    =       [       $deatha6,       player_diea7    ] {};
  2885. +void()  player_diea7    =       [       $deatha7,       player_diea8    ] {};
  2886. +void()  player_diea8    =       [       $deatha8,       player_diea9    ] {};
  2887. +void()  player_diea9    =       [       $deatha9,       player_diea10   ] {};
  2888. +void()  player_diea10   =       [       $deatha10,      player_diea11   ] {};
  2889. +void()  player_diea11   =       [       $deatha11,      player_diea11 ] {PlayerDead();};
  2890. +
  2891. +void()  player_dieb1    =       [       $deathb1,       player_dieb2    ] {};
  2892. +void()  player_dieb2    =       [       $deathb2,       player_dieb3    ] {};
  2893. +void()  player_dieb3    =       [       $deathb3,       player_dieb4    ] {};
  2894. +void()  player_dieb4    =       [       $deathb4,       player_dieb5    ] {};
  2895. +void()  player_dieb5    =       [       $deathb5,       player_dieb6    ] {};
  2896. +void()  player_dieb6    =       [       $deathb6,       player_dieb7    ] {};
  2897. +void()  player_dieb7    =       [       $deathb7,       player_dieb8    ] {};
  2898. +void()  player_dieb8    =       [       $deathb8,       player_dieb9    ] {};
  2899. +void()  player_dieb9    =       [       $deathb9,       player_dieb9    ] {PlayerDead();};
  2900. +
  2901. +void()  player_diec1    =       [       $deathc1,       player_diec2    ] {};
  2902. +void()  player_diec2    =       [       $deathc2,       player_diec3    ] {};
  2903. +void()  player_diec3    =       [       $deathc3,       player_diec4    ] {};
  2904. +void()  player_diec4    =       [       $deathc4,       player_diec5    ] {};
  2905. +void()  player_diec5    =       [       $deathc5,       player_diec6    ] {};
  2906. +void()  player_diec6    =       [       $deathc6,       player_diec7    ] {};
  2907. +void()  player_diec7    =       [       $deathc7,       player_diec8    ] {};
  2908. +void()  player_diec8    =       [       $deathc8,       player_diec9    ] {};
  2909. +void()  player_diec9    =       [       $deathc9,       player_diec10   ] {};
  2910. +void()  player_diec10   =       [       $deathc10,      player_diec11   ] {};
  2911. +void()  player_diec11   =       [       $deathc11,      player_diec12   ] {};
  2912. +void()  player_diec12   =       [       $deathc12,      player_diec13   ] {};
  2913. +void()  player_diec13   =       [       $deathc13,      player_diec14   ] {};
  2914. +void()  player_diec14   =       [       $deathc14,      player_diec15   ] {};
  2915. +void()  player_diec15   =       [       $deathc15,      player_diec15 ] {PlayerDead();};
  2916. +
  2917. +void()  player_died1    =       [       $deathd1,       player_died2    ] {};
  2918. +void()  player_died2    =       [       $deathd2,       player_died3    ] {};
  2919. +void()  player_died3    =       [       $deathd3,       player_died4    ] {};
  2920. +void()  player_died4    =       [       $deathd4,       player_died5    ] {};
  2921. +void()  player_died5    =       [       $deathd5,       player_died6    ] {};
  2922. +void()  player_died6    =       [       $deathd6,       player_died7    ] {};
  2923. +void()  player_died7    =       [       $deathd7,       player_died8    ] {};
  2924. +void()  player_died8    =       [       $deathd8,       player_died9    ] {};
  2925. +void()  player_died9    =       [       $deathd9,       player_died9    ] {PlayerDead();};
  2926. +
  2927. +void()  player_diee1    =       [       $deathe1,       player_diee2    ] {};
  2928. +void()  player_diee2    =       [       $deathe2,       player_diee3    ] {};
  2929. +void()  player_diee3    =       [       $deathe3,       player_diee4    ] {};
  2930. +void()  player_diee4    =       [       $deathe4,       player_diee5    ] {};
  2931. +void()  player_diee5    =       [       $deathe5,       player_diee6    ] {};
  2932. +void()  player_diee6    =       [       $deathe6,       player_diee7    ] {};
  2933. +void()  player_diee7    =       [       $deathe7,       player_diee8    ] {};
  2934. +void()  player_diee8    =       [       $deathe8,       player_diee9    ] {};
  2935. +void()  player_diee9    =       [       $deathe9,       player_diee9    ] {PlayerDead();};
  2936. +
  2937. +void()  player_die_ax1  =       [       $axdeth1,       player_die_ax2  ] {};
  2938. +void()  player_die_ax2  =       [       $axdeth2,       player_die_ax3  ] {};
  2939. +void()  player_die_ax3  =       [       $axdeth3,       player_die_ax4  ] {};
  2940. +void()  player_die_ax4  =       [       $axdeth4,       player_die_ax5  ] {};
  2941. +void()  player_die_ax5  =       [       $axdeth5,       player_die_ax6  ] {};
  2942. +void()  player_die_ax6  =       [       $axdeth6,       player_die_ax7  ] {};
  2943. +void()  player_die_ax7  =       [       $axdeth7,       player_die_ax8  ] {};
  2944. +void()  player_die_ax8  =       [       $axdeth8,       player_die_ax9  ] {};
  2945. +void()  player_die_ax9  =       [       $axdeth9,       player_die_ax9  ] {PlayerDead();};
  2946. diff -ur --new-file v101qc/progdefs.h progs/progdefs.h
  2947. --- v101qc/progdefs.h    Thu Jan  1 08:00:00 1970
  2948. +++ progs/progdefs.h    Thu Aug 22 15:53:24 1996
  2949. @@ -0,0 +1,143 @@
  2950. +
  2951. +/* file generated by qcc, do not modify */
  2952. +
  2953. +typedef struct
  2954. +{    int    pad[28];
  2955. +    int    self;
  2956. +    int    other;
  2957. +    int    world;
  2958. +    float    time;
  2959. +    float    frametime;
  2960. +    float    force_retouch;
  2961. +    string_t    mapname;
  2962. +    float    deathmatch;
  2963. +    float    coop;
  2964. +    float    teamplay;
  2965. +    float    serverflags;
  2966. +    float    total_secrets;
  2967. +    float    total_monsters;
  2968. +    float    found_secrets;
  2969. +    float    killed_monsters;
  2970. +    float    parm1;
  2971. +    float    parm2;
  2972. +    float    parm3;
  2973. +    float    parm4;
  2974. +    float    parm5;
  2975. +    float    parm6;
  2976. +    float    parm7;
  2977. +    float    parm8;
  2978. +    float    parm9;
  2979. +    float    parm10;
  2980. +    float    parm11;
  2981. +    float    parm12;
  2982. +    float    parm13;
  2983. +    float    parm14;
  2984. +    float    parm15;
  2985. +    float    parm16;
  2986. +    vec3_t    v_forward;
  2987. +    vec3_t    v_up;
  2988. +    vec3_t    v_right;
  2989. +    float    trace_allsolid;
  2990. +    float    trace_startsolid;
  2991. +    float    trace_fraction;
  2992. +    vec3_t    trace_endpos;
  2993. +    vec3_t    trace_plane_normal;
  2994. +    float    trace_plane_dist;
  2995. +    int    trace_ent;
  2996. +    float    trace_inopen;
  2997. +    float    trace_inwater;
  2998. +    int    msg_entity;
  2999. +    func_t    main;
  3000. +    func_t    StartFrame;
  3001. +    func_t    PlayerPreThink;
  3002. +    func_t    PlayerPostThink;
  3003. +    func_t    ClientKill;
  3004. +    func_t    ClientConnect;
  3005. +    func_t    PutClientInServer;
  3006. +    func_t    ClientDisconnect;
  3007. +    func_t    SetNewParms;
  3008. +    func_t    SetChangeParms;
  3009. +} globalvars_t;
  3010. +
  3011. +typedef struct
  3012. +{
  3013. +    float    modelindex;
  3014. +    vec3_t    absmin;
  3015. +    vec3_t    absmax;
  3016. +    float    ltime;
  3017. +    float    movetype;
  3018. +    float    solid;
  3019. +    vec3_t    origin;
  3020. +    vec3_t    oldorigin;
  3021. +    vec3_t    velocity;
  3022. +    vec3_t    angles;
  3023. +    vec3_t    avelocity;
  3024. +    vec3_t    punchangle;
  3025. +    string_t    classname;
  3026. +    string_t    model;
  3027. +    float    frame;
  3028. +    float    skin;
  3029. +    float    effects;
  3030. +    vec3_t    mins;
  3031. +    vec3_t    maxs;
  3032. +    vec3_t    size;
  3033. +    func_t    touch;
  3034. +    func_t    use;
  3035. +    func_t    think;
  3036. +    func_t    blocked;
  3037. +    float    nextthink;
  3038. +    int    groundentity;
  3039. +    float    health;
  3040. +    float    frags;
  3041. +    float    weapon;
  3042. +    string_t    weaponmodel;
  3043. +    float    weaponframe;
  3044. +    float    currentammo;
  3045. +    float    ammo_shells;
  3046. +    float    ammo_nails;
  3047. +    float    ammo_rockets;
  3048. +    float    ammo_cells;
  3049. +    float    items;
  3050. +    float    takedamage;
  3051. +    int    chain;
  3052. +    float    deadflag;
  3053. +    vec3_t    view_ofs;
  3054. +    float    button0;
  3055. +    float    button1;
  3056. +    float    button2;
  3057. +    float    impulse;
  3058. +    float    fixangle;
  3059. +    vec3_t    v_angle;
  3060. +    float    idealpitch;
  3061. +    string_t    netname;
  3062. +    int    enemy;
  3063. +    float    flags;
  3064. +    float    colormap;
  3065. +    float    team;
  3066. +    float    max_health;
  3067. +    float    teleport_time;
  3068. +    float    armortype;
  3069. +    float    armorvalue;
  3070. +    float    waterlevel;
  3071. +    float    watertype;
  3072. +    float    ideal_yaw;
  3073. +    float    yaw_speed;
  3074. +    int    aiment;
  3075. +    int    goalentity;
  3076. +    float    spawnflags;
  3077. +    string_t    target;
  3078. +    string_t    targetname;
  3079. +    float    dmg_take;
  3080. +    float    dmg_save;
  3081. +    int    dmg_inflictor;
  3082. +    int    owner;
  3083. +    vec3_t    movedir;
  3084. +    string_t    message;
  3085. +    float    sounds;
  3086. +    string_t    noise;
  3087. +    string_t    noise1;
  3088. +    string_t    noise2;
  3089. +    string_t    noise3;
  3090. +} entvars_t;
  3091. +
  3092. +#define PROGHEADER_CRC 5927
  3093. diff -ur --new-file v101qc/progs.src progs/progs.src
  3094. --- v101qc/progs.src    Sun Aug 18 02:29:36 1996
  3095. +++ progs/progs.src    Wed Aug 14 18:46:28 1996
  3096. @@ -6,6 +6,7 @@
  3097.  ai.qc
  3098.  combat.qc
  3099.  items.qc
  3100. +cbnmods.qc
  3101.  weapons.qc
  3102.  world.qc
  3103.  client.qc
  3104. @@ -27,9 +28,9 @@
  3105.  zombie.qc
  3106.  boss.qc
  3107.  
  3108. -tarbaby.qc        // registered
  3109. -hknight.qc        // registered
  3110. -fish.qc            // registered
  3111. -shalrath.qc        // registered
  3112. -enforcer.qc        // registered
  3113. -oldone.qc        // registered
  3114. +tarbaby.qc              // registered
  3115. +hknight.qc              // registered
  3116. +fish.qc                 // registered
  3117. +shalrath.qc             // registered
  3118. +enforcer.qc             // registered
  3119. +oldone.qc               // registered
  3120. diff -ur --new-file v101qc/triggers.qc progs/triggers.qc
  3121. --- v101qc/triggers.qc    Sun Aug 18 02:29:36 1996
  3122. +++ progs/triggers.qc    Thu Aug 15 23:29:42 1996
  3123. @@ -9,8 +9,8 @@
  3124.  
  3125.  //=============================================================================
  3126.  
  3127. -float    SPAWNFLAG_NOMESSAGE = 1;
  3128. -float    SPAWNFLAG_NOTOUCH = 1;
  3129. +float   SPAWNFLAG_NOMESSAGE = 1;
  3130. +float   SPAWNFLAG_NOTOUCH = 1;
  3131.  
  3132.  // the wait time has passed, so set back up for another activation
  3133.  void() multi_wait =
  3134. @@ -31,7 +31,7 @@
  3135.  {
  3136.      if (self.nextthink > time)
  3137.      {
  3138. -        return;        // allready been triggered
  3139. +        return;         // allready been triggered
  3140.      }
  3141.  
  3142.      if (self.classname == "trigger_secret")
  3143. @@ -52,13 +52,13 @@
  3144.      
  3145.      SUB_UseTargets();
  3146.  
  3147. -    if (self.wait > 0)    
  3148. +    if (self.wait > 0)      
  3149.      {
  3150.          self.think = multi_wait;
  3151.          self.nextthink = time + self.wait;
  3152.      }
  3153.      else
  3154. -    {    // we can't just remove (self) here, because this is a touch function
  3155. +    {       // we can't just remove (self) here, because this is a touch function
  3156.          // called wheil C code is looping through area links...
  3157.          self.touch = SUB_Null;
  3158.          self.nextthink = time + 0.1;
  3159. @@ -88,7 +88,7 @@
  3160.      {
  3161.          makevectors (other.angles);
  3162.          if (v_forward * self.movedir < 0)
  3163. -            return;        // not facing the right way
  3164. +            return;         // not facing the right way
  3165.      }
  3166.      
  3167.      self.enemy = other;
  3168. @@ -102,9 +102,9 @@
  3169.  If notouch is set, the trigger is only fired by other entities, not by touching.
  3170.  NOTOUCH has been obsoleted by trigger_relay!
  3171.  sounds
  3172. -1)    secret
  3173. -2)    beep beep
  3174. -3)    large switch
  3175. +1)      secret
  3176. +2)      beep beep
  3177. +3)      large switch
  3178.  4)
  3179.  set "message" to text string
  3180.  */
  3181. @@ -140,7 +140,7 @@
  3182.          self.th_die = multi_killed;
  3183.          self.takedamage = DAMAGE_YES;
  3184.          self.solid = SOLID_BBOX;
  3185. -        setorigin (self, self.origin);    // make sure it links into the world
  3186. +        setorigin (self, self.origin);  // make sure it links into the world
  3187.      }
  3188.      else
  3189.      {
  3190. @@ -159,9 +159,9 @@
  3191.  if "killtarget" is set, any objects that have a matching "target" will be removed when the trigger is fired.
  3192.  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.
  3193.  sounds
  3194. -1)    secret
  3195. -2)    beep beep
  3196. -3)    large switch
  3197. +1)      secret
  3198. +2)      beep beep
  3199. +3)      large switch
  3200.  4)
  3201.  set "message" to text string
  3202.  */
  3203. @@ -187,8 +187,8 @@
  3204.  /*QUAKED trigger_secret (.5 .5 .5) ?
  3205.  secret counter trigger
  3206.  sounds
  3207. -1)    secret
  3208. -2)    beep beep
  3209. +1)      secret
  3210. +2)      beep beep
  3211.  3)
  3212.  4)
  3213.  set "message" to text string
  3214. @@ -276,13 +276,13 @@
  3215.  ==============================================================================
  3216.  */
  3217.  
  3218. -float    PLAYER_ONLY    = 1;
  3219. -float    SILENT = 2;
  3220. +float   PLAYER_ONLY     = 1;
  3221. +float   SILENT = 2;
  3222.  
  3223.  void() play_teleport =
  3224.  {
  3225. -    local    float v;
  3226. -    local    string tmpstr;
  3227. +    local   float v;
  3228. +    local   string tmpstr;
  3229.  
  3230.      v = random() * 5;
  3231.      if (v < 1)
  3232. @@ -326,7 +326,7 @@
  3233.          if (other.invincible_finished > time)
  3234.              self.classname = "teledeath2";
  3235.          if (self.owner.classname != "player")
  3236. -        {    // other monsters explode themselves
  3237. +        {       // other monsters explode themselves
  3238.              T_Damage (self.owner, self, self, 50000);
  3239.              return;
  3240.          }
  3241. @@ -342,7 +342,7 @@
  3242.  
  3243.  void(vector org, entity death_owner) spawn_tdeath =
  3244.  {
  3245. -local entity    death;
  3246. +local entity    death;
  3247.  
  3248.      death = spawn();
  3249.      death.classname = "teledeath";
  3250. @@ -356,25 +356,29 @@
  3251.      death.think = SUB_Remove;
  3252.      death.owner = death_owner;
  3253.      
  3254. -    force_retouch = 2;        // make sure even still objects get hit
  3255. +    force_retouch = 2;              // make sure even still objects get hit
  3256.  };
  3257.  
  3258.  void() teleport_touch =
  3259.  {
  3260. -local entity    t;
  3261. -local vector    org;
  3262. +local entity    t;
  3263. +local vector    org;
  3264.  
  3265.      if (self.targetname)
  3266.      {
  3267.          if (self.nextthink < time)
  3268.          {
  3269. -            return;        // not fired yet
  3270. +            return;         // not fired yet
  3271.          }
  3272.      }
  3273.  
  3274. -    if (self.spawnflags & PLAYER_ONLY)
  3275. +/*        if (self.spawnflags & PLAYER_ONLY)
  3276.      {
  3277. +//PATCH - CN, Aug 96: make rockets and grenades teleport
  3278. +bprint (other.classname);
  3279.          if (other.classname != "player")
  3280. +          if (other.classname != "grenade")
  3281. +            if (other.classname != "rocket")
  3282.              return;
  3283.      }
  3284.  
  3285. @@ -384,6 +388,8 @@
  3286.  
  3287.      SUB_UseTargets ();
  3288.  
  3289. +*/
  3290. +
  3291.  // put a tfog where the player was
  3292.      spawn_tfog (other.origin);
  3293.  
  3294. @@ -410,7 +416,7 @@
  3295.      other.angles = t.mangle;
  3296.      if (other.classname == "player")
  3297.      {
  3298. -        other.fixangle = 1;        // turn this way immediately
  3299. +        other.fixangle = 1;             // turn this way immediately
  3300.          other.teleport_time = time + 0.7;
  3301.          if (other.flags & FL_ONGROUND)
  3302.              other.flags = other.flags - FL_ONGROUND;
  3303. @@ -436,7 +442,7 @@
  3304.  void() teleport_use =
  3305.  {
  3306.      self.nextthink = time + 0.2;
  3307. -    force_retouch = 2;        // make sure even still objects get hit
  3308. +    force_retouch = 2;              // make sure even still objects get hit
  3309.      self.think = SUB_Null;
  3310.  };
  3311.  
  3312. diff -ur --new-file v101qc/weapons.qc progs/weapons.qc
  3313. --- v101qc/weapons.qc    Sun Aug 18 02:29:36 1996
  3314. +++ progs/weapons.qc    Thu Aug 22 15:53:02 1996
  3315. @@ -6,22 +6,21 @@
  3316.  void(vector org, vector vel, float damage) SpawnBlood;
  3317.  void() SuperDamageSound;
  3318.  
  3319. -
  3320.  // called by worldspawn
  3321.  void() W_Precache =
  3322.  {
  3323. -    precache_sound ("weapons/r_exp3.wav");    // new rocket explosion
  3324. -    precache_sound ("weapons/rocket1i.wav");    // spike gun
  3325. +    precache_sound ("weapons/r_exp3.wav");  // new rocket explosion
  3326. +    precache_sound ("weapons/rocket1i.wav");        // spike gun
  3327.      precache_sound ("weapons/sgun1.wav");
  3328. -    precache_sound ("weapons/guncock.wav");    // player shotgun
  3329. -    precache_sound ("weapons/ric1.wav");    // ricochet (used in c code)
  3330. -    precache_sound ("weapons/ric2.wav");    // ricochet (used in c code)
  3331. -    precache_sound ("weapons/ric3.wav");    // ricochet (used in c code)
  3332. -    precache_sound ("weapons/spike2.wav");    // super spikes
  3333. -    precache_sound ("weapons/tink1.wav");    // spikes tink (used in c code)
  3334. -    precache_sound ("weapons/grenade.wav");    // grenade launcher
  3335. -    precache_sound ("weapons/bounce.wav");        // grenade bounce
  3336. -    precache_sound ("weapons/shotgn2.wav");    // super shotgun
  3337. +    precache_sound ("weapons/guncock.wav"); // player shotgun
  3338. +    precache_sound ("weapons/ric1.wav");    // ricochet (used in c code)
  3339. +    precache_sound ("weapons/ric2.wav");    // ricochet (used in c code)
  3340. +    precache_sound ("weapons/ric3.wav");    // ricochet (used in c code)
  3341. +    precache_sound ("weapons/spike2.wav");  // super spikes
  3342. +    precache_sound ("weapons/tink1.wav");   // spikes tink (used in c code)
  3343. +    precache_sound ("weapons/grenade.wav"); // grenade launcher
  3344. +    precache_sound ("weapons/bounce.wav");          // grenade bounce
  3345. +    precache_sound ("weapons/shotgn2.wav"); // super shotgun
  3346.  };
  3347.  
  3348.  float() crandom =
  3349. @@ -36,8 +35,8 @@
  3350.  */
  3351.  void() W_FireAxe =
  3352.  {
  3353. -    local    vector    source;
  3354. -    local    vector    org;
  3355. +    local   vector  source;
  3356. +    local   vector  org;
  3357.  
  3358.      source = self.origin + '0 0 16';
  3359.      traceline (source, source + v_forward*64, FALSE, self);
  3360. @@ -53,7 +52,7 @@
  3361.          T_Damage (trace_ent, self, self, 20);
  3362.      }
  3363.      else
  3364. -    {    // hit wall
  3365. +    {       // hit wall
  3366.          sound (self, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
  3367.          WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  3368.          WriteByte (MSG_BROADCAST, TE_GUNSHOT);
  3369. @@ -69,7 +68,7 @@
  3370.  
  3371.  vector() wall_velocity =
  3372.  {
  3373. -    local vector    vel;
  3374. +    local vector    vel;
  3375.      
  3376.      vel = normalize (self.velocity);
  3377.      vel = normalize(vel + v_up*(random()- 0.5) + v_right*(random()- 0.5));
  3378. @@ -87,8 +86,8 @@
  3379.  */
  3380.  void(vector org, vector vel) SpawnMeatSpray =
  3381.  {
  3382. -    local    entity missile, mpuff;
  3383. -    local    vector    org;
  3384. +    local   entity missile, mpuff;
  3385. +    local   vector  org;
  3386.  
  3387.      missile = spawn ();
  3388.      missile.owner = self;
  3389. @@ -107,7 +106,7 @@
  3390.      missile.think = SUB_Remove;
  3391.  
  3392.      setmodel (missile, "progs/zom_gib.mdl");
  3393. -    setsize (missile, '0 0 0', '0 0 0');        
  3394. +    setsize (missile, '0 0 0', '0 0 0');            
  3395.      setorigin (missile, org);
  3396.  };
  3397.  
  3398. @@ -128,7 +127,7 @@
  3399.  */
  3400.  void(float damage) spawn_touchblood =
  3401.  {
  3402. -    local vector    vel;
  3403. +    local vector    vel;
  3404.  
  3405.      vel = wall_velocity () * 0.2;
  3406.      SpawnBlood (self.origin + vel*0.01, vel, damage);
  3407. @@ -155,8 +154,8 @@
  3408.  ==============================================================================
  3409.  */
  3410.  
  3411. -entity    multi_ent;
  3412. -float    multi_damage;
  3413. +entity  multi_ent;
  3414. +float   multi_damage;
  3415.  
  3416.  void() ClearMultiDamage =
  3417.  {
  3418. @@ -201,7 +200,7 @@
  3419.  */
  3420.  void(float damage, vector dir) TraceAttack =
  3421.  {
  3422. -    local    vector    vel, org;
  3423. +    local   vector  vel, org;
  3424.      
  3425.      vel = normalize(dir + v_up*crandom() + v_right*crandom());
  3426.      vel = vel + 2*trace_plane_normal;
  3427. @@ -234,8 +233,8 @@
  3428.  */
  3429.  void(float shotcount, vector dir, vector spread) FireBullets =
  3430.  {
  3431. -    local    vector direction;
  3432. -    local    vector    src;
  3433. +    local   vector direction;
  3434. +    local   vector  src;
  3435.      
  3436.      makevectors(self.v_angle);
  3437.  
  3438. @@ -264,14 +263,22 @@
  3439.  void() W_FireShotgun =
  3440.  {
  3441.      local vector dir;
  3442. +    local vector recoil;
  3443.  
  3444. -    sound (self, CHAN_WEAPON, "weapons/guncock.wav", 1, ATTN_NORM);    
  3445. +    sound (self, CHAN_WEAPON, "weapons/guncock.wav", 1, ATTN_NORM); 
  3446.  
  3447.      self.punchangle_x = -2;
  3448.      
  3449.      self.currentammo = self.ammo_shells = self.ammo_shells - 1;
  3450.      dir = aim (self, 100000);
  3451.      FireBullets (6, dir, '0.04 0.04 0');
  3452. +
  3453. +//CN_PATCH - recoil for player
  3454. +    recoil = dir * 70;  // calculate recoil
  3455. +    //Give the player some good 'ol Newtonian recoil
  3456. +    self.velocity = self.velocity - recoil;
  3457. +    self.avelocity = vectoangles(self.velocity);
  3458. +//END CN_PATCH
  3459.  };
  3460.  
  3461.  
  3462. @@ -283,6 +290,7 @@
  3463.  void() W_FireSuperShotgun =
  3464.  {
  3465.      local vector dir;
  3466. +    local vector recoil;
  3467.  
  3468.      if (self.currentammo == 1)
  3469.      {
  3470. @@ -290,13 +298,20 @@
  3471.          return;
  3472.      }
  3473.          
  3474. -    sound (self ,CHAN_WEAPON, "weapons/shotgn2.wav", 1, ATTN_NORM);    
  3475. +    sound (self ,CHAN_WEAPON, "weapons/shotgn2.wav", 1, ATTN_NORM); 
  3476.  
  3477.      self.punchangle_x = -4;
  3478.      
  3479.      self.currentammo = self.ammo_shells = self.ammo_shells - 2;
  3480.      dir = aim (self, 100000);
  3481.      FireBullets (14, dir, '0.14 0.08 0');
  3482. +
  3483. +//CN_PATCH - recoil for player
  3484. +    recoil = dir * 140;  // calculate recoil
  3485. +    //Give the player some good 'ol Newtonian recoil
  3486. +    self.velocity = self.velocity - recoil;
  3487. +    self.avelocity = vectoangles(self.velocity);
  3488. +//END CN_PATCH
  3489.  };
  3490.  
  3491.  
  3492. @@ -308,12 +323,12 @@
  3493.  ==============================================================================
  3494.  */
  3495.  
  3496. -void()    s_explode1    =    [0,        s_explode2] {};
  3497. -void()    s_explode2    =    [1,        s_explode3] {};
  3498. -void()    s_explode3    =    [2,        s_explode4] {};
  3499. -void()    s_explode4    =    [3,        s_explode5] {};
  3500. -void()    s_explode5    =    [4,        s_explode6] {};
  3501. -void()    s_explode6    =    [5,        SUB_Remove] {};
  3502. +void()  s_explode1      =       [0,             s_explode2] {};
  3503. +void()  s_explode2      =       [1,             s_explode3] {};
  3504. +void()  s_explode3      =       [2,             s_explode4] {};
  3505. +void()  s_explode4      =       [3,             s_explode5] {};
  3506. +void()  s_explode5      =       [4,             s_explode6] {};
  3507. +void()  s_explode6      =       [5,             SUB_Remove] {};
  3508.  
  3509.  void() BecomeExplosion =
  3510.  {
  3511. @@ -327,10 +342,10 @@
  3512.  
  3513.  void() T_MissileTouch =
  3514.  {
  3515. -    local float    damg;
  3516. +    local float     damg;
  3517.  
  3518.      if (other == self.owner)
  3519. -        return;        // don't explode on owner
  3520. +        return;         // don't explode on owner
  3521.  
  3522.      if (pointcontents(self.origin) == CONTENT_SKY)
  3523.      {
  3524. @@ -338,20 +353,20 @@
  3525.          return;
  3526.      }
  3527.  
  3528. -    damg = 100 + random()*20;
  3529. +    damg = 100 + random()*30;  //CN_PATCH *1.5
  3530.      
  3531.      if (other.health)
  3532.      {
  3533.          if (other.classname == "monster_shambler")
  3534. -            damg = damg * 0.5;    // mostly immune
  3535. +            damg = damg * 0.5;      // mostly immune
  3536.          T_Damage (other, self, self.owner, damg );
  3537.      }
  3538.  
  3539.      // don't do radius damage to the other, because all the damage
  3540.      // was done in the impact
  3541. -    T_RadiusDamage (self, self.owner, 120, other);
  3542. +    T_RadiusDamage (self, self.owner, 180, other); //CN_PATCH *1.5
  3543.  
  3544. -//    sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM);
  3545. +//      sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM);
  3546.      self.origin = self.origin - 8*normalize(self.velocity);
  3547.  
  3548.      WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  3549. @@ -364,7 +379,6 @@
  3550.  };
  3551.  
  3552.  
  3553. -
  3554.  /*
  3555.  ================
  3556.  W_FireRocket
  3557. @@ -372,7 +386,8 @@
  3558.  */
  3559.  void() W_FireRocket =
  3560.  {
  3561. -    local    entity missile, mpuff;
  3562. +    local   entity missile, mpuff;
  3563. +    local   vector recoil;
  3564.      
  3565.      self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
  3566.      
  3567. @@ -385,7 +400,7 @@
  3568.      missile.movetype = MOVETYPE_FLYMISSILE;
  3569.      missile.solid = SOLID_BBOX;
  3570.          
  3571. -// set missile speed    
  3572. +// set missile speed    
  3573.  
  3574.      makevectors (self.v_angle);
  3575.      missile.velocity = aim(self, 1000);
  3576. @@ -394,13 +409,26 @@
  3577.      
  3578.      missile.touch = T_MissileTouch;
  3579.      
  3580. -// set missile duration
  3581. -    missile.nextthink = time + 5;
  3582. -    missile.think = SUB_Remove;
  3583.  
  3584.      setmodel (missile, "progs/missile.mdl");
  3585. -    setsize (missile, '0 0 0', '0 0 0');        
  3586. +    setsize (missile, '0 0 0', '0 0 0');            
  3587.      setorigin (missile, self.origin + v_forward*8 + '0 0 16');
  3588. +
  3589. +
  3590. +//CN_PATCH - Aug 96: Setup for missiles in water and player recoil
  3591. +    recoil = missile.velocity * 0.08;  // calculate recoil
  3592. +    missile.nextthink = time + 0.1;
  3593. +    missile.duration = time + 6;
  3594. +    missile.think = CN_Missile_Think;
  3595. +    missile.jump_flag = FALSE; // use these fields for our own use
  3596. +    missile.swim_flag = FALSE;
  3597. +    missile.classname = "rocket";
  3598. +
  3599. +    // Give some good 'ol Newtonian recoil
  3600. +    self.velocity = self.velocity - recoil;
  3601. +    self.avelocity = vectoangles(self.velocity);
  3602. +// END CN_PATCH
  3603. +
  3604.  };
  3605.  
  3606.  /*
  3607. @@ -418,8 +446,8 @@
  3608.  */
  3609.  void(vector p1, vector p2, entity from, float damage) LightningDamage =
  3610.  {
  3611. -    local entity        e1, e2;
  3612. -    local vector        f;
  3613. +    local entity            e1, e2;
  3614. +    local vector            f;
  3615.      
  3616.      f = p2 - p1;
  3617.      normalize (f);
  3618. @@ -462,7 +490,7 @@
  3619.  
  3620.  void() W_FireLightning =
  3621.  {
  3622. -    local    vector        org;
  3623. +    local   vector          org;
  3624.  
  3625.      if (self.ammo_cells < 1)
  3626.      {
  3627. @@ -512,7 +540,7 @@
  3628.  
  3629.  void() GrenadeExplode =
  3630.  {
  3631. -    T_RadiusDamage (self, self.owner, 120, world);
  3632. +    T_RadiusDamage (self, self.owner, 180, world); //CN_PATCH - changed 120 to 180
  3633.  
  3634.      WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  3635.      WriteByte (MSG_BROADCAST, TE_EXPLOSION);
  3636. @@ -526,17 +554,18 @@
  3637.  void() GrenadeTouch =
  3638.  {
  3639.      if (other == self.owner)
  3640. -        return;        // don't explode on owner
  3641. +        return;         // don't explode on owner
  3642.      if (other.takedamage == DAMAGE_AIM)
  3643.      {
  3644.          GrenadeExplode();
  3645.          return;
  3646.      }
  3647. -    sound (self, CHAN_WEAPON, "weapons/bounce.wav", 1, ATTN_NORM);    // bounce sound
  3648. +    sound (self, CHAN_WEAPON, "weapons/bounce.wav", 1, ATTN_NORM);  // bounce sound
  3649.      if (self.velocity == '0 0 0')
  3650.          self.avelocity = '0 0 0';
  3651.  };
  3652.  
  3653. +
  3654.  /*
  3655.  ================
  3656.  W_FireGrenade
  3657. @@ -544,7 +573,8 @@
  3658.  */
  3659.  void() W_FireGrenade =
  3660.  {
  3661. -    local    entity missile, mpuff;
  3662. +    local   entity missile, mpuff;
  3663. +    local   vector recoil;
  3664.      
  3665.      self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
  3666.      
  3667. @@ -558,7 +588,7 @@
  3668.      missile.solid = SOLID_BBOX;
  3669.      missile.classname = "grenade";
  3670.          
  3671. -// set missile speed    
  3672. +// set missile speed    
  3673.  
  3674.      makevectors (self.v_angle);
  3675.  
  3676. @@ -577,13 +607,24 @@
  3677.      
  3678.      missile.touch = GrenadeTouch;
  3679.      
  3680. -// set missile duration
  3681. -    missile.nextthink = time + 2.5;
  3682. -    missile.think = GrenadeExplode;
  3683.  
  3684.      setmodel (missile, "progs/grenade.mdl");
  3685. -    setsize (missile, '0 0 0', '0 0 0');        
  3686. +    setsize (missile, '0 0 0', '0 0 0');            
  3687.      setorigin (missile, self.origin);
  3688. +
  3689. +//CN_PATCH - Aug 96: Setup for missiles in water and player recoil
  3690. +    recoil = missile.velocity * 0.30;  // calculate recoil
  3691. +    missile.nextthink = time + 0.1;
  3692. +    missile.duration = time + 2.5;
  3693. +    missile.think = CN_Missile_Think;
  3694. +    missile.jump_flag = FALSE;  //id's fields used for our own purpose
  3695. +    missile.swim_flag = FALSE;
  3696. +
  3697. +    //Give the player some good 'ol Newtonian recoil
  3698. +    self.velocity = self.velocity - recoil;
  3699. +    self.avelocity = vectoangles(self.velocity);
  3700. +//END CN_PATCH
  3701. +
  3702.  };
  3703.  
  3704.  
  3705. @@ -611,19 +652,26 @@
  3706.      
  3707.      newmis.touch = spike_touch;
  3708.      newmis.classname = "spike";
  3709. -    newmis.think = SUB_Remove;
  3710. -    newmis.nextthink = time + 6;
  3711.      setmodel (newmis, "progs/spike.mdl");
  3712. -    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);        
  3713. +    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);               
  3714.      setorigin (newmis, org);
  3715.  
  3716.      newmis.velocity = dir * 1000;
  3717. +
  3718. +//CN_PATCH - Aug 96: Setup for missiles in water and player recoil
  3719. +    newmis.nextthink = time + 0.1;
  3720. +    newmis.duration = time + 6;
  3721. +    newmis.think = CN_Missile_Think;
  3722. +    newmis.jump_flag = FALSE;  //id's fields used for our own purpose
  3723. +    newmis.swim_flag = FALSE;
  3724. +//END CN_PATCH
  3725.  };
  3726.  
  3727.  void() W_FireSuperSpikes =
  3728.  {
  3729. -    local vector    dir;
  3730. -    local entity    old;
  3731. +    local vector    dir;
  3732. +    local entity    old;
  3733. +    local vector recoil;
  3734.      
  3735.      sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
  3736.      self.attack_finished = time + 0.2;
  3737. @@ -632,14 +680,22 @@
  3738.      launch_spike (self.origin + '0 0 16', dir);
  3739.      newmis.touch = superspike_touch;
  3740.      setmodel (newmis, "progs/s_spike.mdl");
  3741. -    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);        
  3742. +    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);               
  3743.      self.punchangle_x = -2;
  3744. +
  3745. +//CN_PATCH - recoil for player
  3746. +    recoil = dir * 35;  // calculate recoil
  3747. +    //Give the player some good 'ol Newtonian recoil
  3748. +    self.velocity = self.velocity - recoil;
  3749. +    self.avelocity = vectoangles(self.velocity);
  3750. +//END CN_PATCH
  3751.  };
  3752.  
  3753.  void(float ox) W_FireSpikes =
  3754.  {
  3755. -    local vector    dir;
  3756. -    local entity    old;
  3757. +    local vector    dir;
  3758. +    local entity    old;
  3759. +    local vector recoil;
  3760.      
  3761.      makevectors (self.v_angle);
  3762.      
  3763. @@ -663,6 +719,13 @@
  3764.      launch_spike (self.origin + '0 0 16' + v_right*ox, dir);
  3765.  
  3766.      self.punchangle_x = -2;
  3767. +
  3768. +//CN_PATCH - recoil for player
  3769. +    recoil = dir * 25;  // calculate recoil
  3770. +    //Give the player some good 'ol Newtonian recoil
  3771. +    self.velocity = self.velocity - recoil;
  3772. +    self.avelocity = vectoangles(self.velocity);
  3773. +//END CN_PATCH
  3774.  };
  3775.  
  3776.  
  3777. @@ -675,7 +738,7 @@
  3778.          return;
  3779.  
  3780.      if (other.solid == SOLID_TRIGGER)
  3781. -        return;    // trigger field, do nothing
  3782. +        return; // trigger field, do nothing
  3783.  
  3784.      if (pointcontents(self.origin) == CONTENT_SKY)
  3785.      {
  3786. @@ -715,7 +778,7 @@
  3787.          return;
  3788.  
  3789.      if (other.solid == SOLID_TRIGGER)
  3790. -        return;    // trigger field, do nothing
  3791. +        return; // trigger field, do nothing
  3792.  
  3793.      if (pointcontents(self.origin) == CONTENT_SKY)
  3794.      {
  3795. @@ -753,7 +816,7 @@
  3796.  
  3797.  void() W_SetCurrentAmmo =
  3798.  {
  3799. -    player_run ();        // get out of any weapon firing states
  3800. +    player_run ();          // get out of any weapon firing states
  3801.  
  3802.      self.items = self.items - ( self.items & (IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS) );
  3803.      
  3804. @@ -822,7 +885,7 @@
  3805.  
  3806.  float() W_BestWeapon =
  3807.  {
  3808. -    local    float    it;
  3809. +    local   float   it;
  3810.      
  3811.      it = self.items;
  3812.  
  3813. @@ -871,24 +934,25 @@
  3814.  An attack impulse can be triggered now
  3815.  ============
  3816.  */
  3817. -void()    player_axe1;
  3818. -void()    player_axeb1;
  3819. -void()    player_axec1;
  3820. -void()    player_axed1;
  3821. -void()    player_shot1;
  3822. -void()    player_nail1;
  3823. -void()    player_light1;
  3824. -void()    player_rocket1;
  3825. +void()  player_axe1;
  3826. +void()  player_axeb1;
  3827. +void()  player_axec1;
  3828. +void()  player_axed1;
  3829. +void()  player_shot1;
  3830. +void()  player_nail1;
  3831. +void()  player_light1;
  3832. +void()  player_rocket1;
  3833.  
  3834.  void() W_Attack =
  3835.  {
  3836. -    local    float    r;
  3837. +    local   float   r;
  3838. +    local   string  s;
  3839.  
  3840.      if (!W_CheckNoAmmo ())
  3841.          return;
  3842.  
  3843. -    makevectors    (self.v_angle);            // calculate forward angle for velocity
  3844. -    self.show_hostile = time + 1;    // wake monsters up
  3845. +    makevectors     (self.v_angle);                 // calculate forward angle for velocity
  3846. +    self.show_hostile = time + 1;   // wake monsters up
  3847.  
  3848.      if (self.weapon == IT_AXE)
  3849.      {
  3850. @@ -906,15 +970,97 @@
  3851.      }
  3852.      else if (self.weapon == IT_SHOTGUN)
  3853.      {
  3854. +
  3855. +//CN_PATCH - Aug 96: calculate jamming of shotgun
  3856. +      if (self.use_counter_shot > 20)
  3857. +      {
  3858. +        //re-init for next sample quanta
  3859. +        self.use_counter_shot = 0.0;
  3860. +        self.use_av_shot = 0.0;
  3861. +        self.use_last_shot = time;
  3862. +      } else 
  3863. +      {
  3864. +        // get average firing rate
  3865. +        self.use_counter_shot = self.use_counter_shot + 1.0;
  3866. +        self.use_av_shot = (self.use_av_shot + (time - self.use_last_shot))/2.0;
  3867. +        self.use_last_shot = time;
  3868. +      }
  3869. +
  3870. +      //look at whether to jam weapon or not
  3871. +      if ((self.use_counter_shot > 6.0) && (self.jammed_shot < 1.0))
  3872. +      {
  3873. +        //firing more than 6 - start testing over-use
  3874. +        if ((self.use_av_shot < 0.52) && (random() > 0.93))
  3875. +        {
  3876. +          self.jammed_shot = 1.0;
  3877. +        }
  3878. +      } else
  3879. +      {
  3880. +        //look at unjaming the weapon
  3881. +        if ((self.use_av_shot > 2.0) && (self.use_counter_shot > 6.0)) {
  3882. +          self.jammed_shot = 0.0;
  3883. +          sprint (self, "Unjammed the Shotgun!\n");
  3884. +        }
  3885. +      }
  3886. +      
  3887. +      if (self.jammed_shot < 1.0)
  3888. +      {
  3889.          player_shot1 ();
  3890.          W_FireShotgun ();
  3891.          self.attack_finished = time + 0.5;
  3892. +      } else
  3893. +      {
  3894. +        sprint (self,"Shotgun jammed!\n");
  3895. +        self.attack_finished = time + 0.4;
  3896. +      }
  3897. +//END CN_PATCH
  3898.      }
  3899.      else if (self.weapon == IT_SUPER_SHOTGUN)
  3900.      {
  3901. +
  3902. +//CN_PATCH - Aug 96: calculate jamming of s-shotgun
  3903. +      if (self.use_counter_ss > 20)
  3904. +      {
  3905. +        //re-init for next sample quanta
  3906. +        self.use_counter_ss = 0.0;
  3907. +        self.use_av_ss = 0.0;
  3908. +        self.use_last_ss = time;
  3909. +      } else 
  3910. +      {
  3911. +        // get average firing rate
  3912. +        self.use_counter_ss = self.use_counter_ss + 1.0;
  3913. +        self.use_av_ss = (self.use_av_ss + (time - self.use_last_ss))/2.0;
  3914. +        self.use_last_ss = time;
  3915. +      }
  3916. +
  3917. +      //look at whether to jam weapon or not
  3918. +      if ((self.use_counter_ss > 6.0) && (self.jammed_ss < 1.0))
  3919. +      {
  3920. +        //firing more than 6 - start testing over-use
  3921. +        if ((self.use_av_ss < 0.74) && (random() > 0.86))
  3922. +        {
  3923. +          self.jammed_ss = 1.0;
  3924. +        }
  3925. +      } else
  3926. +      {
  3927. +        //look at unjaming the weapon
  3928. +        if ((self.use_av_ss > 3.0) && (self.use_counter_ss > 6.0)) {
  3929. +          self.jammed_ss = 0.0;
  3930. +          sprint (self,"Unjammed the Super-Shotgun!\n");
  3931. +        }
  3932. +      }
  3933. +      
  3934. +      if (self.jammed_ss < 1.0)
  3935. +      {
  3936.          player_shot1 ();
  3937.          W_FireSuperShotgun ();
  3938.          self.attack_finished = time + 0.7;
  3939. +      } else
  3940. +      {
  3941. +        sprint (self,"Super-Shotgun jammed!\n");
  3942. +        self.attack_finished = time + 0.6;
  3943. +      }
  3944. +//END CN_PATCH
  3945.      }
  3946.      else if (self.weapon == IT_NAILGUN)
  3947.      {
  3948. @@ -926,15 +1072,81 @@
  3949.      }
  3950.      else if (self.weapon == IT_GRENADE_LAUNCHER)
  3951.      {
  3952. +//CN_PATCH - Aug 96: calculate if GL blows up
  3953. +      if (self.use_counter_gl > 10)
  3954. +      {
  3955. +        //re-init for next sample quanta
  3956. +        self.use_counter_gl = 0.0;
  3957. +        self.use_av_gl = 0.0;
  3958. +        self.use_last_gl = time;
  3959. +      } else 
  3960. +      {
  3961. +        // get average firing rate
  3962. +        self.use_counter_gl = self.use_counter_gl + 1.0;
  3963. +        self.use_av_gl = (self.use_av_gl + (time - self.use_last_gl))/2.0;
  3964. +        self.use_last_gl = time;
  3965. +      }
  3966. +
  3967. +      //look at whether to jam weapon or not
  3968. +      if ((self.use_counter_gl > 2.0) && (self.jammed_gl < 1.0))
  3969. +      {
  3970. +        //firing more than 2 - start testing over-use
  3971. +        if ((self.use_av_gl < 0.66) && (random() > 0.65))
  3972. +        {
  3973. +          self.jammed_gl = 1.0;
  3974. +        }
  3975. +      }
  3976. +      
  3977. +      if (self.jammed_gl < 1.0)
  3978. +      {
  3979.          player_rocket1();
  3980.          W_FireGrenade();
  3981.          self.attack_finished = time + 0.6;
  3982. +      } else
  3983. +      {
  3984. +        self.jammed_death = 1;
  3985. +        T_RadiusDamage (self, self, 35*self.ammo_rockets, world);
  3986. +      }
  3987. +//END CN_PATCH
  3988.      }
  3989.      else if (self.weapon == IT_ROCKET_LAUNCHER)
  3990.      {
  3991. +//CN_PATCH - Aug 96: calculate if RL blows up
  3992. +      if (self.use_counter_rocket > 10)
  3993. +      {
  3994. +        //re-init for next sample quanta
  3995. +        self.use_counter_rocket = 0.0;
  3996. +        self.use_av_rocket = 0.0;
  3997. +        self.use_last_rocket = time;
  3998. +      } else 
  3999. +      {
  4000. +        // get average firing rate
  4001. +        self.use_counter_rocket = self.use_counter_rocket + 1.0;
  4002. +        self.use_av_rocket = (self.use_av_rocket + (time - self.use_last_rocket))/2.0;
  4003. +        self.use_last_rocket = time;
  4004. +      }
  4005. +
  4006. +      //look at whether to jam weapon or not
  4007. +      if ((self.use_counter_rocket > 2.0) && (self.jammed_rocket < 1.0))
  4008. +      {
  4009. +        //firing more than 2 - start testing over-use
  4010. +        if ((self.use_av_rocket < 0.92) && (random() > 0.58))
  4011. +        {
  4012. +          self.jammed_rocket = 1.0;
  4013. +        }
  4014. +      }
  4015. +      
  4016. +      if (self.jammed_rocket < 1.0)
  4017. +      {
  4018.          player_rocket1();
  4019.          W_FireRocket();
  4020.          self.attack_finished = time + 0.8;
  4021. +      } else
  4022. +      {
  4023. +        self.jammed_death = 2;
  4024. +        T_RadiusDamage (self, self, 35*self.ammo_rockets, world);
  4025. +      }
  4026. +//END CN_PATCH
  4027.      }
  4028.      else if (self.weapon == IT_LIGHTNING)
  4029.      {
  4030. @@ -952,7 +1164,7 @@
  4031.  */
  4032.  void() W_ChangeWeapon =
  4033.  {
  4034. -    local    float    it, am, fl;
  4035. +    local   float   it, am, fl;
  4036.      
  4037.      it = self.items;
  4038.      am = 0;
  4039. @@ -972,7 +1184,7 @@
  4040.          fl = IT_SUPER_SHOTGUN;
  4041.          if (self.ammo_shells < 2)
  4042.              am = 1;
  4043. -    }        
  4044. +    }               
  4045.      else if (self.impulse == 4)
  4046.      {
  4047.          fl = IT_NAILGUN;
  4048. @@ -1007,13 +1219,13 @@
  4049.      self.impulse = 0;
  4050.      
  4051.      if (!(self.items & fl))
  4052. -    {    // don't have the weapon or the ammo
  4053. +    {       // don't have the weapon or the ammo
  4054.          sprint (self, "no weapon.\n");
  4055.          return;
  4056.      }
  4057.      
  4058.      if (am)
  4059. -    {    // don't have the ammo
  4060. +    {       // don't have the ammo
  4061.          sprint (self, "not enough ammo.\n");
  4062.          return;
  4063.      }
  4064. @@ -1021,7 +1233,7 @@
  4065.  //
  4066.  // set weapon, set ammo
  4067.  //
  4068. -    self.weapon = fl;        
  4069. +    self.weapon = fl;               
  4070.      W_SetCurrentAmmo ();
  4071.  };
  4072.  
  4073. @@ -1035,7 +1247,7 @@
  4074.      if (deathmatch || coop)
  4075.          return;
  4076.  
  4077. -    self.ammo_rockets = 100;
  4078. +    self.ammo_rockets = 20;  //CN_PATCH - changed 100 to 20
  4079.      self.ammo_nails = 200;
  4080.      self.ammo_shells = 100;
  4081.      self.items = self.items | 
  4082. @@ -1065,7 +1277,7 @@
  4083.  */
  4084.  void() CycleWeaponCommand =
  4085.  {
  4086. -    local    float    it, am;
  4087. +    local   float   it, am;
  4088.      
  4089.      it = self.items;
  4090.      self.impulse = 0;
  4091. @@ -1089,7 +1301,7 @@
  4092.              self.weapon = IT_SUPER_SHOTGUN;
  4093.              if (self.ammo_shells < 2)
  4094.                  am = 1;
  4095. -        }        
  4096. +        }               
  4097.          else if (self.weapon == IT_SUPER_SHOTGUN)
  4098.          {
  4099.              self.weapon = IT_NAILGUN;
  4100. @@ -1160,6 +1372,11 @@
  4101.  */
  4102.  void() ImpulseCommands =
  4103.  {
  4104. +  local float  last_player_time_min;    //CN_PATCH
  4105. +  local float  last_player_time_sec;    //CN_PATCH
  4106. +  local float  delta_player_time;       //CN_PATCH
  4107. +  local string string_last_player_time; //CN_PATCH
  4108. +
  4109.      if (self.impulse >= 1 && self.impulse <= 8)
  4110.          W_ChangeWeapon ();
  4111.  
  4112. @@ -1169,10 +1386,52 @@
  4113.          CycleWeaponCommand ();
  4114.      if (self.impulse == 11)
  4115.          ServerflagsCommand ();
  4116. -
  4117.      if (self.impulse == 255)
  4118.          QuadCheat ();
  4119.          
  4120. +//CN_PATCH - impulse mods
  4121. +    if (self.impulse == 183)
  4122. +    {
  4123. +      sprint (self, "v1.3 Modification Features\n");
  4124. +      sprint (self, "* weapons unreliable/explode\n");
  4125. +      sprint (self, "* rockets/armour adds weight\n");
  4126. +      sprint (self, "* weapon recoil effects\n");
  4127. +      sprint (self, "* missile slowdown in water\n");
  4128. +      sprint (self, "* 200pc health box speed increase\n");
  4129. +    }
  4130. +
  4131. +    if (self.impulse == 182)
  4132. +      CN_Ditch_Rockets ();
  4133. +
  4134. +    if (self.impulse == 181)
  4135. +    {
  4136. +      if (last_player_time == 0)
  4137. +        sprint (self, "No previous player.\n");
  4138. +      else
  4139. +      {
  4140. +        delta_player_time = time - last_player_time;
  4141. +        last_player_time_min = floor(delta_player_time / 60);
  4142. +        last_player_time_sec = delta_player_time - last_player_time_min * 60;
  4143. +        sprint(self, "Last player on the server left ");
  4144. +        string_last_player_time = ftos(last_player_time_min);
  4145. +        sprint(self, string_last_player_time);
  4146. +        sprint(self, "mins ");
  4147. +        string_last_player_time = ftos(last_player_time_sec);
  4148. +        sprint(self, string_last_player_time);
  4149. +        sprint(self, "secs ago.\n");
  4150. +      }
  4151. +    }
  4152. +
  4153. +    if (self.impulse == 180)
  4154. +    {
  4155. +      // print help
  4156. +      sprint(self, "Server Help - RW v1.3\n");
  4157. +      sprint(self, "help-rw (imp180) - This help\n");
  4158. +      sprint(self, "rw-features (imp183) - Mod features\n");
  4159. +      sprint(self, "last (imp181) - Last player on server\n");
  4160. +      sprint(self, "dumpr (imp182) - Dump rockets\n");
  4161. +    }
  4162. +//END CN_PATCH
  4163.      self.impulse = 0;
  4164.  };
  4165.  
  4166. diff -ur --new-file v101qc/world.qc progs/world.qc
  4167. --- v101qc/world.qc    Sun Aug 18 02:29:36 1996
  4168. +++ progs/world.qc    Thu Aug 22 11:10:00 1996
  4169. @@ -155,7 +155,7 @@
  4170.  };
  4171.  
  4172.  
  4173. -entity    lastspawn;
  4174. +entity  lastspawn;
  4175.  
  4176.  //=======================
  4177.  /*QUAKED worldspawn (0 0 0) ?
  4178. @@ -174,6 +174,10 @@
  4179.      lastspawn = world;
  4180.      InitBodyQue ();
  4181.  
  4182. +//CN_PATCH
  4183. +  last_player_time = 0;
  4184. +//END CN_PATCH
  4185. +
  4186.  // custom map attributes
  4187.      if (self.model == "maps/e1m8.bsp")
  4188.          cvar_set ("sv_gravity", "100");
  4189. @@ -182,44 +186,44 @@
  4190.  
  4191.  // the area based ambient sounds MUST be the first precache_sounds
  4192.  
  4193. -// player precaches    
  4194. -    W_Precache ();            // get weapon precaches
  4195. +// player precaches     
  4196. +    W_Precache ();                  // get weapon precaches
  4197.  
  4198.  // sounds used from C physics code
  4199. -    precache_sound ("demon/dland2.wav");        // landing thud
  4200. -    precache_sound ("misc/h2ohit1.wav");        // landing splash
  4201. +    precache_sound ("demon/dland2.wav");            // landing thud
  4202. +    precache_sound ("misc/h2ohit1.wav");            // landing splash
  4203.  
  4204.  // setup precaches allways needed
  4205. -    precache_sound ("items/itembk2.wav");        // item respawn sound
  4206. -    precache_sound ("player/plyrjmp8.wav");        // player jump
  4207. -    precache_sound ("player/land.wav");            // player landing
  4208. -    precache_sound ("player/land2.wav");        // player hurt landing
  4209. -    precache_sound ("player/drown1.wav");        // drowning pain
  4210. -    precache_sound ("player/drown2.wav");        // drowning pain
  4211. -    precache_sound ("player/gasp1.wav");        // gasping for air
  4212. -    precache_sound ("player/gasp2.wav");        // taking breath
  4213. -    precache_sound ("player/h2odeath.wav");        // drowning death
  4214. -
  4215. -    precache_sound ("misc/talk.wav");            // talk
  4216. -    precache_sound ("player/teledth1.wav");        // telefrag
  4217. -    precache_sound ("misc/r_tele1.wav");        // teleport sounds
  4218. +    precache_sound ("items/itembk2.wav");           // item respawn sound
  4219. +    precache_sound ("player/plyrjmp8.wav");         // player jump
  4220. +    precache_sound ("player/land.wav");                     // player landing
  4221. +    precache_sound ("player/land2.wav");            // player hurt landing
  4222. +    precache_sound ("player/drown1.wav");           // drowning pain
  4223. +    precache_sound ("player/drown2.wav");           // drowning pain
  4224. +    precache_sound ("player/gasp1.wav");            // gasping for air
  4225. +    precache_sound ("player/gasp2.wav");            // taking breath
  4226. +    precache_sound ("player/h2odeath.wav");         // drowning death
  4227. +
  4228. +    precache_sound ("misc/talk.wav");                       // talk
  4229. +    precache_sound ("player/teledth1.wav");         // telefrag
  4230. +    precache_sound ("misc/r_tele1.wav");            // teleport sounds
  4231.      precache_sound ("misc/r_tele2.wav");
  4232.      precache_sound ("misc/r_tele3.wav");
  4233.      precache_sound ("misc/r_tele4.wav");
  4234.      precache_sound ("misc/r_tele5.wav");
  4235. -    precache_sound ("weapons/lock4.wav");        // ammo pick up
  4236. -    precache_sound ("weapons/pkup.wav");        // weapon up
  4237. -    precache_sound ("items/armor1.wav");        // armor up
  4238. -    precache_sound ("weapons/lhit.wav");        //lightning
  4239. -    precache_sound ("weapons/lstart.wav");        //lightning start
  4240. +    precache_sound ("weapons/lock4.wav");           // ammo pick up
  4241. +    precache_sound ("weapons/pkup.wav");            // weapon up
  4242. +    precache_sound ("items/armor1.wav");            // armor up
  4243. +    precache_sound ("weapons/lhit.wav");            //lightning
  4244. +    precache_sound ("weapons/lstart.wav");          //lightning start
  4245.      precache_sound ("items/damage3.wav");
  4246.  
  4247. -    precache_sound ("misc/power.wav");            //lightning for boss
  4248. +    precache_sound ("misc/power.wav");                      //lightning for boss
  4249.  
  4250.  // player gib sounds
  4251. -    precache_sound ("player/gib.wav");            // player gib sound
  4252. -    precache_sound ("player/udeath.wav");        // player gib sound
  4253. -    precache_sound ("player/tornoff2.wav");        // gib sound
  4254. +    precache_sound ("player/gib.wav");                      // player gib sound
  4255. +    precache_sound ("player/udeath.wav");           // player gib sound
  4256. +    precache_sound ("player/tornoff2.wav");         // gib sound
  4257.  
  4258.  // player pain sounds
  4259.  
  4260. @@ -237,22 +241,22 @@
  4261.      precache_sound ("player/death4.wav");
  4262.      precache_sound ("player/death5.wav");
  4263.  
  4264. -// ax sounds    
  4265. -    precache_sound ("weapons/ax1.wav");            // ax swoosh
  4266. -    precache_sound ("player/axhit1.wav");        // ax hit meat
  4267. -    precache_sound ("player/axhit2.wav");        // ax hit world
  4268. -
  4269. -    precache_sound ("player/h2ojump.wav");        // player jumping into water
  4270. -    precache_sound ("player/slimbrn2.wav");        // player enter slime
  4271. -    precache_sound ("player/inh2o.wav");        // player enter water
  4272. -    precache_sound ("player/inlava.wav");        // player enter lava
  4273. -    precache_sound ("misc/outwater.wav");        // leaving water sound
  4274. +// ax sounds    
  4275. +    precache_sound ("weapons/ax1.wav");                     // ax swoosh
  4276. +    precache_sound ("player/axhit1.wav");           // ax hit meat
  4277. +    precache_sound ("player/axhit2.wav");           // ax hit world
  4278. +
  4279. +    precache_sound ("player/h2ojump.wav");          // player jumping into water
  4280. +    precache_sound ("player/slimbrn2.wav");         // player enter slime
  4281. +    precache_sound ("player/inh2o.wav");            // player enter water
  4282. +    precache_sound ("player/inlava.wav");           // player enter lava
  4283. +    precache_sound ("misc/outwater.wav");           // leaving water sound
  4284.  
  4285. -    precache_sound ("player/lburn1.wav");        // lava burn
  4286. -    precache_sound ("player/lburn2.wav");        // lava burn
  4287. +    precache_sound ("player/lburn1.wav");           // lava burn
  4288. +    precache_sound ("player/lburn2.wav");           // lava burn
  4289.  
  4290. -    precache_sound ("misc/water1.wav");            // swimming
  4291. -    precache_sound ("misc/water2.wav");            // swimming
  4292. +    precache_sound ("misc/water1.wav");                     // swimming
  4293. +    precache_sound ("misc/water2.wav");                     // swimming
  4294.  
  4295.      precache_model ("progs/player.mdl");
  4296.      precache_model ("progs/eyes.mdl");
  4297. @@ -261,8 +265,8 @@
  4298.      precache_model ("progs/gib2.mdl");
  4299.      precache_model ("progs/gib3.mdl");
  4300.  
  4301. -    precache_model ("progs/s_bubble.spr");    // drowning bubbles
  4302. -    precache_model ("progs/s_explod.spr");    // sprite explosion
  4303. +    precache_model ("progs/s_bubble.spr");  // drowning bubbles
  4304. +    precache_model ("progs/s_explod.spr");  // sprite explosion
  4305.  
  4306.      precache_model ("progs/v_axe.mdl");
  4307.      precache_model ("progs/v_shot.mdl");
  4308. @@ -272,10 +276,10 @@
  4309.      precache_model ("progs/v_nail2.mdl");
  4310.      precache_model ("progs/v_rock2.mdl");
  4311.  
  4312. -    precache_model ("progs/bolt.mdl");        // for lightning gun
  4313. -    precache_model ("progs/bolt2.mdl");        // for lightning gun
  4314. -    precache_model ("progs/bolt3.mdl");        // for boss shock
  4315. -    precache_model ("progs/lavaball.mdl");    // for testing
  4316. +    precache_model ("progs/bolt.mdl");              // for lightning gun
  4317. +    precache_model ("progs/bolt2.mdl");             // for lightning gun
  4318. +    precache_model ("progs/bolt3.mdl");             // for boss shock
  4319. +    precache_model ("progs/lavaball.mdl");  // for testing
  4320.      
  4321.      precache_model ("progs/missile.mdl");
  4322.      precache_model ("progs/grenade.mdl");
  4323. @@ -350,16 +354,16 @@
  4324.  ==============================================================================
  4325.  */
  4326.  
  4327. -entity    bodyque_head;
  4328. +entity  bodyque_head;
  4329.  
  4330.  void() bodyque =
  4331. -{    // just here so spawn functions don't complain after the world
  4332. +{       // just here so spawn functions don't complain after the world
  4333.      // creates bodyques
  4334.  };
  4335.  
  4336.  void() InitBodyQue =
  4337.  {
  4338. -    local entity    e;
  4339. +    local entity    e;
  4340.      
  4341.      bodyque_head = spawn();
  4342.      bodyque_head.classname = "bodyque";
  4343.