- added DavidPH's LifeSteal patch for A_CustomPunch/A_Saw.

SVN r2317 (trunk)
This commit is contained in:
Christoph Oelckers 2010-05-12 07:08:39 +00:00
commit 6a57a43277
3 changed files with 16 additions and 4 deletions

View file

@ -1080,6 +1080,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
ACTION_PARAM_BOOL(UseAmmo, 2);
ACTION_PARAM_CLASS(PuffType, 3);
ACTION_PARAM_FIXED(Range, 4);
ACTION_PARAM_FIXED(LifeSteal, 5);
if (!self->player) return;
@ -1110,6 +1111,9 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
// turn to face target
if (linetarget)
{
if (LifeSteal)
P_GiveBody (self, (Damage * LifeSteal) >> FRACBITS);
S_Sound (self, CHAN_WEAPON, weapon->AttackSound, 1, ATTN_NORM);
self->angle = R_PointToAngle2 (self->x,