Duke3d: add player .somethingonplayer check to GREENSLIME, and reset the player's .somethingonplayer to -1 if the player is dead

This commit is contained in:
Richard C. Gobeille 2020-06-11 08:16:03 -07:00 committed by Christoph Oelckers
parent 39b1c3cee9
commit 5574f0bd74

View file

@ -4725,10 +4725,11 @@ ACTOR_STATIC void G_MoveActors(void)
pSprite->cstat = (playerDist < 1596) ? 0 : 257;
if (pData[0] == -4) //On the player
if (pData[0] == -4 && pPlayer->somethingonplayer == spriteNum) //On the player
{
if (sprite[pPlayer->i].extra < 1)
{
pPlayer->somethingonplayer = -1;
pData[0] = 0;
goto next_sprite;
}