From c06378a25897f50ed29e1c6a3c11b22d67a57f36 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Fri, 19 Sep 2014 16:40:09 -0700 Subject: [PATCH] Fix cwd for Windows by using cross-platform Application.dataPath --- HappyFunTimes/GameServer.cs | 4 ++-- HappyFunTimes/GameSystem.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HappyFunTimes/GameServer.cs b/HappyFunTimes/GameServer.cs index 37c33a4..789b15a 100644 --- a/HappyFunTimes/GameServer.cs +++ b/HappyFunTimes/GameServer.cs @@ -41,7 +41,7 @@ public class GameServer { public class Options { public Options() { - cwd = System.IO.Directory.GetCurrentDirectory(); + cwd = Application.dataPath; disconnectPlayersIfGameDisconnects = true; } public string gameId; @@ -158,7 +158,7 @@ private void SocketMessage(object sender, MessageEventArgs e) { if ( e!= null && e.Type == Opcode.Text) { try { // Handle ping. - if (e.Data == "P") { + if (e.Data == "P") { Send("P"); return; } diff --git a/HappyFunTimes/GameSystem.cs b/HappyFunTimes/GameSystem.cs index 90daf21..590d8bc 100644 --- a/HappyFunTimes/GameSystem.cs +++ b/HappyFunTimes/GameSystem.cs @@ -48,6 +48,7 @@ public GameSystem(GameServer server) { } private void OnExit(MessageExit data) { + Debug.Log("quit!"); Application.Quit(); }