Add a 'Shutting down' state to the gameserver.

Tell the masterserver about it, so it can quickly remove games
from the list when they are finished, rather than waiting for the
5 minute TTL to expire.
This commit is contained in:
Sam Hegarty
2012-11-22 20:04:27 +13:00
committed by Chris Forbes
parent 3a77082c66
commit 0c104cfc3a
5 changed files with 48 additions and 20 deletions

View File

@@ -313,7 +313,8 @@ namespace OpenRA
{
System.Threading.Thread.Sleep(100);
if((server.GameStarted)&&(server.conns.Count<=1))
if((server.State == Server.ServerState.GameStarted)
&& (server.conns.Count<=1))
{
Console.WriteLine("No one is playing, shutting down...");
server.Shutdown();