diff options
author | pg9182 <96569817+pg9182@users.noreply.github.com> | 2023-05-05 19:45:04 -0400 |
---|---|---|
committer | pg9182 <96569817+pg9182@users.noreply.github.com> | 2023-05-05 19:45:04 -0400 |
commit | 97df63bc21e53556f3cc31112f713d1ae63e691a (patch) | |
tree | 619eb57b5574e6f0f9541a570bbe537ac9ac0eb8 /NorthstarDLL/server | |
parent | 39f73a68730e9336f2469fdf1024dab771a85fb3 (diff) | |
download | NorthstarLauncher-temp/test-dedi-crash-plugin.tar.gz NorthstarLauncher-temp/test-dedi-crash-plugin.zip |
Revert "Plugin system v2 (#343)"temp/test-dedi-crash-plugin
This reverts commit 450d0b1ed437cf37b4309af952af8904f3f07768.
Diffstat (limited to 'NorthstarDLL/server')
-rw-r--r-- | NorthstarDLL/server/serverpresence.cpp | 5 | ||||
-rw-r--r-- | NorthstarDLL/server/serverpresence.h | 9 |
2 files changed, 5 insertions, 9 deletions
diff --git a/NorthstarDLL/server/serverpresence.cpp b/NorthstarDLL/server/serverpresence.cpp index 945f5810..c7ef20c3 100644 --- a/NorthstarDLL/server/serverpresence.cpp +++ b/NorthstarDLL/server/serverpresence.cpp @@ -71,7 +71,7 @@ std::string UnescapeUnicode(const std::string& str) return result; } -void ServerPresenceManager::CreateConVars() +ServerPresenceManager::ServerPresenceManager() { // clang-format off // register convars @@ -223,6 +223,7 @@ void ServerPresenceManager::SetPlayerCount(const int iPlayerCount) ON_DLL_LOAD_RELIESON("engine.dll", ServerPresence, ConVar, (CModule module)) { - g_pServerPresence->CreateConVars(); + g_pServerPresence = new ServerPresenceManager; + Cvar_hostname = module.Offset(0x1315BAE8).Deref().As<ConVar*>(); } diff --git a/NorthstarDLL/server/serverpresence.h b/NorthstarDLL/server/serverpresence.h index 3aabecde..6b8c2859 100644 --- a/NorthstarDLL/server/serverpresence.h +++ b/NorthstarDLL/server/serverpresence.h @@ -3,11 +3,8 @@ struct ServerPresence { - public: int m_iPort; - std::string m_sServerId; - std::string m_sServerName; std::string m_sServerDesc; char m_Password[256]; // probably bigger than will ever be used in practice, lol @@ -28,8 +25,6 @@ struct ServerPresence { m_iPort = obj->m_iPort; - m_sServerId = obj->m_sServerId; - m_sServerName = obj->m_sServerName; m_sServerDesc = obj->m_sServerDesc; memcpy(m_Password, obj->m_Password, sizeof(m_Password)); @@ -72,9 +67,9 @@ class ServerPresenceManager ConVar* Cvar_ns_report_sp_server_to_masterserver; public: - void AddPresenceReporter(ServerPresenceReporter* reporter); + ServerPresenceManager(); - void CreateConVars(); + void AddPresenceReporter(ServerPresenceReporter* reporter); void CreatePresence(); void DestroyPresence(); |