Fix: Game can no longer drop you in a single player game.
This commit is contained in:
@@ -34,6 +34,14 @@ namespace OpenRA.Mods.Common.Server
|
||||
{
|
||||
isInitialPing = false;
|
||||
lastPing = Game.RunTime;
|
||||
|
||||
if (server.LobbyInfo.IsSinglePlayer && server.Conns.Any() && server.GetClient(server.Conns.First()).IpAddress == "127.0.0.1")
|
||||
{
|
||||
foreach (var c in server.Conns.ToList())
|
||||
server.SendOrderTo(c, "Ping", Game.RunTime.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var c in server.Conns.ToList())
|
||||
{
|
||||
if (c.TimeSinceLastResponse < ConnTimeout)
|
||||
@@ -51,7 +59,6 @@ namespace OpenRA.Mods.Common.Server
|
||||
server.DropClient(c, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Game.RunTime - lastConnReport > ConnReportInterval)
|
||||
{
|
||||
@@ -67,4 +74,6 @@ namespace OpenRA.Mods.Common.Server
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user