From dbb7965550d9b2dff16bc757fb2d6b8e1ca56fff Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 23 Nov 2022 15:20:54 +0100 Subject: [PATCH] - added two new flags for later use. --- source/core/mainloop.cpp | 2 +- source/games/duke/src/constants.h | 2 ++ source/games/duke/src/flags_d.cpp | 1 + source/games/duke/src/flags_r.cpp | 1 + source/games/duke/src/namelist_r.h | 2 +- source/games/duke/src/player_d.cpp | 2 +- source/games/duke/src/player_r.cpp | 2 +- 7 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 30a664ef9..2f4946820 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -457,7 +457,7 @@ void Display() DrawOverlays(); if (drawtile >= 0) { - DrawTexture(twod, tileGetTexture(drawtile), false, 0, 0, DTA_FullscreenScale, FSMode_Fit320x200, DTA_TopLeft, true, TAG_DONE); + DrawTexture(twod, tileGetTexture(drawtile), false, 0, 0, DTA_FullscreenScale, FSMode_Fit320x200, DTA_TopLeft, true, DTA_ScaleX, 2., DTA_ScaleY, 2., TAG_DONE); } } else diff --git a/source/games/duke/src/constants.h b/source/games/duke/src/constants.h index 121ab0d01..4dbbb269a 100644 --- a/source/games/duke/src/constants.h +++ b/source/games/duke/src/constants.h @@ -367,6 +367,8 @@ enum sflags2_t SFLAG2_DIENOW = 0x00002000, SFLAG2_TRANFERPALTOJIBS = 0x00004000, SFLAG2_NORADIUSPUSH = 0x00008000, + SFLAG2_FREEZEDAMAGE = 0x00010000, + SFLAG2_REFLECTIVE = 0x00020000, }; using EDukeFlags2 = TFlags; diff --git a/source/games/duke/src/flags_d.cpp b/source/games/duke/src/flags_d.cpp index 8535a35af..708e2d117 100644 --- a/source/games/duke/src/flags_d.cpp +++ b/source/games/duke/src/flags_d.cpp @@ -122,6 +122,7 @@ void initactorflags_d() setflag(SFLAG2_DIENOW, { RADIUSEXPLOSION, KNEE }); setflag(SFLAG2_TRANFERPALTOJIBS, { LIZTROOP }); setflag(SFLAG2_NORADIUSPUSH, { TANK, ROTATEGUN, RECON }); + setflag(SFLAG2_FREEZEDAMAGE | SFLAG2_REFLECTIVE, { FREEZEBLAST }); if (isWorldTour()) { diff --git a/source/games/duke/src/flags_r.cpp b/source/games/duke/src/flags_r.cpp index 5acedea32..d84f67ba4 100644 --- a/source/games/duke/src/flags_r.cpp +++ b/source/games/duke/src/flags_r.cpp @@ -179,6 +179,7 @@ void initactorflags_r() setflag(SFLAG2_ALWAYSROTATE1, { RAT, CAMERA1 }); setflag(SFLAG2_DIENOW, { RADIUSEXPLOSION }); setflag(SFLAG2_NORADIUSPUSH, { HULK }); + setflag(SFLAG2_FREEZEDAMAGE | SFLAG2_REFLECTIVE, { FREEZEBLAST }); // Animals were not supposed to have this, but due to a coding bug the logic was unconditional for everything in the game. diff --git a/source/games/duke/src/namelist_r.h b/source/games/duke/src/namelist_r.h index 3794b0e75..d3eddc4c1 100644 --- a/source/games/duke/src/namelist_r.h +++ b/source/games/duke/src/namelist_r.h @@ -599,7 +599,7 @@ x(FORCESPHERE, 1759) x(SHOTSPARK1, 1764) x(RPG, 1774) x(RPG2, 1781) -y(RRTILE1790, 1790) +x(BOATGRENADE, 1790) y(RRTILE1792, 1792) y(RRTILE1801, 1801) y(RRTILE1805, 1805) diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 30e6aabc1..e76621fd4 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -727,7 +727,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw if (!spawned) return; spawned->spr.extra += (krand() & 7); - if (atwith != FREEZEBLAST) + if (!(actorflag(spawned, SFLAG2_REFLECTIVE))) spawned->temp_actor = aimed; else { diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index af6fe8d6f..4a837e754 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -657,7 +657,7 @@ static void shootrpg(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int atw } spawned->spr.extra += (krand() & 7); - if (atwith != FREEZEBLAST) + if (!(actorflag(spawned, SFLAG2_REFLECTIVE))) spawned->temp_actor = aimed; else {