Fix terrain being drawn using the cursor palette.

This commit is contained in:
Paul Chote
2011-01-21 18:08:14 +13:00
parent 11aab8705e
commit 2c0a928b48
2 changed files with 5 additions and 6 deletions

View File

@@ -29,14 +29,13 @@ namespace OpenRA.Graphics
internal WorldRenderer(World world)
{
this.world = world;
this.palette = Game.modData.Palette;
foreach( var pal in world.traitDict.ActorsWithTraitMultiple<IPalette>( world ) )
pal.Trait.InitPalette( this );
terrainRenderer = new TerrainRenderer(world, this);
shroudRenderer = new ShroudRenderer(world);
uiOverlay = new UiOverlay();
this.palette = Game.modData.Palette;
foreach( var pal in world.traitDict.ActorsWithTraitMultiple<IPalette>( world ) )
pal.Trait.InitPalette( this );
}
public int GetPaletteIndex(string name) { return palette.GetPaletteIndex(name); }