Skip to content

Commit

Permalink
use PLAYERCOUNT() instead of MAX_PLAYERS
Browse files Browse the repository at this point in the history
  • Loading branch information
cylonicboom committed Aug 18, 2024
1 parent 66101b3 commit 97f47bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/chraicommands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 97f47bd

Please sign in to comment.