Remove RepairIndicator dependence on target RenderSimple.

This also fixes the case where the building palette doesn't
match the indicator, and saves 2 trait lookups per tick.
This commit is contained in:
Paul Chote
2013-02-24 14:30:44 +13:00
parent 3380817865
commit 43159a0e05
2 changed files with 11 additions and 9 deletions

View File

@@ -19,6 +19,7 @@ namespace OpenRA.Mods.RA.Buildings
public readonly int RepairPercent = 20;
public readonly int RepairInterval = 24;
public readonly int RepairStep = 7;
public readonly string IndicatorPalettePrefix = "player";
public object Create(ActorInitializer init) { return new RepairableBuilding(init.self, this); }
}
@@ -51,7 +52,7 @@ namespace OpenRA.Mods.RA.Buildings
Sound.PlayNotification(Repairer, "Speech", "Repairing", self.Owner.Country.Race);
self.World.AddFrameEndTask(
w => w.Add(new RepairIndicator(self, p)));
w => w.Add(new RepairIndicator(self, Info.IndicatorPalettePrefix, p)));
}
}
}