diff --git a/OpenRa.Game/Player.cs b/OpenRa.Game/Player.cs index 194479cb34..dc0273c9d9 100644 --- a/OpenRa.Game/Player.cs +++ b/OpenRa.Game/Player.cs @@ -63,7 +63,17 @@ namespace OpenRa.Game } public void GiveCash( int num ) { Cash += num; } - public void GiveOre(int num) { Ore += num; } + public void GiveOre(int num) + { + Ore += num; + + var capacity = GetOreCapacity(); + if (Ore > capacity) + Ore = capacity; // trim off the overflow. + + if (Ore > .8 * capacity) + Sound.Play("silond1.aud"); + } public bool TakeCash( int num ) { diff --git a/OpenRa.Game/Traits/RenderBuilding.cs b/OpenRa.Game/Traits/RenderBuilding.cs index 29d1e95577..bc11951b61 100644 --- a/OpenRa.Game/Traits/RenderBuilding.cs +++ b/OpenRa.Game/Traits/RenderBuilding.cs @@ -69,10 +69,10 @@ namespace OpenRa.Game.Traits switch( state ) { case DamageState.Normal: - anim.PlayRepeating("idle"); + anim.ReplaceAnim("idle"); break; case DamageState.Half: - anim.PlayRepeating("damaged-idle"); + anim.ReplaceAnim("damaged-idle"); Sound.Play("kaboom1.aud"); break; case DamageState.Dead: diff --git a/OpenRa.Game/Traits/RenderBuildingOre.cs b/OpenRa.Game/Traits/RenderBuildingOre.cs index 761362a292..5b09c558b6 100644 --- a/OpenRa.Game/Traits/RenderBuildingOre.cs +++ b/OpenRa.Game/Traits/RenderBuildingOre.cs @@ -7,7 +7,7 @@ namespace OpenRa.Game.Traits : base(self) { Make( () => anim.PlayFetchIndex("idle", - () => (int)(5 * self.Owner.GetSiloFullness())), self); + () => (int)(4.9 * self.Owner.GetSiloFullness())), self); /* hack */ } } }