From 47d4e4f6597cfdc6196ab4ffba259f7fd9ca7487 Mon Sep 17 00:00:00 2001 From: tmyqlfpir <80724828+tmyqlfpir@users.noreply.github.com> Date: Sun, 20 Aug 2023 20:33:52 +1000 Subject: [PATCH] Fix menu crash when issuing order to all bots --- src/game/activemenu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/activemenu.c b/src/game/activemenu.c index f3f496a2a..89ca6f5d7 100644 --- a/src/game/activemenu.c +++ b/src/game/activemenu.c @@ -609,6 +609,9 @@ void amChangeScreen(s32 step) if (g_AmMenus[g_AmIndex].allbots) { // Weapon selection, second function, and bot command menu +#ifndef PLATFORM_N64 // fix for port + maxscreenindex = g_Vars.currentplayer->numaibuddies > 0 ? 2 : 1; +#else // @bug: This is missing a check to see if there are any bots on // your team. In most cases this isn't a problem because the player // opens the screen for a single bot then uses R to switch to all @@ -618,6 +621,7 @@ void amChangeScreen(s32 step) // part runs first and sets the screen index to an invalid value, // causing a crash. maxscreenindex = 2; +#endif } else { // Weapon selection, second function and one for each AI buddy maxscreenindex = g_Vars.currentplayer->numaibuddies + 1;