Prevent changes when marked as ready
This commit is contained in:
@@ -124,7 +124,9 @@ namespace OpenRA.Widgets.Delegates
|
||||
bool SpawnPointAvailable(int index) { return (index == 0) || Game.LobbyInfo.Clients.All(c => c.SpawnPoint != index); }
|
||||
|
||||
bool CyclePalette(MouseInput mi)
|
||||
{
|
||||
{
|
||||
if (Game.LocalClient.State == Session.ClientState.Ready) return false;
|
||||
|
||||
var d = (mi.Button == MouseButton.Left) ? +1 : Game.world.PlayerColors().Count() - 1;
|
||||
|
||||
var newIndex = ((int)Game.LocalClient.PaletteIndex + d) % Game.world.PlayerColors().Count();
|
||||
@@ -140,6 +142,8 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
bool CycleRace(MouseInput mi)
|
||||
{
|
||||
if (Game.LocalClient.State == Session.ClientState.Ready) return false;
|
||||
|
||||
var countries = new[] { "Random" }.Concat(Game.world.GetCountries().Select(c => c.Name));
|
||||
|
||||
if (mi.Button == MouseButton.Right)
|
||||
@@ -166,6 +170,8 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
bool CycleSpawnPoint(MouseInput mi)
|
||||
{
|
||||
if (Game.LocalClient.State == Session.ClientState.Ready) return false;
|
||||
|
||||
var d = (mi.Button == MouseButton.Left) ? +1 : Game.world.Map.SpawnPoints.Count();
|
||||
|
||||
var newIndex = (Game.LocalClient.SpawnPoint + d) % (Game.world.Map.SpawnPoints.Count()+1);
|
||||
@@ -180,6 +186,8 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
bool CycleTeam(MouseInput mi)
|
||||
{
|
||||
if (Game.LocalClient.State == Session.ClientState.Ready) return false;
|
||||
|
||||
var d = (mi.Button == MouseButton.Left) ? +1 : Game.world.Map.PlayerCount;
|
||||
|
||||
var newIndex = (Game.LocalClient.Team + d) % (Game.world.Map.PlayerCount+1);
|
||||
|
||||
Reference in New Issue
Block a user