mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-07-29 23:37:33 -04:00
Rename g_Vars.unk000318 to g_Vars.mplayerisrunning
This commit is contained in:
+4
-4
@@ -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) |
|
||||
|
||||
+6
-2
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user