StyleCop clean OpenRA.Game
This commit is contained in:
@@ -90,7 +90,7 @@ namespace OpenRA.Mods.Common.Server
|
||||
client.State = state;
|
||||
|
||||
Log.Write("server", "Player @{0} is {1}",
|
||||
conn.socket.RemoteEndPoint, client.State);
|
||||
conn.Socket.RemoteEndPoint, client.State);
|
||||
|
||||
server.SyncLobbyClients();
|
||||
|
||||
@@ -714,7 +714,7 @@ namespace OpenRA.Mods.Common.Server
|
||||
{ "name",
|
||||
s =>
|
||||
{
|
||||
Log.Write("server", "Player@{0} is now known as {1}.", conn.socket.RemoteEndPoint, s);
|
||||
Log.Write("server", "Player@{0} is now known as {1}.", conn.Socket.RemoteEndPoint, s);
|
||||
server.SendMessage("{0} is now known as {1}.".F(client.Name, s));
|
||||
client.Name = s;
|
||||
server.SyncLobbyClients();
|
||||
|
||||
@@ -43,18 +43,17 @@ namespace OpenRA.Mods.Common.Server
|
||||
{
|
||||
foreach (var c in server.Conns.ToList())
|
||||
{
|
||||
if (c == null || c.socket == null)
|
||||
if (c == null || c.Socket == null)
|
||||
continue;
|
||||
|
||||
var client = server.GetClient(c);
|
||||
|
||||
if (client == null)
|
||||
{
|
||||
server.DropClient(c, -1);
|
||||
server.SendMessage("A player has been dropped after timing out.");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (c.TimeSinceLastResponse < ConnTimeout)
|
||||
{
|
||||
server.SendOrderTo(c, "Ping", Game.RunTime.ToString());
|
||||
@@ -81,11 +80,10 @@ namespace OpenRA.Mods.Common.Server
|
||||
|
||||
foreach (var c in timeouts)
|
||||
{
|
||||
if (c == null || c.socket == null)
|
||||
if (c == null || c.Socket == null)
|
||||
continue;
|
||||
|
||||
|
||||
var client = server.GetClient(c);
|
||||
|
||||
if (client != null)
|
||||
server.SendMessage("{0} will be dropped in {1} seconds.".F(client.Name, (ConnTimeout - c.TimeSinceLastResponse) / 1000));
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public ReadOnlyList<MissionObjective> Objectives;
|
||||
|
||||
[Sync]
|
||||
public int ObjectivesHash { get { return Objectives.Aggregate(0, (code, objective) => code ^ Sync.hash(objective.State)); } }
|
||||
public int ObjectivesHash { get { return Objectives.Aggregate(0, (code, objective) => code ^ Sync.Hash(objective.State)); } }
|
||||
|
||||
// This property is used as a flag in 'Cooperative' games to mark that the player has completed all his objectives.
|
||||
// The player's WinState is only updated when his allies have all completed their objective as well.
|
||||
|
||||
Reference in New Issue
Block a user