mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
Improved the way GFZ3 Eggman slows down in the air when MF2_SKULLFLYing.
This commit is contained in:
parent
7e8f7a59d1
commit
c786dbda78
1 changed files with 5 additions and 6 deletions
11
src/p_mobj.c
11
src/p_mobj.c
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue