Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port: fix start armed mp option #440

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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