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:
@@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user