Merge pull request #419 from alexey-lysiuk/spawnspot_nomonsters

'no monsters' option is no longer ignored in ACS Spawn functions
This commit is contained in:
coelckers 2015-10-18 21:03:48 +02:00
commit 117783a785

View file

@ -3365,6 +3365,14 @@ int DLevelScript::DoSpawn (int type, fixed_t x, fixed_t y, fixed_t z, int tid, i
if (info != NULL) 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); actor = Spawn (info, x, y, z, ALLOW_REPLACE);
if (actor != NULL) if (actor != NULL)
{ {