From 1e8e5d373269bc4410464b0a7d923ac2e3ade05a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 12 Feb 2020 22:48:28 +0100 Subject: [PATCH] - fixed: CON_ADDKILLS in RedNukem code was performing RR-only checks even when playing Duke. Original code looks like this: case 88: insptr++; ps[g_p].actors_killed += *insptr; hittype[g_i].actorstayput = -1; insptr++; break; --- source/rr/src/gameexec.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/rr/src/gameexec.cpp b/source/rr/src/gameexec.cpp index 1dbed53a1..98738d08c 100644 --- a/source/rr/src/gameexec.cpp +++ b/source/rr/src/gameexec.cpp @@ -1830,9 +1830,14 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop) case CON_ADDKILLS: insptr++; - if ((g_spriteExtra[vm.spriteNum] < 1 || g_spriteExtra[vm.spriteNum] == 128) - && A_CheckSpriteFlags(vm.spriteNum, SFLAG_KILLCOUNT)) - P_AddKills(pPlayer, *insptr); + if (g_gameType & GAMEFLAG_RR) + { + // This check does not exist in Duke Nukem. + if ((g_spriteExtra[vm.spriteNum] < 1 || g_spriteExtra[vm.spriteNum] == 128) + && A_CheckSpriteFlags(vm.spriteNum, SFLAG_KILLCOUNT)) + P_AddKills(pPlayer, *insptr); + } + else P_AddKills(pPlayer, *insptr); insptr++; vm.pActor->actorstayput = -1; continue;