Leftover Health Patch

After writing the text file for this patch (I can say that at this early
point in the text since I wrote it once and forgot to save it - heh) I've
decided to go ahead and learn to use diff and patch in the future.  Doing
this stuff manually can be a pain - and this was a simple patch!  For now,
please bear with me.

CHANGES

/****************************************************************************/

defs.qc

line #690 add
 float (entity ent, float amt, float ignore) Heal; // leftover health func

/****************************************************************************/

items.qc

line #2 add
 void() SUB_healregen;

line #162 change T_Heal to Heal
 if (!Heal(other, self.healamount, 1))

line #167 change T_Heal to Heal
 if (!Heal(other, self.healamount, 0))

line #171 thru line #174 remove

line #181 thru line #182 change to
 if (!self.healamount)
 {
  self.model = string_null;
  self.solid = SOLID_NOT;
 }

line #198 change to
 self.think = SUB_healregen;

/****************************************************************************/

progs.src

insert heal.qc AFTER items.qc

/****************************************************************************/

SUMMARY

I was always slightly disturbed whenever I thought about the times I had 99%
health and walked over a 25% health box.  You know, how it'd eat 1% of the box
and waste the other 24%.  This patchs aims to fix that, and I think it does a
pretty decent job.  I haven't "thoroughly" tested it, but the tests I did give
it seemed to work fine.  If anybody has experience otherwise, please email me.

Simply put, it takes overflow health (ent.health-other.max_health) and puts it
back into the box.  Say you have 88% health and run over a 15% box.  Your
health would go up to 103%, so it overflows 3% back into the box which now
becomes a 3% health box (looks the same - I haven't the tools to do modeling).

Next up should be the same deal with ammo boxes.  It bothers me when I have
197 nails and pick up 25 only to lose 22 of 'em to the void.

Chris (heaven@interoz.com)
http://www.interoz.com/usr/heaven 
http://www.sphere.org/quake (this site updated almost daily)
Wrath, Leader of the Seven Deadly Sins (Quake Clan)
Jesus is Lord!
