Merge branch 'amyhearts-fix' into 'next'

Fix NPC Amy's love hearts crashing if they didn't have a set fuse

See merge request STJr/SRB2!641
This commit is contained in:
James R 2020-01-07 01:05:09 -05:00
commit fc1eff6eee
1 changed files with 10 additions and 6 deletions

View File

@ -7977,15 +7977,19 @@ static void P_MobjSceneryThink(mobj_t *mobj)
mobj->x = mobj->extravalue1 + P_ReturnThrustX(mobj, mobj->movedir, mobj->cvmem*mobj->scale);
mobj->y = mobj->extravalue2 + P_ReturnThrustY(mobj, mobj->movedir, mobj->cvmem*mobj->scale);
P_SetThingPosition(mobj);
if ((--mobj->fuse) < 6)
if (!mobj->fuse)
{
if (!mobj->fuse)
{
#ifdef HAVE_BLUA
if (!LUAh_MobjFuse(mobj))
#endif
P_RemoveMobj(mobj);
return;
}
mobj->frame = (mobj->frame & ~FF_TRANSMASK) | ((10 - (mobj->fuse*2)) << (FF_TRANSSHIFT));
return;
}
if (mobj->fuse < 0)
return;
if ((--mobj->fuse) < 6)
mobj->frame = (mobj->frame & ~FF_TRANSMASK) | ((10 - (mobj->fuse*2)) << (FF_TRANSSHIFT));
}
break;
case MT_VWREF: