Update Renderer.cs
Fix graphical error when adding mulitplayer spawn points in the map editor.
This commit is contained in:
@@ -79,6 +79,7 @@ namespace OpenRA
|
||||
|
||||
Rectangle lastWorldViewport = Rectangle.Empty;
|
||||
ITexture currentPaletteTexture;
|
||||
int currentPaletteHeight = 0;
|
||||
IBatchRenderer currentBatchRenderer;
|
||||
RenderType renderType = RenderType.None;
|
||||
|
||||
@@ -309,11 +310,13 @@ namespace OpenRA
|
||||
{
|
||||
// Note: palette.Texture and palette.ColorShifts are updated at the same time
|
||||
// so we only need to check one of the two to know whether we must update the textures
|
||||
if (palette.Texture == currentPaletteTexture)
|
||||
// also compare heights in case new palettes have been added
|
||||
if (palette.Texture == currentPaletteTexture && palette.Height == currentPaletteHeight)
|
||||
return;
|
||||
|
||||
Flush();
|
||||
currentPaletteTexture = palette.Texture;
|
||||
currentPaletteHeight = palette.Height;
|
||||
|
||||
SpriteRenderer.SetPalette(palette);
|
||||
WorldSpriteRenderer.SetPalette(palette);
|
||||
|
||||
Reference in New Issue
Block a user