Skip to content

Commit

Permalink
hack to get pins and chat working again
Browse files Browse the repository at this point in the history
* terrible hack because I don't know enough about C#
  pretty sure the package field was a string, now it's a serialized object
  I have no idea how to unserialize into the userInfo type
* convert all logging to ZLog
* fixed mistlands color, should now be purple instead of looking like
  water, stop the server, delete map.png and restart to see the results.
* version to 2.5.2
  • Loading branch information
h0tw1r3 committed Apr 5, 2023
1 parent 3f09c0d commit 5af53c0
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 74 deletions.
9 changes: 4 additions & 5 deletions WebMap/MapDataServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected override void OnOpen()
{
endpoint = Context.UserEndPoint.ToString();
}
Debug.Log("WebMap: new visitor connected from " + endpoint);
ZLog.Log("WebMap: new visitor connected from " + endpoint);
base.OnOpen();
}

Expand Down Expand Up @@ -140,7 +140,6 @@ public MapDataServer()
httpServer.OnGet += (sender, e) =>
{
HttpListenerRequest req = e.Request;
// Debug.Log("~~~ Got GET Request for: " + req.RawUrl);
if (ProcessSpecialRoutes(e)) return;
Expand Down Expand Up @@ -229,7 +228,7 @@ private void ServeStaticFiles(HttpRequestEventArgs e)
}
catch (Exception ex)
{
Debug.Log("WebMap: FAILED TO READ FILE! " + ex.Message);
ZLog.LogError("WebMap: FAILED TO READ FILE! " + ex.Message);
}
}

Expand Down Expand Up @@ -324,9 +323,9 @@ public void ListenAsync()
httpServer.Start();

if (httpServer.IsListening)
Debug.Log($"WebMap: HTTP Server Listening on port {SERVER_PORT}");
ZLog.Log($"WebMap: HTTP Server Listening on port {SERVER_PORT}");
else
Debug.Log("WebMap: HTTP Server Failed To Start !!!");
ZLog.LogError("WebMap: HTTP Server Failed To Start !!!");
}

public void BroadcastPing(long id, string name, Vector3 position)
Expand Down
Loading

0 comments on commit 5af53c0

Please sign in to comment.