Fixed crash on large palette indexes.

This commit is contained in:
Matthew Bowra-Dean
2010-03-27 23:16:16 +13:00
parent 006ccbc59c
commit c512626ab0
3 changed files with 4 additions and 4 deletions

View File

@@ -194,7 +194,7 @@ namespace OpenRA.Graphics
lineRenderer.FillRect(new RectangleF(
Game.viewport.Location.X + pos.X + 2,
Game.viewport.Location.Y + pos.Y + 2,
12, 12), Player.PlayerColors[ p.Second.PaletteIndex ].c);
12, 12), Player.PlayerColors[ p.Second.PaletteIndex % Player.PlayerColors.Count() ].c);
rgbaRenderer.DrawSprite(ownedSpawnPoint, pos, "chrome");
}