Merge branch 'floating-item-fixes' into 'master'

Floating item fixes

See merge request KartKrew/Kart!116
This commit is contained in:
Sal 2018-11-29 08:00:56 -05:00
commit 594fae05ff

View file

@ -7940,7 +7940,12 @@ void P_MobjThinker(mobj_t *mobj)
{ {
if (mobj->flags & MF_NOCLIPTHING) if (mobj->flags & MF_NOCLIPTHING)
{ {
if (P_IsObjectOnGround(mobj)) if (P_CheckDeathPitCollide(mobj))
{
P_RemoveMobj(mobj);
return;
}
else if (P_IsObjectOnGround(mobj))
{ {
mobj->momx = 1; mobj->momx = 1;
mobj->momy = 0; mobj->momy = 0;
@ -7986,6 +7991,10 @@ void P_MobjThinker(mobj_t *mobj)
mobj->sprite = SPR_ITEM; mobj->sprite = SPR_ITEM;
mobj->frame = FF_FULLBRIGHT|FF_PAPERSPRITE; mobj->frame = FF_FULLBRIGHT|FF_PAPERSPRITE;
break; break;
case KITEM_SPB:
case KITEM_SHRINK:
indirectitemcooldown = 20*TICRATE;
/* FALLTHRU */
default: default:
mobj->sprite = SPR_ITEM; mobj->sprite = SPR_ITEM;
mobj->frame = FF_FULLBRIGHT|FF_PAPERSPRITE|(mobj->threshold); mobj->frame = FF_FULLBRIGHT|FF_PAPERSPRITE|(mobj->threshold);