- 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;
This commit is contained in:
Christoph Oelckers 2020-02-12 22:48:28 +01:00
parent 1c24ae3fad
commit 1e8e5d3732

View file

@ -1830,9 +1830,14 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
case CON_ADDKILLS: case CON_ADDKILLS:
insptr++; insptr++;
if ((g_spriteExtra[vm.spriteNum] < 1 || g_spriteExtra[vm.spriteNum] == 128) if (g_gameType & GAMEFLAG_RR)
&& A_CheckSpriteFlags(vm.spriteNum, SFLAG_KILLCOUNT)) {
P_AddKills(pPlayer, *insptr); // 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++; insptr++;
vm.pActor->actorstayput = -1; vm.pActor->actorstayput = -1;
continue; continue;