Preserve Combat Simulator sim list after Co-Op/Counter-Op

This commit is contained in:
Matthew Coppola committed 2025-12-26 21:25:10 -05:00
1 parent 2550ce72f4
commit 0c82545ba9
3 files changed
+14

No files matched your search

+3
View File
@@ -462,6 +462,9 @@ void mainLoop(void)
}
if (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) {
if (g_MpSetup.chrslots & 0xfff0) {
g_MpSetup.storedbotbits = g_MpSetup.chrslots & 0xfff0;
}
g_MpSetup.chrslots = 0x03;
mpReset();
} else if (g_Vars.perfectbuddynum) {
+6
View File
@@ -286,6 +286,12 @@ void menuTick(void)
if (g_MenuData.root == MENUROOT_MPSETUP || g_MenuData.root == MENUROOT_4MBMAINMENU) {
if (g_MenuData.prevmenuroot == -1) {
#ifndef PLATFORM_N64
if (g_MpSetup.storedbotbits) {
g_MpSetup.chrslots |= g_MpSetup.storedbotbits;
g_MpSetup.storedbotbits = 0;
}
#endif
g_MpSetup.chrslots &= 0xfff0;
}
+5
View File
@@ -4107,6 +4107,11 @@ struct mpsetup {
/*0x800acba0*/ u8 weapons[NUM_MPWEAPONSLOTS];
/*0x800acba6*/ u8 paused;
/*0x800acba8*/ struct fileguid fileguid;
#ifndef PLATFORM_N64
// Used to restore the non-player bits of chrslots upon entering Combat
// Simulator, after playing Co-Op/Counter-Op with a human sim.
u16 storedbotbits;
#endif
};
struct bossfile {