Fix issue with non-actor sprites not being deleted at size 0

git-svn-id: https://svn.eduke32.com/eduke32@6526 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2017-12-01 01:49:00 +00:00
parent 7acf811eae
commit 933161fc2d

View file

@ -8225,7 +8225,7 @@ void G_RefreshLights(void)
#endif #endif
} }
static void G_DoEventGame(int nEventID) static void G_DoEventGame(int const nEventID)
{ {
if (VM_HaveEvent(nEventID)) if (VM_HaveEvent(nEventID))
{ {
@ -8254,6 +8254,24 @@ static void G_DoEventGame(int nEventID)
} }
while (statNum < MAXSTATUS); while (statNum < MAXSTATUS);
} }
int statNum = 0;
do
{
int spriteNum = headspritestat[statNum++];
while (spriteNum >= 0)
{
int const nextSprite = nextspritestat[spriteNum];
if (sprite[spriteNum].xrepeat == 0)
A_DeleteSprite(spriteNum);
spriteNum = nextSprite;
}
}
while (statNum < MAXSTATUS);
} }
void G_MoveWorld(void) void G_MoveWorld(void)