Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarUniverseServer.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-09-05 19:15:47 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-09-11 15:19:17 +1000
commit37f3178d33ab77de064bcbf10b4b03ddb47cc979 (patch)
tree76e3b3ce2d8716577af98e2bbbc4a41021db5107 /source/game/StarUniverseServer.cpp
parent90db1e0fbadaeb625691d3d0d13f5ae6ef057109 (diff)
Network compatibility changes
Diffstat (limited to 'source/game/StarUniverseServer.cpp')
-rw-r--r--source/game/StarUniverseServer.cpp8
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));