Skip to content

Added pistol start gameplay option #2509

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

Merged
merged 1 commit into from
Apr 21, 2024
Merged
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
1 change: 1 addition & 0 deletions src/d_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ CVAR(Flag, sv_nolocaldrops, dmflags3, DF3_NO_LOCAL_DROPS);
CVAR(Flag, sv_nocoopitems, dmflags3, DF3_NO_COOP_ONLY_ITEMS);
CVAR(Flag, sv_nocoopthings, dmflags3, DF3_NO_COOP_ONLY_THINGS);
CVAR(Flag, sv_rememberlastweapon, dmflags3, DF3_REMEMBER_LAST_WEAP);
CVAR(Flag, sv_pistolstart, dmflags3, DF3_PISTOL_START);

//==========================================================================
//
Expand Down
1 change: 1 addition & 0 deletions src/doomdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ enum : unsigned
DF3_NO_COOP_ONLY_ITEMS = 1 << 4, // Items that only appear in co-op are disabled
DF3_NO_COOP_ONLY_THINGS = 1 << 5, // Any Actor that only appears in co-op is disabled
DF3_REMEMBER_LAST_WEAP = 1 << 6, // When respawning in co-op, keep the last used weapon out instead of switching to the best new one.
DF3_PISTOL_START = 1 << 7, // Take player inventory when exiting to the next level.
};

// [RH] Compatibility flags.
Expand Down
5 changes: 3 additions & 2 deletions src/g_level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,11 +776,12 @@ void FLevelLocals::ChangeLevel(const char *levelname, int position, int inflags,
{
if (thiscluster != nextcluster || (thiscluster && !(thiscluster->flags & CLUSTER_HUB)))
{
if (nextinfo->flags2 & LEVEL2_RESETINVENTORY)
const bool doReset = dmflags3 & DF3_PISTOL_START;
if (doReset || (nextinfo->flags2 & LEVEL2_RESETINVENTORY))
{
inflags |= CHANGELEVEL_RESETINVENTORY;
}
if (nextinfo->flags2 & LEVEL2_RESETHEALTH)
if (doReset || (nextinfo->flags2 & LEVEL2_RESETHEALTH))
{
inflags |= CHANGELEVEL_RESETHEALTH;
}
Expand Down
1 change: 1 addition & 0 deletions wadsrc/static/menudef.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,7 @@ OptionMenu GameplayOptions protected
StaticText " "
Option "$GMPLYMNU_SMARTAUTOAIM", "sv_smartaim", "SmartAim"
StaticText " "
Option "$GMPLYMNU_PISTOLSTART", "sv_pistolstart", "YesNo"
Option "$GMPLYMNU_FALLINGDAMAGE", "sv_fallingdamage", "FallingDM"
Option "$GMPLYMNU_DROPWEAPON", "sv_weapondrop", "YesNo"
Option "$GMPLYMNU_DOUBLEAMMO", "sv_doubleammo", "YesNo"
Expand Down
Loading