diff --git a/src/d_main.cpp b/src/d_main.cpp index e39d0bf76..f8f728ef2 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -661,6 +661,7 @@ CVAR (Flag, sv_dontcheckammo, dmflags2, DF2_DONTCHECKAMMO); CVAR (Flag, sv_killbossmonst, dmflags2, DF2_KILLBOSSMONST); CVAR (Flag, sv_nocountendmonst, dmflags2, DF2_NOCOUNTENDMONST); CVAR (Flag, sv_respawnsuper, dmflags2, DF2_RESPAWN_SUPER); +CVAR (Flag, sv_nothingspawn, dmflags2, DF2_NO_COOP_THING_SPAWN); //========================================================================== // diff --git a/src/doomdef.h b/src/doomdef.h index 3b59a5c15..d9b8983c6 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -141,7 +141,7 @@ enum // [BC] More dmflags. w00p! enum { -// DF2_YES_IMPALING = 1 << 0, // Player gets implaed on MF2_IMPALE items +// DF2_YES_IMPALING = 1 << 0, // Player gets impaled on MF2_IMPALE items DF2_YES_WEAPONDROP = 1 << 1, // Drop current weapon upon death // DF2_NO_RUNES = 1 << 2, // Don't spawn runes // DF2_INSTANT_RETURN = 1 << 3, // Instantly return flags and skulls when player carrying it dies (ST/CTF) @@ -169,6 +169,7 @@ enum DF2_KILLBOSSMONST = 1 << 25, // Kills all monsters spawned by a boss cube when the boss dies DF2_NOCOUNTENDMONST = 1 << 26, // Do not count monsters in 'end level when dying' sectors towards kill count DF2_RESPAWN_SUPER = 1 << 27, // Respawn invulnerability and invisibility + DF2_NO_COOP_THING_SPAWN = 1 << 28, // Don't spawn multiplayer things in coop games }; // [RH] Compatibility flags. diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 0783d4e90..5bd391d64 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -5571,6 +5571,13 @@ AActor *FLevelLocals::SpawnMapThing (FMapThing *mthing, int position) if (deathmatch && info->flags & MF_NOTDMATCH) return NULL; + // don't spawn extra things in coop if so desired + if (multiplayer && !deathmatch && (dmflags2 & DF2_NO_COOP_THING_SPAWN)) + { + if ((mthing->flags & (MTF_DEATHMATCH|MTF_SINGLE)) == MTF_DEATHMATCH) + return NULL; + } + // [RH] don't spawn extra weapons in coop if so desired if (multiplayer && !deathmatch && (dmflags & DF_NO_COOP_WEAPON_SPAWN)) { diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 375969497..3933fec74 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1664,6 +1664,7 @@ OptionMenu CoopOptions protected Position -35 Title "$GMPLYMNU_COOPERATIVE" + Option "$GMPLYMNU_MULTIPLAYERTHINGS", "sv_nothingspawn", "NoYes" Option "$GMPLYMNU_MULTIPLAYERWEAPONS", "sv_noweaponspawn", "NoYes" Option "$GMPLYMNU_LOSEINVENTORY", "sv_cooploseinventory", "YesNo" Option "$GMPLYMNU_KEEPKEYS", "sv_cooplosekeys", "NoYes"