Support arbitrary per-player palettes. Will crash if I missed any cases that don't explicitly set the Renderable palette.
This commit is contained in:
@@ -98,7 +98,7 @@ namespace OpenRA.Traits
|
||||
|
||||
public static Renderable Centered(Actor self, Sprite s, float2 location)
|
||||
{
|
||||
var pal = self.Owner == null ? "player0" : self.Owner.Palette;
|
||||
var pal = "player{0}".F(self.Owner == null ? 0 : self.Owner.Index);
|
||||
var loc = location - 0.5f * s.size;
|
||||
|
||||
return new Renderable(s, loc.Round(), pal, (int)self.CenterLocation.Y);
|
||||
|
||||
Reference in New Issue
Block a user