aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/masterserver.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-11-27 01:35:22 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-11-27 01:35:22 +0000
commitf66ea9ce2af44a00e49e6defaa7ec6ef4f100bb4 (patch)
treefce15e55515c16ba5f1884545643ae45e52c6e7f /NorthstarDedicatedTest/masterserver.cpp
parent3d3d2c2a13a292a9093ad3029563a1c543a07ab7 (diff)
downloadNorthstarLauncher-f66ea9ce2af44a00e49e6defaa7ec6ef4f100bb4.tar.gz
NorthstarLauncher-f66ea9ce2af44a00e49e6defaa7ec6ef4f100bb4.zip
more masterserver stuff and support for devonly/hidden cvars
Diffstat (limited to 'NorthstarDedicatedTest/masterserver.cpp')
-rw-r--r--NorthstarDedicatedTest/masterserver.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/masterserver.cpp b/NorthstarDedicatedTest/masterserver.cpp
index 1d639f28..43db66e7 100644
--- a/NorthstarDedicatedTest/masterserver.cpp
+++ b/NorthstarDedicatedTest/masterserver.cpp
@@ -227,6 +227,9 @@ void MasterServerManager::RequestServerList()
{
RemoteModInfo modInfo;
+ if (!requiredMod.HasMember("RequiredOnClient") || !requiredMod["RequiredOnClient"].IsTrue())
+ continue;
+
if (!requiredMod.HasMember("Name") || !requiredMod["Name"].IsString())
continue;
modInfo.Name = requiredMod["Name"].GetString();
@@ -477,12 +480,13 @@ void MasterServerManager::AddSelfToServerList(int port, int authPort, char* name
int currentModIndex = 0;
for (Mod& mod : g_ModManager->m_loadedMods)
{
- if (!mod.RequiredOnClient)
+ if (!mod.RequiredOnClient && !mod.Pdiff.size())
continue;
modinfoDoc["Mods"].PushBack(rapidjson::Value(rapidjson::kObjectType), modinfoDoc.GetAllocator());
modinfoDoc["Mods"][currentModIndex].AddMember("Name", rapidjson::StringRef(&mod.Name[0]), modinfoDoc.GetAllocator());
modinfoDoc["Mods"][currentModIndex].AddMember("Version", rapidjson::StringRef(&mod.Version[0]), modinfoDoc.GetAllocator());
+ modinfoDoc["Mods"][currentModIndex].AddMember("RequiredOnClient", mod.RequiredOnClient, modinfoDoc.GetAllocator());
modinfoDoc["Mods"][currentModIndex].AddMember("Pdiff", rapidjson::StringRef(&mod.Pdiff[0]), modinfoDoc.GetAllocator());
currentModIndex++;