diff --git a/src/d_main.cpp b/src/d_main.cpp index e87d9b5e3..ac90b2c04 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -536,6 +536,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 787d561a6..f183a62e7 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -428,7 +428,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) @@ -456,6 +456,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/p_mobj.cpp b/src/p_mobj.cpp index 92cf4a063..055249cb5 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -5524,6 +5524,13 @@ AActor *P_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/language.enu b/wadsrc/static/language.enu index 0e4f82fe4..9a5b04b8f 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -2161,6 +2161,7 @@ GMPLYMNU_KEEPFRAGS = "Keep frags gained"; GMPLYMNU_NOTEAMSWITCH = "No team switching"; GMPLYMNU_COOPERATIVE = "Cooperative Settings"; GMPLYMNU_MULTIPLAYERWEAPONS = "Spawn multi. weapons"; +GMPLYMNU_MULTIPLAYERTHINGS = "Spawn multi. things"; GMPLYMNU_LOSEINVENTORY = "Lose entire inventory"; GMPLYMNU_KEEPKEYS = "Keep keys"; GMPLYMNU_KEEPWEAPONS = "Keep weapons"; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index a50be68f0..2ee245c81 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1619,6 +1619,7 @@ OptionMenu CoopOptions protected { 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"