aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-11 17:00:59 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-11 17:00:59 +0000
commit12b5d0b85a4a1cb55b068a3fbb357c30a52c1e20 (patch)
tree9f348642f3a157655703b2fdbafe91c44740e1eb
parent3cf310cc9f8b400a100abd1067505c89c99259ab (diff)
downloadNorthstarLauncher-12b5d0b85a4a1cb55b068a3fbb357c30a52c1e20.tar.gz
NorthstarLauncher-12b5d0b85a4a1cb55b068a3fbb357c30a52c1e20.zip
write_persistence fix
-rw-r--r--NorthstarDedicatedTest/dedicated.cpp2
-rw-r--r--NorthstarDedicatedTest/masterserver.cpp7
2 files changed, 3 insertions, 6 deletions
diff --git a/NorthstarDedicatedTest/dedicated.cpp b/NorthstarDedicatedTest/dedicated.cpp
index a2f174ff..4c263d0c 100644
--- a/NorthstarDedicatedTest/dedicated.cpp
+++ b/NorthstarDedicatedTest/dedicated.cpp
@@ -68,7 +68,7 @@ void RunServer(CDedicatedExports* dedicated)
if (!maxPlayers)
maxPlayers = "6";
- SetConsoleTitleA(fmt::format("Titanfall 2 dedicated server - {} {}/{} players", g_pHostState->m_levelName, g_ServerAuthenticationManager->m_additionalPlayerData.size(), maxPlayers).c_str());
+ SetConsoleTitleA(fmt::format("Titanfall 2 dedicated server - {} {}/{} players ({})", g_pHostState->m_levelName, g_ServerAuthenticationManager->m_additionalPlayerData.size(), maxPlayers, GetCurrentPlaylistName()).c_str());
Sleep(1.0 / Cvar_base_tickinterval_mp->m_fValue); // currently only supports mp, doesnt really matter rn though since most sp levels crash on dedi
}
}
diff --git a/NorthstarDedicatedTest/masterserver.cpp b/NorthstarDedicatedTest/masterserver.cpp
index e8b1e1d9..4b4b9e2c 100644
--- a/NorthstarDedicatedTest/masterserver.cpp
+++ b/NorthstarDedicatedTest/masterserver.cpp
@@ -618,10 +618,7 @@ void MasterServerManager::UpdateServerPlayerCount(int playerCount)
void MasterServerManager::WritePlayerPersistentData(char* playerId, char* pdata, size_t pdataSize)
{
- // dont call this if we don't have a server id
- if (!*m_ownServerId)
- return;
-
+ // still call this if we don't have a server id, since lobbies that aren't port forwarded need to be able to call it
m_savingPersistentData = true;
std::string playerIdTemp(playerId);
@@ -634,7 +631,7 @@ void MasterServerManager::WritePlayerPersistentData(char* playerId, char* pdata,
};
// we dont process this at all atm, maybe do later, but atm not necessary
- if (auto result = http.Post(fmt::format("/accounts/write_persistence?id={}", playerIdTemp).c_str(), requestItems))
+ if (auto result = http.Post(fmt::format("/accounts/write_persistence?id={}?serverId={}", playerIdTemp, m_ownServerId).c_str(), requestItems))
{
m_successfullyConnected = true;
}