mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Make sure rocks spawned by the rock spawners despawn when they're on the floor and not moving
This commit is contained in:
parent
a29ced725d
commit
659a62db88
1 changed files with 11 additions and 0 deletions
11
src/p_mobj.c
11
src/p_mobj.c
|
@ -6648,6 +6648,17 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
else switch (mobj->type)
|
else switch (mobj->type)
|
||||||
{
|
{
|
||||||
|
case MT_FALLINGROCK:
|
||||||
|
// Despawn rocks here in case zmovement code can't do so (blame slopes)
|
||||||
|
if (!mobj->momx && !mobj->momy && !mobj->momz
|
||||||
|
&& ((mobj->z <= mobj->floorz && !(mobj->eflags & MFE_VERTICALFLIP))
|
||||||
|
|| (mobj->z + mobj->height >= mobj->ceilingz && mobj->eflags & MFE_VERTICALFLIP)))
|
||||||
|
{
|
||||||
|
P_RemoveMobj(mobj);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
P_MobjCheckWater(mobj);
|
||||||
|
break;
|
||||||
case MT_EMERALDSPAWN:
|
case MT_EMERALDSPAWN:
|
||||||
if (mobj->threshold)
|
if (mobj->threshold)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue