diff --git a/src/gamedata/g_mapinfo.h b/src/gamedata/g_mapinfo.h index 73b46d7e0a8..8f311f6a2ed 100644 --- a/src/gamedata/g_mapinfo.h +++ b/src/gamedata/g_mapinfo.h @@ -510,6 +510,7 @@ enum ESkillProperty SKILLP_PlayerRespawn, SKILLP_SpawnMulti, SKILLP_InstantReaction, + SKILLP_SpawnMultiCoopOnly, }; enum EFSkillProperty // floating point properties { @@ -555,6 +556,7 @@ struct FSkillInfo int SpawnFilter; bool SpawnMulti; bool InstantReaction; + bool SpawnMultiCoopOnly; int ACSReturn; FString MenuName; FString PicName; diff --git a/src/gamedata/g_skill.cpp b/src/gamedata/g_skill.cpp index 8a0f69fb3f8..e8d7849ba02 100644 --- a/src/gamedata/g_skill.cpp +++ b/src/gamedata/g_skill.cpp @@ -77,6 +77,7 @@ void FMapInfoParser::ParseSkill () skill.Aggressiveness = 1.; skill.SpawnFilter = 0; skill.SpawnMulti = false; + skill.SpawnMultiCoopOnly = false; skill.InstantReaction = false; skill.ACSReturn = 0; skill.MustConfirm = false; @@ -198,6 +199,10 @@ void FMapInfoParser::ParseSkill () { skill.SpawnMulti = true; } + else if (sc.Compare ("spawnmulticooponly")) + { + skill.SpawnMultiCoopOnly = true; + } else if (sc.Compare ("InstantReaction")) { skill.InstantReaction = true; @@ -408,9 +413,13 @@ int G_SkillProperty(ESkillProperty prop) case SKILLP_SpawnMulti: return AllSkills[gameskill].SpawnMulti; - + case SKILLP_InstantReaction: return AllSkills[gameskill].InstantReaction; + + case SKILLP_SpawnMultiCoopOnly: + return AllSkills[gameskill].SpawnMultiCoopOnly; + } } return 0; @@ -550,6 +559,7 @@ FSkillInfo &FSkillInfo::operator=(const FSkillInfo &other) SpawnFilter = other.SpawnFilter; SpawnMulti = other.SpawnMulti; InstantReaction = other.InstantReaction; + SpawnMultiCoopOnly = other.SpawnMultiCoopOnly; ACSReturn = other.ACSReturn; MenuName = other.MenuName; PicName = other.PicName; diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index d216d30d8c6..442f101f5f2 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -5757,6 +5757,7 @@ AActor *FLevelLocals::SpawnMapThing (FMapThing *mthing, int position) AActor *mobj; bool spawnmulti = G_SkillProperty(SKILLP_SpawnMulti) || !!(dmflags2 & DF2_ALWAYS_SPAWN_MULTI); + bool spawnmulti_cooponly = G_SkillProperty(SKILLP_SpawnMultiCoopOnly); if (mthing->EdNum == 0 || mthing->EdNum == -1) return NULL; @@ -5837,9 +5838,9 @@ AActor *FLevelLocals::SpawnMapThing (FMapThing *mthing, int position) { mask = MTF_COOPERATIVE; } - else if (spawnmulti) + else if (spawnmulti || spawnmulti_cooponly) { - mask = MTF_COOPERATIVE|MTF_SINGLE; + mask = spawnmulti_cooponly ? MTF_COOPERATIVE : (MTF_COOPERATIVE|MTF_SINGLE); } else { diff --git a/wadsrc/static/zscript/constants.zs b/wadsrc/static/zscript/constants.zs index b4f2d85b7a3..f22204cbfdb 100644 --- a/wadsrc/static/zscript/constants.zs +++ b/wadsrc/static/zscript/constants.zs @@ -1024,6 +1024,7 @@ enum ESkillProperty SKILLP_PlayerRespawn, SKILLP_SpawnMulti, SKILLP_InstantReaction, + SKILLP_SpawnMultiCoopOnly, }; enum EFSkillProperty // floating point properties {