Duke3d: fix GREENSLIME issue introduced by 6335a9a2e515329a159b03ba0c8a32136dc6ac42

This commit is contained in:
Richard C. Gobeille 2020-06-11 09:59:27 -07:00 committed by Christoph Oelckers
parent 54d9a1a711
commit 4e9144dd20

View file

@ -4739,12 +4739,12 @@ ACTOR_STATIC void G_MoveActors(void)
pSprite->cstat = (playerDist < 1596) ? 0 : 257;
if (pData[0] == GREENSLIME_ONPLAYER && pPlayer->somethingonplayer == spriteNum)
if (pData[0] == GREENSLIME_ONPLAYER)
{
if (sprite[pPlayer->i].extra < 1)
if (sprite[pPlayer->i].extra < 1 && pPlayer->somethingonplayer == spriteNum)
{
pPlayer->somethingonplayer = -1;
pData[0] = GREENSLIME_DONEEATING;
pData[0] = GREENSLIME_TOFLOOR;
goto next_sprite;
}
@ -4827,10 +4827,9 @@ ACTOR_STATIC void G_MoveActors(void)
goto next_sprite;
}
else if (pSprite->xvel < 64 && playerDist < 768)
{
if (pPlayer->somethingonplayer == -1)
if (pPlayer->somethingonplayer == -1 && sprite[pPlayer->i].extra > 0)
{
pPlayer->somethingonplayer = spriteNum;