From 5f01d2d4d7c19e280f02cd2e0ecd73990f2373a4 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Mon, 18 Mar 2024 23:25:44 +1100 Subject: [PATCH] Update StarWorldServer.cpp --- source/game/StarWorldServer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/game/StarWorldServer.cpp b/source/game/StarWorldServer.cpp index 6543a75..680deaa 100644 --- a/source/game/StarWorldServer.cpp +++ b/source/game/StarWorldServer.cpp @@ -247,7 +247,12 @@ bool WorldServer::addClient(ConnectionId clientId, SpawnTarget const& spawnTarge clientInfo->local = isLocal; auto worldStartPacket = make_shared(); - worldStartPacket->templateData = m_worldTemplate->store(); + auto& templateData = worldStartPacket->templateData = m_worldTemplate->store(); + // this makes it possible to use custom InstanceWorlds without clients having the mod that adds their dungeon: + if (templateData.optQueryString("worldParameters.primaryDungeon") + && Root::singletonPtr()->configuration()->getPath("compatibility.customDungeonWorld").optBool().value(false)) + worldStartPacket->templateData = worldStartPacket->templateData.setPath("worldParameters.primaryDungeon", "testarena"); + tie(worldStartPacket->skyData, clientInfo->skyNetVersion) = m_sky->writeUpdate(); tie(worldStartPacket->weatherData, clientInfo->weatherNetVersion) = m_weather.writeUpdate(); worldStartPacket->playerStart = playerStart;