From b83fa764d4861d9f5140ac6f1e6337a1b7b81f98 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 24 Sep 2011 20:48:20 +1200 Subject: [PATCH] clean up whitespace in CncWaterPaletteRotation --- OpenRA.Mods.Cnc/CncWaterPaletteRotation.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/OpenRA.Mods.Cnc/CncWaterPaletteRotation.cs b/OpenRA.Mods.Cnc/CncWaterPaletteRotation.cs index 2d9e88641d..d1e196a9ec 100644 --- a/OpenRA.Mods.Cnc/CncWaterPaletteRotation.cs +++ b/OpenRA.Mods.Cnc/CncWaterPaletteRotation.cs @@ -18,22 +18,20 @@ namespace OpenRA.Mods.Cnc class CncWaterPaletteRotation : ITick, IPaletteModifier { - float t = 0; - public void Tick(Actor self) - { - t += .25f; - } + + public void Tick(Actor self) { t += .25f; } public void AdjustPalette(Dictionary palettes) - { + { // Only modify the terrain palette var pal = palettes["terrain"]; - + var copy = (uint[])pal.Values.Clone(); var rotate = (int)t % 7; + for (int i = 0; i < 7; i++) - pal.SetColor(0x20 + (rotate + i) % 7, copy[0x20 + i]); + pal.SetColor(0x20 + (rotate + i) % 7, copy[0x20 + i]); } } }