From 1d28e166c66d056b1c26033c44b406fc81e22589 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 29 Dec 2021 20:24:04 +0100 Subject: [PATCH] - fixed nnexts comparison with statcount. This value is no longer maintained, so we got to count when the value is needed. --- source/games/blood/src/nnexts.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/games/blood/src/nnexts.cpp b/source/games/blood/src/nnexts.cpp index 6f7a65613..99b020df8 100644 --- a/source/games/blood/src/nnexts.cpp +++ b/source/games/blood/src/nnexts.cpp @@ -3652,7 +3652,13 @@ bool condCheckGame(DBloodActor* aCond, const EVENT& event, int cmpOp, bool PUSH) case 30: return Chance((0x10000 * arg3) / kPercFull); // check chance case 31: return condCmp(nnExtRandom(arg1, arg2), arg1, arg2, cmpOp); /*----------------------------------------------------------------------------------------------------------------------------------*/ - case 47: return condCmp(gStatCount[ClipRange(arg3, 0, kMaxStatus)], arg1, arg2, cmpOp); // compare counter of specific statnum sprites + case 47: + { + BloodStatIterator it(ClipRange(arg3, 0, kMaxStatus)); + int c = 0; + while (it.Next()) c++; + return condCmp(c, arg1, arg2, cmpOp); // compare counter of specific statnum sprites + } case 48: return condCmp(Numsprites, arg1, arg2, cmpOp); // compare counter of total sprites }