Bug Fix: Cash ticks for TRUK and Bounties only show for allies
This commit is contained in:
@@ -35,7 +35,8 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
target.Owner.PlayerActor.Trait<PlayerResources>().GiveCash(payload);
|
||||
self.Destroy();
|
||||
self.World.AddFrameEndTask(w => w.Add(new CashTick(payload, 30, 2, target.CenterLocation, target.Owner.ColorRamp.GetColor(0))));
|
||||
if (self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally)
|
||||
self.World.AddFrameEndTask(w => w.Add(new CashTick(payload, 30, 2, target.CenterLocation, target.Owner.ColorRamp.GetColor(0))));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,8 @@ namespace OpenRA.Mods.RA
|
||||
// 2 hundreds because of GetMultiplier and info.Percentage.
|
||||
var bounty = (int)(cost * GetMultiplier(self) * info.Percentage / 10000);
|
||||
|
||||
e.Attacker.World.AddFrameEndTask(w => w.Add(new CashTick(bounty, 20, 1, self.CenterLocation, e.Attacker.Owner.ColorRamp.GetColor(0))));
|
||||
if (e.Attacker.World.LocalPlayer != null && e.Attacker.Owner.Stances[e.Attacker.World.LocalPlayer] == Stance.Ally)
|
||||
e.Attacker.World.AddFrameEndTask(w => w.Add(new CashTick(bounty, 20, 1, self.CenterLocation, e.Attacker.Owner.ColorRamp.GetColor(0))));
|
||||
|
||||
e.Attacker.Owner.PlayerActor.Trait<PlayerResources>().GiveCash(bounty);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user