From 81bdea1107f7b542e8de6bb70070f4d87c6e69c2 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Tue, 23 Aug 2016 21:36:27 +0200 Subject: [PATCH] Fix the floating text for bounties of actors not being InWorld showing up --- OpenRA.Mods.Common/Traits/GivesBounty.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/GivesBounty.cs b/OpenRA.Mods.Common/Traits/GivesBounty.cs index d3ed043cf8..ccb0614e07 100644 --- a/OpenRA.Mods.Common/Traits/GivesBounty.cs +++ b/OpenRA.Mods.Common/Traits/GivesBounty.cs @@ -74,7 +74,7 @@ namespace OpenRA.Mods.Common.Traits // 2 hundreds because of GetMultiplier and info.Percentage. var bounty = cost * GetMultiplier(self) * info.Percentage / 10000; - if (info.ShowBounty && bounty > 0 && e.Attacker.Owner.IsAlliedWith(self.World.RenderPlayer)) + if (info.ShowBounty && self.IsInWorld && bounty > 0 && e.Attacker.Owner.IsAlliedWith(self.World.RenderPlayer)) e.Attacker.World.AddFrameEndTask(w => w.Add(new FloatingText(self.CenterPosition, e.Attacker.Owner.Color.RGB, FloatingText.FormatCashTick(bounty), 30))); e.Attacker.Owner.PlayerActor.Trait().GiveCash(bounty);