mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 18:50: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;
|
||||
}
|
||||
|
||||
if (SpriteDeletionQueue[g_spriteDeleteQueuePos] >= 0)
|
||||
A_DeleteSprite(SpriteDeletionQueue[g_spriteDeleteQueuePos]);
|
||||
auto &deleteSpriteNum = 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -394,6 +394,7 @@ enum sflags_t
|
|||
SFLAG_WAKEUPBADGUYS = 0x02000000,
|
||||
SFLAG_DAMAGEEVENT = 0x04000000,
|
||||
SFLAG_NOWATERSECTOR = 0x08000000,
|
||||
SFLAG_QUEUEDFORDELETE = 0x10000000,
|
||||
};
|
||||
|
||||
// Custom projectiles "workslike" flags.
|
||||
|
|
|
@ -6000,25 +6000,26 @@ static void C_AddDefaultDefinitions(void)
|
|||
{ "PROJ_XREPEAT", PROJ_XREPEAT },
|
||||
{ "PROJ_YREPEAT", PROJ_YREPEAT },
|
||||
|
||||
{ "SFLAG_BADGUY", SFLAG_BADGUY },
|
||||
{ "SFLAG_DAMAGEEVENT", SFLAG_DAMAGEEVENT },
|
||||
{ "SFLAG_GREENSLIMEFOOD", SFLAG_GREENSLIMEFOOD },
|
||||
{ "SFLAG_HURTSPAWNBLOOD", SFLAG_HURTSPAWNBLOOD },
|
||||
{ "SFLAG_NOCLIP", SFLAG_NOCLIP },
|
||||
{ "SFLAG_NODAMAGEPUSH", SFLAG_NODAMAGEPUSH },
|
||||
{ "SFLAG_NOEVENTS", SFLAG_NOEVENTCODE },
|
||||
{ "SFLAG_NOLIGHT", SFLAG_NOLIGHT },
|
||||
{ "SFLAG_NOPAL", SFLAG_NOPAL },
|
||||
{ "SFLAG_NOSHADE", SFLAG_NOSHADE },
|
||||
{ "SFLAG_NOTELEPORT", SFLAG_NOTELEPORT },
|
||||
{ "SFLAG_NOWATERDIP", SFLAG_NOWATERDIP },
|
||||
{ "SFLAG_NVG", SFLAG_NVG },
|
||||
{ "SFLAG_REALCLIPDIST", SFLAG_REALCLIPDIST },
|
||||
{ "SFLAG_SHADOW", SFLAG_SHADOW },
|
||||
{ "SFLAG_SMOOTHMOVE", SFLAG_SMOOTHMOVE },
|
||||
{ "SFLAG_USEACTIVATOR", SFLAG_USEACTIVATOR },
|
||||
{ "SFLAG_WAKEUPBADGUYS", SFLAG_WAKEUPBADGUYS },
|
||||
{ "SFLAG_NOWATERSECTOR", SFLAG_NOWATERSECTOR },
|
||||
{ "SFLAG_BADGUY", SFLAG_BADGUY },
|
||||
{ "SFLAG_DAMAGEEVENT", SFLAG_DAMAGEEVENT },
|
||||
{ "SFLAG_GREENSLIMEFOOD", SFLAG_GREENSLIMEFOOD },
|
||||
{ "SFLAG_HURTSPAWNBLOOD", SFLAG_HURTSPAWNBLOOD },
|
||||
{ "SFLAG_NOCLIP", SFLAG_NOCLIP },
|
||||
{ "SFLAG_NODAMAGEPUSH", SFLAG_NODAMAGEPUSH },
|
||||
{ "SFLAG_NOEVENTS", SFLAG_NOEVENTCODE },
|
||||
{ "SFLAG_NOLIGHT", SFLAG_NOLIGHT },
|
||||
{ "SFLAG_NOPAL", SFLAG_NOPAL },
|
||||
{ "SFLAG_NOSHADE", SFLAG_NOSHADE },
|
||||
{ "SFLAG_NOTELEPORT", SFLAG_NOTELEPORT },
|
||||
{ "SFLAG_NOWATERDIP", SFLAG_NOWATERDIP },
|
||||
{ "SFLAG_NVG", SFLAG_NVG },
|
||||
{ "SFLAG_REALCLIPDIST", SFLAG_REALCLIPDIST },
|
||||
{ "SFLAG_SHADOW", SFLAG_SHADOW },
|
||||
{ "SFLAG_SMOOTHMOVE", SFLAG_SMOOTHMOVE },
|
||||
{ "SFLAG_USEACTIVATOR", SFLAG_USEACTIVATOR },
|
||||
{ "SFLAG_WAKEUPBADGUYS", SFLAG_WAKEUPBADGUYS },
|
||||
{ "SFLAG_NOWATERSECTOR", SFLAG_NOWATERSECTOR },
|
||||
{ "SFLAG_QUEUEDFORDELETE", SFLAG_QUEUEDFORDELETE },
|
||||
|
||||
{ "STAT_ACTIVATOR", STAT_ACTIVATOR },
|
||||
{ "STAT_ACTOR", STAT_ACTOR },
|
||||
|
|
Loading…
Reference in a new issue