From 66818543a810846be393a29c7debf9646ed69869 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 17 Mar 2010 21:22:48 +1300 Subject: [PATCH] country/palette/etc WORKS now --- OpenRA.Game/Chrome.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Chrome.cs b/OpenRA.Game/Chrome.cs index 819335a787..0d7d20e5f7 100644 --- a/OpenRA.Game/Chrome.cs +++ b/OpenRA.Game/Chrome.cs @@ -398,10 +398,13 @@ namespace OpenRA void CycleRace(bool left) { var countries = Game.world.GetCountries(); - var nextCountry = countries.Concat(countries) + var nextCountry = countries .SkipWhile(c => c.Name != Game.LocalClient.Country) .Skip(1) - .First(); + .FirstOrDefault(); + + if (nextCountry == null) + nextCountry = countries.First(); Game.IssueOrder(Order.Chat("/race " + nextCountry.Name)); }