Change A_AddToDeleteQueue() to call A_DeleteSprite() on sprites it removes from the queue directly, as sprites with statnums other than STAT_ACTOR and STAT_MISC are not deleted automatically when their xrepeat is 0. This fixes using CON_INSERTSPRITEQ with sprites of statnums other than STAT_ACTOR and STAT_MISC.

git-svn-id: https://svn.eduke32.com/eduke32@7275 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-12-15 01:39:03 +00:00
parent 49f77b0a21
commit b4404978d6

View file

@ -643,7 +643,8 @@ void A_AddToDeleteQueue(int spriteNum)
}
if (SpriteDeletionQueue[g_spriteDeleteQueuePos] >= 0)
sprite[SpriteDeletionQueue[g_spriteDeleteQueuePos]].xrepeat = 0;
A_DeleteSprite(SpriteDeletionQueue[g_spriteDeleteQueuePos]);
SpriteDeletionQueue[g_spriteDeleteQueuePos] = spriteNum;
g_spriteDeleteQueuePos = (g_spriteDeleteQueuePos+1)%g_deleteQueueSize;
}