From c4331321944707c6498a421571ea0e8859431932 Mon Sep 17 00:00:00 2001 From: Nicolas Schmitt Date: Sun, 31 Jul 2016 14:57:14 +0200 Subject: [PATCH] Websocket: Send coords on connect --- PoGo.NecroBot.CLI/WebSocketInterface.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PoGo.NecroBot.CLI/WebSocketInterface.cs b/PoGo.NecroBot.CLI/WebSocketInterface.cs index 8c4a62fd6..b3d425442 100644 --- a/PoGo.NecroBot.CLI/WebSocketInterface.cs +++ b/PoGo.NecroBot.CLI/WebSocketInterface.cs @@ -113,6 +113,16 @@ private void HandleSession(WebSocketSession session) if (_lastPokeStopList != null) session.Send(Serialize(_lastPokeStopList)); + + try + { + session.Send(Serialize(new UpdatePositionEvent() + { + Latitude = _session.Client.CurrentLatitude, + Longitude = _session.Client.CurrentLongitude + })); + } + catch { } } public void Listen(IEvent evt, Session session)