Skip to content

Commit

Permalink
port: fix start armed mpoption
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonaeru committed May 19, 2024
1 parent dce96a4 commit 476093a
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/game/bot.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ void botSpawn(struct chrdata *chr, u8 respawning)
func0f02e9a0(chr, 0);

#ifndef PLATFORM_N64
if ((g_MpSetup.options & MPOPTION_SPAWNWITHWEAPON)
if (!(g_MpSetup.options & MPOPTION_STARTARMED)
&& g_MpSetup.weapons[0] != MPWEAPON_NONE
&& g_MpSetup.weapons[0] != MPWEAPON_DISABLED
&& g_MpSetup.weapons[0] != MPWEAPON_SHIELD) {
Expand Down
1 change: 1 addition & 0 deletions src/game/mplayer/mplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ void mpInit(void)
| MPOPTION_PAC_SHOWONRADAR;

#ifndef PLATFORM_N64
g_MpSetup.options |= MPOPTION_STARTARMED;
g_MpSetup.options |= MPOPTION_FRIENDLYFIRE;
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/game/mplayer/scenarios/capturethecase.inc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct menuitem g_CtcOptionsMenuItems[] = {
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"Start Armed",
MPOPTION_SPAWNWITHWEAPON,
MPOPTION_STARTARMED,
menuhandlerMpCheckboxOption,
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/mplayer/scenarios/combat.inc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct menuitem g_MpCombatOptionsMenuItems[] = {
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"Start Armed",
MPOPTION_SPAWNWITHWEAPON,
MPOPTION_STARTARMED,
menuhandlerMpCheckboxOption,
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/mplayer/scenarios/hackthatmac.inc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct menuitem g_HtmOptionsMenuItems[] = {
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"Start Armed",
MPOPTION_SPAWNWITHWEAPON,
MPOPTION_STARTARMED,
menuhandlerMpCheckboxOption,
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/mplayer/scenarios/holdthebriefcase.inc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct menuitem g_HtbOptionsMenuItems[] = {
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"Start Armed",
MPOPTION_SPAWNWITHWEAPON,
MPOPTION_STARTARMED,
menuhandlerMpCheckboxOption,
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/mplayer/scenarios/kingofthehill.inc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct menuitem g_KohOptionsMenuItems[] = {
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"Start Armed",
MPOPTION_SPAWNWITHWEAPON,
MPOPTION_STARTARMED,
menuhandlerMpCheckboxOption,
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/mplayer/scenarios/popacap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct menuitem g_PacOptionsMenuItems[] = {
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"Start Armed",
MPOPTION_SPAWNWITHWEAPON,
MPOPTION_STARTARMED,
menuhandlerMpCheckboxOption,
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ void playerSpawn(void)
invGiveSingleWeapon(WEAPON_NIGHTVISION);
}

if ((g_MpSetup.options & MPOPTION_SPAWNWITHWEAPON)
if (!(g_MpSetup.options & MPOPTION_STARTARMED)
&& g_MpSetup.weapons[0] != MPWEAPON_NONE
&& g_MpSetup.weapons[0] != MPWEAPON_DISABLED
&& g_MpSetup.weapons[0] != MPWEAPON_SHIELD) {
Expand Down
2 changes: 1 addition & 1 deletion src/include/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -2890,7 +2890,7 @@
#define MPOPTION_HTM_SHOWONRADAR 0x00040000
#define MPOPTION_PAC_HIGHLIGHTTARGET 0x00080000
#define MPOPTION_PAC_SHOWONRADAR 0x00100000
#define MPOPTION_SPAWNWITHWEAPON 0x00200000
#define MPOPTION_STARTARMED 0x00200000
#define MPOPTION_NODRUGBLUR 0x00400000
#define MPOPTION_AUTORANDOMWEAPON_START 0x00800000
#define MPOPTION_AUTORANDOMWEAPON_END 0x01000000
Expand Down

0 comments on commit 476093a

Please sign in to comment.