Move damage sounds and shaking from Building/RenderBuilding into their own traits. Fix wall damage/death sounds under cnc.

This commit is contained in:
Paul Chote
2011-01-04 13:13:01 +13:00
parent 4a47641656
commit 76216b8dd9
12 changed files with 106 additions and 35 deletions

View File

@@ -107,10 +107,7 @@ namespace OpenRA.Mods.RA.Render
self.World.AddFrameEndTask(w => w.Add(new Explosion(w, Traits.Util.CenterOfCell(cell), "building", false, 0)));
}
else if (e.DamageState >= DamageState.Heavy && e.PreviousDamageState < DamageState.Heavy)
{
anim.ReplaceAnim("damaged-idle");
Sound.Play(self.Info.Traits.Get<BuildingInfo>().DamagedSound, self.CenterLocation);
}
else if (e.DamageState < DamageState.Heavy)
anim.ReplaceAnim("idle");
}