fixing lobby bits
This commit is contained in:
@@ -386,9 +386,9 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
var d = left ? +1 : Player.PlayerColors.Count() - 1;
|
var d = left ? +1 : Player.PlayerColors.Count() - 1;
|
||||||
|
|
||||||
var newIndex = ((int)Game.world.LocalPlayer.PaletteIndex + d) % Player.PlayerColors.Count();
|
var newIndex = ((int)Game.LocalClient.PaletteIndex + d) % Player.PlayerColors.Count();
|
||||||
|
|
||||||
while (!PaletteAvailable(newIndex) && newIndex != (int)Game.world.LocalPlayer.PaletteIndex)
|
while (!PaletteAvailable(newIndex) && newIndex != (int)Game.LocalClient.PaletteIndex)
|
||||||
newIndex = (newIndex + d) % Player.PlayerColors.Count();
|
newIndex = (newIndex + d) % Player.PlayerColors.Count();
|
||||||
|
|
||||||
Game.IssueOrder(
|
Game.IssueOrder(
|
||||||
@@ -399,7 +399,7 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
var countries = Game.world.GetCountries();
|
var countries = Game.world.GetCountries();
|
||||||
var nextCountry = countries.Concat(countries)
|
var nextCountry = countries.Concat(countries)
|
||||||
.SkipWhile(c => c != Game.world.LocalPlayer.Country)
|
.SkipWhile(c => c.Name != Game.LocalClient.Country)
|
||||||
.Skip(1)
|
.Skip(1)
|
||||||
.First();
|
.First();
|
||||||
|
|
||||||
@@ -416,9 +416,9 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
var d = left ? +1 : Game.world.Map.SpawnPoints.Count();
|
var d = left ? +1 : Game.world.Map.SpawnPoints.Count();
|
||||||
|
|
||||||
var newIndex = (Game.world.LocalPlayer.SpawnPointIndex + d) % (Game.world.Map.SpawnPoints.Count()+1);
|
var newIndex = (Game.LocalClient.SpawnPoint + d) % (Game.world.Map.SpawnPoints.Count()+1);
|
||||||
|
|
||||||
while (!SpawnPointAvailable(newIndex) && newIndex != (int)Game.world.LocalPlayer.SpawnPointIndex)
|
while (!SpawnPointAvailable(newIndex) && newIndex != (int)Game.LocalClient.SpawnPoint)
|
||||||
newIndex = (newIndex + d) % (Game.world.Map.SpawnPoints.Count()+1);
|
newIndex = (newIndex + d) % (Game.world.Map.SpawnPoints.Count()+1);
|
||||||
|
|
||||||
Game.IssueOrder(
|
Game.IssueOrder(
|
||||||
|
|||||||
@@ -311,6 +311,11 @@ namespace OpenRA
|
|||||||
get { return orderManager.Connection.LocalClientId == 0; }
|
get { return orderManager.Connection.LocalClientId == 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Session.Client LocalClient
|
||||||
|
{
|
||||||
|
get { return LobbyInfo.Clients.FirstOrDefault(c => c.Index == orderManager.Connection.LocalClientId); }
|
||||||
|
}
|
||||||
|
|
||||||
public static void HandleKeyPress( KeyPressEventArgs e, Modifiers modifiers )
|
public static void HandleKeyPress( KeyPressEventArgs e, Modifiers modifiers )
|
||||||
{
|
{
|
||||||
int sync = Game.world.SyncHash();
|
int sync = Game.world.SyncHash();
|
||||||
|
|||||||
Reference in New Issue
Block a user