From 4cd3195f9f7e85b5619d94cebd2e6826949c8906 Mon Sep 17 00:00:00 2001 From: Bob Date: Tue, 12 Oct 2010 01:41:42 +1300 Subject: [PATCH] call refreshPalette in the right place. make Game.worldRenderer PRIVATE (yay) --- OpenRA.Game/Game.cs | 2 +- OpenRA.Game/Graphics/WorldRenderer.cs | 2 +- OpenRA.Game/Widgets/Delegates/LobbyDelegate.cs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 1af199ea86..e2723802c0 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -32,7 +32,7 @@ namespace OpenRA public static ModData modData; public static World world; - public static WorldRenderer worldRenderer; + private static WorldRenderer worldRenderer; public static Viewport viewport; public static Settings Settings; diff --git a/OpenRA.Game/Graphics/WorldRenderer.cs b/OpenRA.Game/Graphics/WorldRenderer.cs index 7ffa482a66..5f8458a53e 100644 --- a/OpenRA.Game/Graphics/WorldRenderer.cs +++ b/OpenRA.Game/Graphics/WorldRenderer.cs @@ -73,7 +73,6 @@ namespace OpenRA.Graphics Renderable[] worldSprites = { }; public void Tick() { - RefreshPalette(); var bounds = GetBoundsRect(); var comparer = new SpriteComparer(); @@ -93,6 +92,7 @@ namespace OpenRA.Graphics public void Draw() { + RefreshPalette(); var bounds = GetBoundsRect(); Game.Renderer.EnableScissor(bounds.Left, bounds.Top, bounds.Width, bounds.Height); diff --git a/OpenRA.Game/Widgets/Delegates/LobbyDelegate.cs b/OpenRA.Game/Widgets/Delegates/LobbyDelegate.cs index 5f629e2b98..6a658caf51 100755 --- a/OpenRA.Game/Widgets/Delegates/LobbyDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/LobbyDelegate.cs @@ -173,7 +173,6 @@ namespace OpenRA.Widgets.Delegates { CurrentColorPreview1 = PlayerColorRemap.ColorFromHSL(hf, sf, lf); CurrentColorPreview2 = PlayerColorRemap.ColorFromHSL(hf, sf, r * lf); - Game.worldRenderer.RefreshPalette(); } void UpdateCurrentMap()