mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Add SFLAG_QUEUEDFORDELETE, to handle detection and manipulation of things like decal sprites marked for deletion
git-svn-id: https://svn.eduke32.com/eduke32@7604 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
301ac48ccd
commit
e9116bd23a
3 changed files with 27 additions and 22 deletions
|
@ -675,10 +675,13 @@ void A_AddToDeleteQueue(int spriteNum)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SpriteDeletionQueue[g_spriteDeleteQueuePos] >= 0)
|
auto &deleteSpriteNum = SpriteDeletionQueue[g_spriteDeleteQueuePos];
|
||||||
A_DeleteSprite(SpriteDeletionQueue[g_spriteDeleteQueuePos]);
|
|
||||||
|
|
||||||
SpriteDeletionQueue[g_spriteDeleteQueuePos] = spriteNum;
|
if (deleteSpriteNum >= 0 && actor[deleteSpriteNum].flags & SFLAG_QUEUEDFORDELETE)
|
||||||
|
A_DeleteSprite(deleteSpriteNum);
|
||||||
|
|
||||||
|
deleteSpriteNum = spriteNum;
|
||||||
|
actor[spriteNum].flags |= SFLAG_QUEUEDFORDELETE;
|
||||||
g_spriteDeleteQueuePos = (g_spriteDeleteQueuePos+1)%g_deleteQueueSize;
|
g_spriteDeleteQueuePos = (g_spriteDeleteQueuePos+1)%g_deleteQueueSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -394,6 +394,7 @@ enum sflags_t
|
||||||
SFLAG_WAKEUPBADGUYS = 0x02000000,
|
SFLAG_WAKEUPBADGUYS = 0x02000000,
|
||||||
SFLAG_DAMAGEEVENT = 0x04000000,
|
SFLAG_DAMAGEEVENT = 0x04000000,
|
||||||
SFLAG_NOWATERSECTOR = 0x08000000,
|
SFLAG_NOWATERSECTOR = 0x08000000,
|
||||||
|
SFLAG_QUEUEDFORDELETE = 0x10000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Custom projectiles "workslike" flags.
|
// Custom projectiles "workslike" flags.
|
||||||
|
|
|
@ -6019,6 +6019,7 @@ static void C_AddDefaultDefinitions(void)
|
||||||
{ "SFLAG_USEACTIVATOR", SFLAG_USEACTIVATOR },
|
{ "SFLAG_USEACTIVATOR", SFLAG_USEACTIVATOR },
|
||||||
{ "SFLAG_WAKEUPBADGUYS", SFLAG_WAKEUPBADGUYS },
|
{ "SFLAG_WAKEUPBADGUYS", SFLAG_WAKEUPBADGUYS },
|
||||||
{ "SFLAG_NOWATERSECTOR", SFLAG_NOWATERSECTOR },
|
{ "SFLAG_NOWATERSECTOR", SFLAG_NOWATERSECTOR },
|
||||||
|
{ "SFLAG_QUEUEDFORDELETE", SFLAG_QUEUEDFORDELETE },
|
||||||
|
|
||||||
{ "STAT_ACTIVATOR", STAT_ACTIVATOR },
|
{ "STAT_ACTIVATOR", STAT_ACTIVATOR },
|
||||||
{ "STAT_ACTOR", STAT_ACTOR },
|
{ "STAT_ACTOR", STAT_ACTOR },
|
||||||
|
|
Loading…
Reference in a new issue