Merge branch 'magicalmovingfire' into 'master'

Magical moving fire

Closes #278

See merge request STJr/SRB2Internal!453
This commit is contained in:
MascaraSnake 2019-11-11 11:18:20 -05:00
commit 2e1e9b13d9
1 changed files with 8 additions and 10 deletions

View File

@ -2459,16 +2459,6 @@ static boolean P_ZMovement(mobj_t *mo)
P_RemoveMobj(mo);
return false;
}
if (mo->momz
&& !(mo->flags & MF_NOGRAVITY)
&& ((!(mo->eflags & MFE_VERTICALFLIP) && mo->z <= mo->floorz)
|| ((mo->eflags & MFE_VERTICALFLIP) && mo->z+mo->height >= mo->ceilingz)))
{
mo->flags |= MF_NOGRAVITY;
mo->momx = 8; // this is a hack which is used to ensure it still behaves as a missile and can damage others
mo->momy = mo->momz = 0;
mo->z = ((mo->eflags & MFE_VERTICALFLIP) ? mo->ceilingz-mo->height : mo->floorz);
}
break;
case MT_GOOP:
if (P_CheckDeathPitCollide(mo))
@ -9569,6 +9559,14 @@ void P_MobjThinker(mobj_t *mobj)
else
mobj->z = mobj->floorz;
}
else if ((!(mobj->eflags & MFE_VERTICALFLIP) && mobj->z <= mobj->floorz)
|| ((mobj->eflags & MFE_VERTICALFLIP) && mobj->z+mobj->height >= mobj->ceilingz))
{
mobj->flags |= MF_NOGRAVITY;
mobj->momx = 8; // this is a hack which is used to ensure it still behaves as a missile and can damage others
mobj->momy = mobj->momz = 0;
mobj->z = ((mobj->eflags & MFE_VERTICALFLIP) ? mobj->ceilingz-mobj->height : mobj->floorz);
}
/* FALLTHRU */
default:
// check mobj against possible water content, before movement code