set the correct template on destroying long bridges

This commit is contained in:
Chris Forbes
2010-07-30 18:48:59 +12:00
parent 290a44440c
commit ef92e004c0

View File

@@ -171,10 +171,6 @@ namespace OpenRA.Mods.RA
currentTemplate = (ds == DamageState.Half && Info.DamagedTemplate > 0) ? Info.DamagedTemplate :
(ds == DamageState.Dead && Info.DestroyedTemplate > 0) ? Info.DestroyedTemplate : Info.Template;
// Update map
foreach (var c in TileSprites[currentTemplate].Keys)
self.World.Map.CustomTerrain[c.X, c.Y] = GetTerrainType(c);
if (Info.Long && ds == DamageState.Dead)
{
// Long bridges have custom art for multiple segments being destroyed
@@ -194,6 +190,10 @@ namespace OpenRA.Mods.RA
dead = true;
KillUnitsOnBridge();
}
// Update map
foreach (var c in TileSprites[currentTemplate].Keys)
self.World.Map.CustomTerrain[c.X, c.Y] = GetTerrainType(c);
}
public void Damaged(Actor self, AttackInfo e)