fix spawnpoint vis
This commit is contained in:
@@ -179,8 +179,8 @@ namespace OpenRA.Graphics
|
||||
public void DrawSpawnPoints(RectangleF rect)
|
||||
{
|
||||
var points = world.Map.SpawnPoints
|
||||
.Select( (sp,i) => Pair.New(sp,world.players.Values.FirstOrDefault(
|
||||
p => p.SpawnPointIndex == i + 1 ) ))
|
||||
.Select( (sp,i) => Pair.New(sp, Game.LobbyInfo.Clients.FirstOrDefault(
|
||||
c => c.SpawnPoint == i + 1 ) ))
|
||||
.ToList();
|
||||
|
||||
foreach (var p in points)
|
||||
@@ -194,7 +194,7 @@ namespace OpenRA.Graphics
|
||||
lineRenderer.FillRect(new RectangleF(
|
||||
Game.viewport.Location.X + pos.X + 2,
|
||||
Game.viewport.Location.Y + pos.Y + 2,
|
||||
12, 12), p.Second.Color);
|
||||
12, 12), Player.PlayerColors[ p.Second.PaletteIndex ].c);
|
||||
|
||||
rgbaRenderer.DrawSprite(ownedSpawnPoint, pos, "chrome");
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ namespace OpenRA
|
||||
public int DisplayCash = 0;
|
||||
public int PowerProvided = 0;
|
||||
public int PowerDrained = 0;
|
||||
public int SpawnPointIndex = 0;
|
||||
|
||||
public World World { get { return PlayerActor.World; } }
|
||||
|
||||
@@ -190,35 +189,5 @@ namespace OpenRA
|
||||
Sound.PlayToPlayer(this, eva.CashTickDown);
|
||||
}
|
||||
}
|
||||
|
||||
public void SyncFromLobby(Session.Client client)
|
||||
{
|
||||
if (PlayerName != client.Name)
|
||||
{
|
||||
//Game.chat.AddLine(this, "is now known as " + client.Name);
|
||||
PlayerName = client.Name;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(client.Country))
|
||||
client.Country = PlayerActor.World.GetCountries().First().Name;
|
||||
|
||||
if (Country.Name != client.Country)
|
||||
{
|
||||
//Game.chat.AddLine(this, "is now playing {0}".F(client.Country));
|
||||
Country = PlayerActor.World.GetCountries().First(c => c.Name == client.Country);
|
||||
}
|
||||
|
||||
if (PaletteIndex != client.PaletteIndex)
|
||||
{
|
||||
PaletteIndex = client.PaletteIndex;
|
||||
//Game.chat.AddLine(this, "has changed color to {0}".F(PlayerColors[client.PaletteIndex].b));
|
||||
}
|
||||
|
||||
if (SpawnPointIndex != client.SpawnPoint)
|
||||
{
|
||||
SpawnPointIndex = client.SpawnPoint;
|
||||
//Game.chat.AddLine(this, "has changed spawn point to {0}".F(client.SpawnPoint));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user