From a8611266574ba53ba957ee463f7e42caf6edbb08 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 29 Jul 2020 20:59:32 +0200 Subject: [PATCH] - fixed incorrect sprite being passed to reactor() function. --- source/games/duke/src/actors_d.cpp | 2 +- source/games/duke/src/actors_r.cpp | 2 +- source/games/duke/src/gamedef.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 46db22075..4755ffb47 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -3264,7 +3264,7 @@ void moveactors_d(void) case REACTOR: case REACTOR2: - reactor(i, REACTOR, REACTOR2, REACTOR2BURNT, REACTOR2BURNT); + reactor(i, REACTOR, REACTOR2, REACTORBURNT, REACTOR2BURNT); continue; case CAMERA1: diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index 9ee1c8158..548233c8f 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -3240,7 +3240,7 @@ void moveactors_r(void) case REACTOR: case REACTOR2: - reactor(i, REACTOR, REACTOR2, REACTOR2BURNT, REACTOR2BURNT); + reactor(i, REACTOR, REACTOR2, REACTORBURNT, REACTOR2BURNT); continue; case CAMERA1: diff --git a/source/games/duke/src/gamedef.cpp b/source/games/duke/src/gamedef.cpp index 3e8a0bbd8..ab4af6008 100644 --- a/source/games/duke/src/gamedef.cpp +++ b/source/games/duke/src/gamedef.cpp @@ -344,7 +344,7 @@ int findlabel(const char* text, bool ignorecase = false) int getlabelvalue(const char* text) { int lnum = findlabel(text, true); - if (labels[lnum].type != LABEL_DEFINE) return -1; + if (lnum >= 0 && labels[lnum].type != LABEL_DEFINE) return -1; return lnum < 0 ? -1 : labels[lnum].value; }