Skip to content

Commit

Permalink
- fixed: CON_ADDKILLS in RedNukem code was performing RR-only checks …
Browse files Browse the repository at this point in the history
…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;
  • Loading branch information
coelckers committed Feb 12, 2020
1 parent 1c24ae3 commit 1e8e5d3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions source/rr/src/gameexec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1e8e5d3

Please sign in to comment.