mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- Add the DF2_NO_COOP_THING_SPAWNDM flag to prevent spawning MP things in coop. (#1165)
This commit is contained in:
parent
254489e34c
commit
560bbf0a9c
4 changed files with 11 additions and 1 deletions
|
@ -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);
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue