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

@@ -73,8 +73,8 @@ namespace OpenRA
if (client != null)
{
Index = client.Index;
Palette = PlayerColors[client.PaletteIndex].a;
Color = PlayerColors[client.PaletteIndex].c;
Palette = PlayerColors[client.PaletteIndex % PlayerColors.Count()].a;
Color = PlayerColors[client.PaletteIndex % PlayerColors.Count()].c;
PlayerName = client.Name;
InternalName = "Multi{0}".F(client.Index);
}