From 97f47bd2ae88afdff86a574e43e89a03eda0e408 Mon Sep 17 00:00:00 2001 From: Catherine Reprobate Date: Sun, 18 Aug 2024 12:28:59 -0700 Subject: [PATCH] use PLAYERCOUNT() instead of MAX_PLAYERS --- src/game/chraicommands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/chraicommands.c b/src/game/chraicommands.c index 0db3b9c8b..32009d325 100644 --- a/src/game/chraicommands.c +++ b/src/game/chraicommands.c @@ -2130,7 +2130,7 @@ bool aiIfChrHasObject(void) if (obj && obj->prop && chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { s32 prevplayernum = g_Vars.currentplayernum; if (isChrPropCoop(chr->prop)) { - for (s32 i = 0; i < MAX_PLAYERS; i++) { + for (s32 i = 0; i < PLAYERCOUNT(); i++) { if (hasprop) break; if (g_Vars.coopplayers[i]) { setCurrentPlayerNum(i); @@ -2216,7 +2216,7 @@ bool aiIfChrHasWeaponEquipped(void) u32 prevplayernum = g_Vars.currentplayernum; u32 playernum = playermgrGetPlayerNumByProp(chr->prop); if (g_Vars.coopplayers[playernum]) { - for (s32 i = 0; i < MAX_PLAYERS; i++) { + for (s32 i = 0; i < PLAYERCOUNT(); i++) { if (passes) break; if (g_Vars.coopplayers[i]) { setCurrentPlayerNum(i);