home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / quake / programs / heal / heal.txt < prev   
Encoding:
Text File  |  1996-08-26  |  2.3 KB  |  72 lines

  1. Leftover Health Patch
  2.  
  3. After writing the text file for this patch (I can say that at this early
  4. point in the text since I wrote it once and forgot to save it - heh) I've
  5. decided to go ahead and learn to use diff and patch in the future.  Doing
  6. this stuff manually can be a pain - and this was a simple patch!  For now,
  7. please bear with me.
  8.  
  9. CHANGES
  10.  
  11. /****************************************************************************/
  12.  
  13. defs.qc
  14.  
  15. line #690 add
  16.  float (entity ent, float amt, float ignore) Heal; // leftover health func
  17.  
  18. /****************************************************************************/
  19.  
  20. items.qc
  21.  
  22. line #2 add
  23.  void() SUB_healregen;
  24.  
  25. line #162 change T_Heal to Heal
  26.  if (!Heal(other, self.healamount, 1))
  27.  
  28. line #167 change T_Heal to Heal
  29.  if (!Heal(other, self.healamount, 0))
  30.  
  31. line #171 thru line #174 remove
  32.  
  33. line #181 thru line #182 change to
  34.  if (!self.healamount)
  35.  {
  36.   self.model = string_null;
  37.   self.solid = SOLID_NOT;
  38.  }
  39.  
  40. line #198 change to
  41.  self.think = SUB_healregen;
  42.  
  43. /****************************************************************************/
  44.  
  45. progs.src
  46.  
  47. insert heal.qc AFTER items.qc
  48.  
  49. /****************************************************************************/
  50.  
  51. SUMMARY
  52.  
  53. I was always slightly disturbed whenever I thought about the times I had 99%
  54. health and walked over a 25% health box.  You know, how it'd eat 1% of the box
  55. and waste the other 24%.  This patchs aims to fix that, and I think it does a
  56. pretty decent job.  I haven't "thoroughly" tested it, but the tests I did give
  57. it seemed to work fine.  If anybody has experience otherwise, please email me.
  58.  
  59. Simply put, it takes overflow health (ent.health-other.max_health) and puts it
  60. back into the box.  Say you have 88% health and run over a 15% box.  Your
  61. health would go up to 103%, so it overflows 3% back into the box which now
  62. becomes a 3% health box (looks the same - I haven't the tools to do modeling).
  63.  
  64. Next up should be the same deal with ammo boxes.  It bothers me when I have
  65. 197 nails and pick up 25 only to lose 22 of 'em to the void.
  66.  
  67. Chris (heaven@interoz.com)
  68. http://www.interoz.com/usr/heaven 
  69. http://www.sphere.org/quake (this site updated almost daily)
  70. Wrath, Leader of the Seven Deadly Sins (Quake Clan)
  71. Jesus is Lord!
  72.