diff --git a/OpenRA.Game/Traits/World/ResourceLayer.cs b/OpenRA.Game/Traits/World/ResourceLayer.cs index c8b573c87d..d3c508a3d4 100644 --- a/OpenRA.Game/Traits/World/ResourceLayer.cs +++ b/OpenRA.Game/Traits/World/ResourceLayer.cs @@ -24,10 +24,16 @@ namespace OpenRA.Traits public ResourceType[] resourceTypes; CellContents[,] content; + bool hasSetupPalettes; + public void Render( WorldRenderer wr ) { - foreach( var rt in world.WorldActor.TraitsImplementing() ) - rt.info.PaletteIndex = wr.GetPaletteIndex(rt.info.Palette); + if (!hasSetupPalettes) + { + hasSetupPalettes = true; + foreach( var rt in world.WorldActor.TraitsImplementing() ) + rt.info.PaletteIndex = wr.GetPaletteIndex(rt.info.Palette); + } var clip = Game.viewport.WorldBounds(world); for (int x = clip.Left; x < clip.Right; x++)