Use the correct number of players in the lobby team selector

This commit is contained in:
Paul Chote
2010-09-18 22:33:41 +12:00
parent 3f870e7e48
commit 927ab00f4d

View File

@@ -416,10 +416,9 @@ namespace OpenRA.Widgets.Delegates
bool CycleTeam(MouseInput mi)
{
var d = (mi.Button == MouseButton.Left) ? +1 : Game.world.Map.PlayerCount;
var newIndex = (Game.LocalClient.Team + d) % (Game.world.Map.PlayerCount + 1);
var d = (mi.Button == MouseButton.Left) ? +1 : Map.PlayerCount;
var newIndex = (Game.LocalClient.Team + d) % (Map.PlayerCount + 1);
Game.IssueOrder(
Order.Command("team " + newIndex));
return true;