Merge pull request #680 from ZenithMDC/preserve-cs-sim-list

Preserve Combat Simulator sim list after Co-Op/Counter-Op
This commit is contained in:
fgsfds authored and GitHub committed 2026-01-07 09:21:18 +01:00
commit 246d737663
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_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) {
if (g_MpSetup.chrslots & 0xfff0) {
g_MpSetup.storedbotbits = g_MpSetup.chrslots & 0xfff0;
}
g_MpSetup.chrslots = 0x03; g_MpSetup.chrslots = 0x03;
mpReset(); mpReset();
} else if (g_Vars.perfectbuddynum) { } 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.root == MENUROOT_MPSETUP || g_MenuData.root == MENUROOT_4MBMAINMENU) {
if (g_MenuData.prevmenuroot == -1) { 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; g_MpSetup.chrslots &= 0xfff0;
} }
+5
View File
@@ -4107,6 +4107,11 @@ struct mpsetup {
/*0x800acba0*/ u8 weapons[NUM_MPWEAPONSLOTS]; /*0x800acba0*/ u8 weapons[NUM_MPWEAPONSLOTS];
/*0x800acba6*/ u8 paused; /*0x800acba6*/ u8 paused;
/*0x800acba8*/ struct fileguid fileguid; /*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 { struct bossfile {