diff --git a/src/game/cheats.c b/src/game/cheats.c index 8476d4a49..52128669d 100644 --- a/src/game/cheats.c +++ b/src/game/cheats.c @@ -75,7 +75,7 @@ void cheatActivate(s32 cheat_id) break; case CHEAT_ALLGUNS: // Give all guns if only one player playing - if (PLAYERCOUNT() == 1 && g_Vars.unk000318 == 0) { + if (PLAYERCOUNT() == 1 && g_Vars.mplayerisrunning == false) { prevplayernum = g_Vars.currentplayernum; for (playernum = 0; playernum < PLAYERCOUNT(); playernum++) { @@ -112,7 +112,7 @@ void cheatDeactivate(s32 cheat_id) setCurrentPlayerNum(prevplayernum); break; case CHEAT_ALLGUNS: - if (PLAYERCOUNT() == 1 && g_Vars.unk000318 == 0) { + if (PLAYERCOUNT() == 1 && g_Vars.mplayerisrunning == false) { prevplayernum = g_Vars.currentplayernum; for (playernum = 0; playernum < PLAYERCOUNT(); playernum++) { @@ -148,8 +148,8 @@ void cheatsActivate(void) g_CheatsActiveBank0 = g_CheatsEnabledBank0; g_CheatsActiveBank1 = g_CheatsEnabledBank1; - if (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0 || g_Vars.unk000318) { - // Co-op/counter-op - deactivate "Weapons for Jo in Solo" cheats + if (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0 || g_Vars.mplayerisrunning) { + // Co-op/counter-op/multi - deactivate "Weapons for Jo in Solo" cheats g_CheatsActiveBank0 &= ~( (1 << CHEAT_TRENTSMAGNUM) | (1 << CHEAT_FARSIGHT) | diff --git a/src/game/chr/chr.c b/src/game/chr/chr.c index 7fe715767..1b85fc3c6 100644 --- a/src/game/chr/chr.c +++ b/src/game/chr/chr.c @@ -50002,13 +50002,15 @@ bool chrCompareTeams(struct chrdata *chr1, struct chrdata *chr2, u8 checktype) } if (checktype == 1) { // Return true if chrs are friends - if (g_Vars.unk000318) { + if (g_Vars.mplayerisrunning) { if ((g_MpSetup.options & MPOPTION_TEAMSENABLED) && chr2->team == chr1->team) { return true; } } else { if (g_Vars.bond && g_Vars.bond->prop) { struct chrdata *playerchr = g_Vars.bond->prop->chr; + + // @bug: This makes Jon an ally in Duel if ((chr2 == playerchr && chr1->headnum == HEAD_JONATHAN) || (chr1 == playerchr && chr2->headnum == HEAD_JONATHAN)) { return true; @@ -50020,13 +50022,15 @@ bool chrCompareTeams(struct chrdata *chr1, struct chrdata *chr2, u8 checktype) } } } else if (checktype == 2) { // Return true if chrs are enemies - if (g_Vars.unk000318) { + if (g_Vars.mplayerisrunning) { if ((g_MpSetup.options & MPOPTION_TEAMSENABLED) == 0 || chr2->team != chr1->team) { return true; } } else { if (g_Vars.bond && g_Vars.bond->prop) { struct chrdata *playerchr = g_Vars.bond->prop->chr; + + // @bug: This makes Jon an ally in Duel if ((chr2 == playerchr && chr1->headnum == HEAD_JONATHAN) || (chr1 == playerchr && chr2->headnum == HEAD_JONATHAN)) { return false; diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 3cd4d6c04..b8b6a5bb7 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -14184,7 +14184,7 @@ glabel ai01dd */ bool aiIfCoopMode(void) { - if (g_Vars.unk000318 == 0 && g_MissionConfig.iscoop) { + if (g_Vars.mplayerisrunning == false && g_MissionConfig.iscoop) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { diff --git a/src/game/game_0f09f0.c b/src/game/game_0f09f0.c index 092f8c73f..aa976197c 100644 --- a/src/game/game_0f09f0.c +++ b/src/game/game_0f09f0.c @@ -16333,7 +16333,7 @@ void activemenuChangeScreen(s32 step) g_ActiveMenuThings[g_ActiveMenuIndex].screenindex += step; - if (g_Vars.unk000318 && (g_MpSetup.options & MPOPTION_TEAMSENABLED)) { + if (g_Vars.mplayerisrunning && (g_MpSetup.options & MPOPTION_TEAMSENABLED)) { if (g_ActiveMenuThings[g_ActiveMenuIndex].unk32) { // Weapon selection, second function, and ...? maxscreenindex = 2; diff --git a/src/game/game_176d70.c b/src/game/game_176d70.c index 7854717a4..e93e81b53 100644 --- a/src/game/game_176d70.c +++ b/src/game/game_176d70.c @@ -14670,7 +14670,7 @@ glabel func0f185568 void scenarioCallback10(void) { - if (g_Vars.unk000318 != 0) { + if (g_Vars.mplayerisrunning) { if (g_Vars.lvframenum == 5) { func0f185568(); } @@ -14683,7 +14683,7 @@ void scenarioCallback10(void) void scenarioCallback14(struct chrdata *chr) { - if (g_Vars.unk000318 && g_MpScenarios[g_MpSetup.scenario].unk14) { + if (g_Vars.mplayerisrunning && g_MpScenarios[g_MpSetup.scenario].unk14) { g_MpScenarios[g_MpSetup.scenario].unk14(chr); } } @@ -15097,7 +15097,7 @@ glabel func0f185c14 s32 scenarioRadar(s32 value) { - if (g_Vars.unk000318 && g_MpScenarios[g_MpSetup.scenario].radarfunc) { + if (g_Vars.mplayerisrunning && g_MpScenarios[g_MpSetup.scenario].radarfunc) { return g_MpScenarios[g_MpSetup.scenario].radarfunc(value); } @@ -15106,7 +15106,7 @@ s32 scenarioRadar(s32 value) bool scenarioRadar2(s32 *displaylist, struct prop *prop) { - if (g_Vars.unk000318 && g_MpScenarios[g_MpSetup.scenario].radar2func) { + if (g_Vars.mplayerisrunning && g_MpScenarios[g_MpSetup.scenario].radar2func) { return g_MpScenarios[g_MpSetup.scenario].radar2func(displaylist, prop); } @@ -15350,7 +15350,7 @@ f32 scenarioCallback2c(f32 arg0, s32 arg1, s32 arg2, struct prop *prop) { f32 result; - if (g_Vars.unk000318 && g_MpScenarios[g_MpSetup.scenario].unk2c && + if (g_Vars.mplayerisrunning && g_MpScenarios[g_MpSetup.scenario].unk2c && g_MpScenarios[g_MpSetup.scenario].unk2c(arg0, arg1, arg2, prop, &result)) { return result; } diff --git a/src/include/gvars/gvars.h b/src/include/gvars/gvars.h index 454438c81..cf31c560b 100644 --- a/src/include/gvars/gvars.h +++ b/src/include/gvars/gvars.h @@ -79,7 +79,7 @@ struct g_vars { /*00030c*/ u32 unk00030c; /*000310*/ u32 unk000310; /*000314*/ u32 unk000314; - /*000318*/ u32 unk000318; + /*000318*/ bool mplayerisrunning; /*00031c*/ u32 unk00031c; /*000320*/ u32 unk000320; /*000324*/ u32 unk000324;