From 9f5a8a6d1f167956ea6d871c9edf5e4819c14012 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Wed, 12 Aug 2015 19:32:57 +0200 Subject: [PATCH] Fix the creeps setting being ignored --- OpenRA.Mods.RA/Traits/SpawnActorOnDeath.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Mods.RA/Traits/SpawnActorOnDeath.cs b/OpenRA.Mods.RA/Traits/SpawnActorOnDeath.cs index 60761a3464..bbb0ce429c 100644 --- a/OpenRA.Mods.RA/Traits/SpawnActorOnDeath.cs +++ b/OpenRA.Mods.RA/Traits/SpawnActorOnDeath.cs @@ -42,6 +42,9 @@ namespace OpenRA.Mods.RA.Traits [Desc("Skips the husk actor's make animations if true.")] public readonly bool SkipMakeAnimations = true; + [Desc("Should an actor only be spawned when the 'Creeps' setting is true?")] + public readonly bool RequiresLobbyCreeps = false; + public object Create(ActorInitializer init) { return new SpawnActorOnDeath(init, this); } } @@ -59,6 +62,9 @@ namespace OpenRA.Mods.RA.Traits public void Killed(Actor self, AttackInfo e) { + if (info.RequiresLobbyCreeps && !self.World.LobbyInfo.GlobalSettings.Creeps) + return; + if (!self.IsInWorld) return;