mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 13:21:31 +00:00
Merge branch 'falling-rocks-fix' into 'next'
Falling rocks fix This fixes the rock spawners' rocks not being removed if they rolled down to the ground from a slope rather than bouncing (see https://mb.srb2.org/showthread.php?t=41963) See merge request !162
This commit is contained in:
commit
e03577d957
1 changed files with 12 additions and 0 deletions
12
src/p_mobj.c
12
src/p_mobj.c
|
@ -6648,6 +6648,18 @@ 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->eflags & MFE_VERTICALFLIP) ?
|
||||||
|
mobj->z + mobj->height >= mobj->ceilingz
|
||||||
|
: mobj->z <= mobj->floorz))
|
||||||
|
{
|
||||||
|
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