From 5a6d4f88d5f653ece2de26973b5bf96c57305e29 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 11 Nov 2021 01:10:37 +0100 Subject: [PATCH] - Exhumed: eliminate all remaining MAXSECTORS references --- source/games/exhumed/src/queen.cpp | 2 +- source/games/exhumed/src/ra.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/exhumed/src/queen.cpp b/source/games/exhumed/src/queen.cpp index 131aa91d1..b9c654c3d 100644 --- a/source/games/exhumed/src/queen.cpp +++ b/source/games/exhumed/src/queen.cpp @@ -920,7 +920,7 @@ void AIQueenHead::Tick(RunListEvent* ev) MoveQX[nQHead] = pSprite->x; MoveQY[nQHead] = pSprite->y; MoveQZ[nQHead] = pSprite->z; - assert(pSprite->sectnum >= 0 && pSprite->sectnum < kMaxSectors); + assert(validSectorIndex(pSprite->sectnum)); MoveQS[nQHead] = pSprite->sectnum; MoveQA[nQHead] = pSprite->ang; diff --git a/source/games/exhumed/src/ra.cpp b/source/games/exhumed/src/ra.cpp index ce5e84f69..6e796963f 100644 --- a/source/games/exhumed/src/ra.cpp +++ b/source/games/exhumed/src/ra.cpp @@ -121,7 +121,7 @@ void MoveRaToEnemy(short nPlayer) if (pTarget) { auto pTargSprite = &pTarget->s(); - if (!(pTargSprite->cstat & 0x101) || pTargSprite->sectnum == MAXSECTORS) + if (!(pTargSprite->cstat & 0x101) || pTargSprite->statnum == MAXSTATUS) { Ra[nPlayer].pTarget = nullptr; if (nAction == 0 || nAction == 3) {