Skip to content

Commit

Permalink
Add sv_noextraammo. When set to true, disables that weird hardcoded b…
Browse files Browse the repository at this point in the history
…ehavior from original Doom that gives extra ammo when picking up weapons in deathmatch
  • Loading branch information
nashmuhandes authored and madame-rachelle committed Sep 16, 2022
1 parent c87e873 commit 7ce364b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/d_main.cpp
Expand Up @@ -565,6 +565,7 @@ CVAR (Flag, sv_respawnsuper, dmflags2, DF2_RESPAWN_SUPER);
CVAR (Flag, sv_nothingspawn, dmflags2, DF2_NO_COOP_THING_SPAWN);
CVAR (Flag, sv_alwaysspawnmulti, dmflags2, DF2_ALWAYS_SPAWN_MULTI);
CVAR (Flag, sv_novertspread, dmflags2, DF2_NOVERTSPREAD);
CVAR (Flag, sv_noextraammo, dmflags2, DF2_NO_EXTRA_AMMO);

//==========================================================================
//
Expand Down
1 change: 1 addition & 0 deletions src/doomdef.h
Expand Up @@ -173,6 +173,7 @@ enum
DF2_NO_COOP_THING_SPAWN = 1 << 28, // Don't spawn multiplayer things in coop games
DF2_ALWAYS_SPAWN_MULTI = 1 << 29, // Always spawn multiplayer items
DF2_NOVERTSPREAD = 1 << 30, // Don't allow vertical spread for hitscan weapons (excluding ssg)
DF2_NO_EXTRA_AMMO = 1 << 31, // Don't add extra ammo when picking up weapons (like in original Doom)
};

// [RH] Compatibility flags.
Expand Down
1 change: 1 addition & 0 deletions wadsrc/static/menudef.txt
Expand Up @@ -1683,6 +1683,7 @@ OptionMenu DeathmatchOptions protected
Option "$GMPLYMNU_LOSEFRAG", "sv_losefrag", "YesNo"
Option "$GMPLYMNU_KEEPFRAGS", "sv_keepfrags", "YesNo"
Option "$GMPLYMNU_NOTEAMSWITCH", "sv_noteamswitch", "YesNo"
Option "$GMPLYMNU_NOEXTRAAMMO", "sv_noextraammo", "NoYes"
Class "GameplayMenu"
}

Expand Down
2 changes: 1 addition & 1 deletion wadsrc/static/zscript/actors/inventory/weapons.zs
Expand Up @@ -742,7 +742,7 @@ class Weapon : StateProvider

// [BC] This behavior is from the original Doom. Give 5/2 times as much ammoitem when
// we pick up a weapon in deathmatch.
if (( deathmatch ) && ( gameinfo.gametype & GAME_DoomChex ))
if (( deathmatch && !sv_noextraammo ) && ( gameinfo.gametype & GAME_DoomChex ))
amount = amount * 5 / 2;

// extra ammoitem in baby mode and nightmare mode
Expand Down

0 comments on commit 7ce364b

Please sign in to comment.