mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-16 01:31:30 +00:00
Merge branch 'magicalmovingfire' into 'master'
Magical moving fire Closes #278 See merge request STJr/SRB2Internal!453
This commit is contained in:
commit
2e1e9b13d9
1 changed files with 8 additions and 10 deletions
18
src/p_mobj.c
18
src/p_mobj.c
|
@ -2459,16 +2459,6 @@ static boolean P_ZMovement(mobj_t *mo)
|
||||||
P_RemoveMobj(mo);
|
P_RemoveMobj(mo);
|
||||||
return false;
|
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;
|
break;
|
||||||
case MT_GOOP:
|
case MT_GOOP:
|
||||||
if (P_CheckDeathPitCollide(mo))
|
if (P_CheckDeathPitCollide(mo))
|
||||||
|
@ -9569,6 +9559,14 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
else
|
else
|
||||||
mobj->z = mobj->floorz;
|
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 */
|
/* FALLTHRU */
|
||||||
default:
|
default:
|
||||||
// check mobj against possible water content, before movement code
|
// check mobj against possible water content, before movement code
|
||||||
|
|
Loading…
Reference in a new issue