Fix player palette double-add bug

This commit is contained in:
Paul Chote
2010-02-05 00:32:15 +13:00
parent 0b16341c6f
commit e7f376dc58
3 changed files with 15 additions and 1 deletions

View File

@@ -356,6 +356,10 @@ namespace OpenRa
var d = left ? +1 : Player.PlayerColors.Count() - 1;
var newIndex = ((int)Game.world.LocalPlayer.PaletteIndex + d) % Player.PlayerColors.Count();
Game.IssueOrder(
Order.Chat("color count " + Player.PlayerColors.Count()));
while (!PaletteAvailable(newIndex) && newIndex != (int)Game.world.LocalPlayer.PaletteIndex)
newIndex = (newIndex + d) % Player.PlayerColors.Count();