From d3f2d50088ce12c778d60da6788396a6f3fb04c4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 19 Jan 2022 11:23:38 +0100 Subject: [PATCH] - added NOFLOORPAL flag to remove some special cases from animatesprites. # Conflicts: # source/games/duke/src/constants.h --- source/games/duke/src/animatesprites_d.cpp | 4 +--- source/games/duke/src/constants.h | 1 + source/games/duke/src/flags_d.cpp | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/games/duke/src/animatesprites_d.cpp b/source/games/duke/src/animatesprites_d.cpp index c97905e0d..44b706aee 100644 --- a/source/games/duke/src/animatesprites_d.cpp +++ b/source/games/duke/src/animatesprites_d.cpp @@ -201,8 +201,6 @@ void animatesprites_d(tspritetype* tsprite, int& spritesortcnt, int x, int y, in case PAPER: case PAPER + 1: break; - case TRIPBOMB: - continue; case FORCESPHERE: if (t->statnum == STAT_MISC && OwnerAc) { @@ -488,7 +486,7 @@ void animatesprites_d(tspritetype* tsprite, int& spritesortcnt, int x, int y, in [[fallthrough]]; default: - if (sectp->floorpal) + if (sectp->floorpal && !actorflag(h, SFLAG2_NOFLOORPAL)) copyfloorpal(t, sectp); break; } diff --git a/source/games/duke/src/constants.h b/source/games/duke/src/constants.h index 9c7883376..36f624182 100644 --- a/source/games/duke/src/constants.h +++ b/source/games/duke/src/constants.h @@ -336,6 +336,7 @@ enum sflags2_t SFLAG2_USEACTIVATOR = 0x00000001, SFLAG2_NOROTATEWITHSECTOR = 0x00000002, SFLAG2_SHOWWALLSPRITEONMAP = 0x00000004, + SFLAG2_NOFLOORPAL = 0x00000008, }; using EDukeFlags2 = TFlags; diff --git a/source/games/duke/src/flags_d.cpp b/source/games/duke/src/flags_d.cpp index 3476872f7..8cb582539 100644 --- a/source/games/duke/src/flags_d.cpp +++ b/source/games/duke/src/flags_d.cpp @@ -213,6 +213,7 @@ void initactorflags_d() setflag(SFLAG_NOFALLER, { CRACK1, CRACK2, CRACK3, CRACK4, SPEAKER, LETTER, DUCK, TARGET, TRIPBOMB, VIEWSCREEN, VIEWSCREEN2 }); setflag(SFLAG2_NOROTATEWITHSECTOR, { LASERLINE }); setflag(SFLAG2_SHOWWALLSPRITEONMAP, { LASERLINE }); + setflag(SFLAG2_NOFLOORPAL, { TRIPBOMB, LASERLINE }); if (isWorldTour()) {