From 869e16849537a0a1af05a677489975a95abe8183 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 18 Oct 2015 15:52:45 +0300 Subject: [PATCH] 'no monsters' option is no longer ignored in ACS Spawn functions See http://forum.zdoom.org/viewtopic.php?t=46459 --- src/p_acs.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index e61f962ca..bca6ac62b 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -3365,6 +3365,14 @@ int DLevelScript::DoSpawn (int type, fixed_t x, fixed_t y, fixed_t z, int tid, i if (info != NULL) { + info = info->GetReplacement (); + + if ((GetDefaultByType (info)->flags3 & MF3_ISMONSTER) && + ((dmflags & DF_NO_MONSTERS) || (level.flags2 & LEVEL2_NOMONSTERS))) + { + return 0; + } + actor = Spawn (info, x, y, z, ALLOW_REPLACE); if (actor != NULL) {