diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-20 19:10:41 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-20 19:10:41 +1000 |
commit | 607be749451aa40e3619e7ceab0927d1fcec8233 (patch) | |
tree | 27bd18fa88ea129754443e916578aa4479cdfdc7 /source/game/StarSystemWorldServerThread.cpp | |
parent | d0307e7aa77ddc8d15b6d1e036e563f3c9150287 (diff) |
Fix server hang while looking for starter world
Diffstat (limited to 'source/game/StarSystemWorldServerThread.cpp')
-rw-r--r-- | source/game/StarSystemWorldServerThread.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/game/StarSystemWorldServerThread.cpp b/source/game/StarSystemWorldServerThread.cpp index 8035975..83210a2 100644 --- a/source/game/StarSystemWorldServerThread.cpp +++ b/source/game/StarSystemWorldServerThread.cpp @@ -101,7 +101,12 @@ void SystemWorldServerThread::update() { for (auto clientId : m_clients) { m_outgoingPacketQueue[clientId].appendAll(m_systemWorld->pullOutgoingPackets(clientId)); - m_clientShipLocations.set(clientId, {m_systemWorld->clientShipLocation(clientId), m_systemWorld->clientSkyParameters(clientId)}); + auto shipSystemLocation = m_systemWorld->clientShipLocation(clientId); + auto& shipLocation = m_clientShipLocations[clientId]; + if (shipLocation.first != shipSystemLocation) { + shipLocation.first = shipSystemLocation; + shipLocation.second = m_systemWorld->clientSkyParameters(clientId); + } if (auto warpAction = m_systemWorld->clientWarpAction(clientId)) m_clientWarpActions.set(clientId, *warpAction); else if (m_clientWarpActions.contains(clientId)) |