Improved the way GFZ3 Eggman slows down in the air when MF2_SKULLFLYing.

This commit is contained in:
toasterbabe 2016-09-29 13:06:07 +01:00
parent 7e8f7a59d1
commit c786dbda78

View file

@ -4438,12 +4438,11 @@ static void P_Boss1Thinker(mobj_t *mobj)
if (mobj->flags2 & MF2_SKULLFLY)
{
if (P_MobjFlip(mobj)*mobj->momz > 0
&& ((mobj->eflags & MFE_VERTICALFLIP
&& (mobj->z+mobj->height) < (mobj->ceilingz-(2*mobj->height)))
|| (!(mobj->eflags & MFE_VERTICALFLIP)
&& mobj->z > (mobj->floorz+(2*mobj->height)))))
mobj->momz = FixedMul(mobj->momz, 60000);
fixed_t dist = (mobj->eflags & MFE_VERTICALFLIP)
? ((mobj->ceilingz-(2*mobj->height)) - (mobj->z+mobj->height))
: (mobj->z - (mobj->floorz+(2*mobj->height)));
if (dist > 0 && P_MobjFlip(mobj)*mobj->momz > 0)
mobj->momz = FixedMul(mobj->momz, FRACUNIT - (dist>>12));
}
else if (mobj->state != &states[mobj->info->spawnstate] && mobj->health > 0 && mobj->flags & MF_FLOAT)
mobj->momz = FixedMul(mobj->momz,7*FRACUNIT/8);