diff --git a/src/gamedata/g_mapinfo.h b/src/gamedata/g_mapinfo.h index 30e85bd39..85f649341 100644 --- a/src/gamedata/g_mapinfo.h +++ b/src/gamedata/g_mapinfo.h @@ -473,6 +473,7 @@ enum ESkillProperty SKILLP_SlowMonsters, SKILLP_Infight, SKILLP_PlayerRespawn, + SKILLP_SpawnMulti, }; enum EFSkillProperty // floating point properties { @@ -516,6 +517,7 @@ struct FSkillInfo int RespawnLimit; double Aggressiveness; int SpawnFilter; + bool SpawnMulti; int ACSReturn; FString MenuName; FString PicName; diff --git a/src/gamedata/g_skill.cpp b/src/gamedata/g_skill.cpp index c47f5d2f1..5963dc878 100644 --- a/src/gamedata/g_skill.cpp +++ b/src/gamedata/g_skill.cpp @@ -76,6 +76,7 @@ void FMapInfoParser::ParseSkill () skill.RespawnLimit = 0; skill.Aggressiveness = 1.; skill.SpawnFilter = 0; + skill.SpawnMulti = false; skill.ACSReturn = 0; skill.MustConfirm = false; skill.Shortcut = 0; @@ -192,6 +193,10 @@ void FMapInfoParser::ParseSkill () else if (sc.Compare("nightmare")) skill.SpawnFilter |= 16; } } + else if (sc.Compare ("spawnmulti")) + { + skill.SpawnMulti = true; + } else if (sc.Compare("ACSReturn")) { ParseAssign(); @@ -395,6 +400,8 @@ int G_SkillProperty(ESkillProperty prop) case SKILLP_PlayerRespawn: return AllSkills[gameskill].PlayerRespawn; + case SKILLP_SpawnMulti: + return AllSkills[gameskill].SpawnMulti; } } return 0; diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index fb0c661ac..56fcf47ea 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -5354,7 +5354,6 @@ AActor *FLevelLocals::SpawnPlayer (FPlayerStart *mthing, int playernum, int flag return mobj; } - // // P_SpawnMapThing // The fields of the mapthing should @@ -5367,6 +5366,8 @@ AActor *FLevelLocals::SpawnMapThing (FMapThing *mthing, int position) int mask; AActor *mobj; + bool spawnmulti = G_SkillProperty(SKILLP_SpawnMulti) || multiplayer; + if (mthing->EdNum == 0 || mthing->EdNum == -1) return NULL; @@ -5446,6 +5447,10 @@ AActor *FLevelLocals::SpawnMapThing (FMapThing *mthing, int position) { mask = MTF_COOPERATIVE; } + else if (spawnmulti) + { + mask = MTF_COOPERATIVE|MTF_SINGLE; + } else { mask = MTF_SINGLE;