diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-09-05 19:15:47 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-09-11 15:19:17 +1000 |
commit | 37f3178d33ab77de064bcbf10b4b03ddb47cc979 (patch) | |
tree | 76e3b3ce2d8716577af98e2bbbc4a41021db5107 /source/game/StarUniverseServer.cpp | |
parent | 90db1e0fbadaeb625691d3d0d13f5ae6ef057109 (diff) |
Network compatibility changes
Diffstat (limited to 'source/game/StarUniverseServer.cpp')
-rw-r--r-- | source/game/StarUniverseServer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/game/StarUniverseServer.cpp b/source/game/StarUniverseServer.cpp index 28f7862..09cfdc8 100644 --- a/source/game/StarUniverseServer.cpp +++ b/source/game/StarUniverseServer.cpp @@ -835,7 +835,10 @@ void UniverseServer::warpPlayers() { // Checking the spawn target validity then adding the client is not // perfect, it can still become invalid in between, if we fail at // adding the client we need to warp them back. - if (toWorld && toWorld->addClient(clientId, warpToWorld.target, !clientContext->remoteAddress(), clientContext->canBecomeAdmin())) { + if (toWorld && toWorld->addClient(clientId, warpToWorld.target, + !clientContext->remoteAddress(), + clientContext->canBecomeAdmin(), + clientContext->netRules())) { clientContext->setPlayerWorld(toWorld); m_chatProcessor->joinChannel(clientId, printWorldId(warpToWorld.world)); @@ -1698,7 +1701,8 @@ void UniverseServer::acceptConnection(UniverseConnection connection, Maybe<HostA } ConnectionId clientId = m_clients.nextId(); - auto clientContext = make_shared<ServerClientContext>(clientId, remoteAddress, clientConnect->playerUuid, + NetCompatibilityRules netRules(legacyClient); + auto clientContext = make_shared<ServerClientContext>(clientId, remoteAddress, netRules, clientConnect->playerUuid, clientConnect->playerName, clientConnect->playerSpecies, administrator, clientConnect->shipChunks); m_clients.add(clientId, clientContext); m_connectionServer->addConnection(clientId, std::move(connection)); |