player name setting
This commit is contained in:
@@ -25,6 +25,7 @@ namespace OpenRa.GameRules
|
||||
public readonly string Map = "scm12ea.ini";
|
||||
public readonly int Player = 1;
|
||||
public readonly string Replay = "";
|
||||
public readonly string PlayerName = "";
|
||||
|
||||
// Gameplay options
|
||||
public readonly bool RepairRequiresConyard = true;
|
||||
|
||||
@@ -32,6 +32,9 @@ namespace OpenRa
|
||||
Game.viewport.GoToStartLocation(LocalPlayer);
|
||||
Game.chat.AddLine(LocalPlayer, "is now YOU");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Game.Settings.PlayerName) && LocalPlayer.PlayerName != Game.Settings.PlayerName)
|
||||
Game.IssueOrder(Order.Chat("/name " + Game.Settings.PlayerName));
|
||||
|
||||
}
|
||||
|
||||
public readonly Actor WorldActor;
|
||||
@@ -68,7 +71,9 @@ namespace OpenRa
|
||||
WorldActor = CreateActor("World", new int2(int.MaxValue, int.MaxValue), null);
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
players[i] = new Player(this, i, Game.LobbyInfo.Clients.FirstOrDefault(a => a.Index == i));
|
||||
}
|
||||
Timer.Time( "worldActor, players: {0}" );
|
||||
|
||||
Queries = new AllQueries( this );
|
||||
|
||||
Reference in New Issue
Block a user