lobby info hax

This commit is contained in:
Chris Forbes
2010-01-14 21:42:18 +13:00
parent 6184169408
commit 88c085c1c0
7 changed files with 178 additions and 103 deletions

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using OpenRa.Game.GameRules;
using OpenRa.Game.Graphics;
using OpenRa.Game.Traits;
using OpenRa.FileFormats;
namespace OpenRa.Game
{
@@ -151,5 +152,28 @@ namespace OpenRa.Game
}
}
}
public void SyncFromLobby(Session.Client client)
{
if (PlayerName != client.Name)
{
Game.chat.AddLine(this, "is now known as " + client.Name);
PlayerName = client.Name;
}
if (Race != (Race)client.Race)
{
Game.chat.AddLine(this, "is now playing {0}".F((Race)client.Race));
Race = (Race)client.Race;
}
if (Palette != (PaletteType)client.Palette)
{
Game.chat.AddLine(this, "has changed color to {0}".F((PaletteType)client.Palette));
Palette = (PaletteType)client.Palette;
}
// todo: IsReady tracking?
}
}
}