More consistent handling of 75% damage reduction below 25% health.
This commit is contained in:
parent
9ed8d6fde9
commit
288e73d8a2
1 changed files with 7 additions and 1 deletions
|
|
@ -630,8 +630,14 @@ Class Demolitionist : PlayerPawn
|
|||
override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle )
|
||||
{
|
||||
// lucky collar
|
||||
if ( Health < 25 ) damage /= 4;
|
||||
if ( source == self ) damage /= 2;
|
||||
if ( Health-damage < 25 )
|
||||
{
|
||||
int splitdmg[2];
|
||||
splitdmg[0] = max(0,Health-25); // non-reduced part (>=25% health)
|
||||
splitdmg[1] = (damage-splitdmg[0])/4; // reduced part (<25% health)
|
||||
damage = splitdmg[0]+splitdmg[1];
|
||||
}
|
||||
if ( !inflictor && !source && (CurSector.flags&Sector.SECF_ENDLEVEL) )
|
||||
{
|
||||
// end level hax
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue