From 8d1409a708399d2fdae046c45b37694bb0af7876 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 Nov 2020 06:51:29 +0100 Subject: [PATCH] - bring weaprec handling of RR in line with Duke. This code set a sprite index where a tile number is expected by all other code checking this array. In the stock game this should never trigger, though, as the actor being checked is the burning dynamite which cannot be picked up again as-is. --- source/games/duke/src/actors_r.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index dbdcff553..8587647d1 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -2724,11 +2724,11 @@ DETONATEB: if (ud.coop >= 1) { for (int j = 0; j < ps[p].weapreccnt; j++) - if (ps[p].weaprecs[j] == actor->GetIndex()) + if (ps[p].weaprecs[j] == s->picnum) return; if (ps[p].weapreccnt < 255) - ps[p].weaprecs[ps[p].weapreccnt++] = actor->GetIndex(); + ps[p].weaprecs[ps[p].weapreccnt++] = s->picnum; } addammo(DYNAMITE_WEAPON, &ps[p], 1);