Add independent console option. Various random fixes

This commit is contained in:
Brant Martin
2019-02-20 20:20:09 -05:00
parent 2bb3aa84a7
commit 967d8ce068
4 changed files with 15 additions and 7 deletions

View File

@@ -195,8 +195,7 @@ namespace Torch.Server
public override void Init(object gameInstance)
{
base.Init(gameInstance);
var game = gameInstance as MySandboxGame;
if (game != null && MySession.Static != null)
if (gameInstance is MySandboxGame && MySession.Static != null)
State = ServerState.Running;
else
State = ServerState.Stopped;