aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/server
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/server')
-rw-r--r--NorthstarDLL/server/serverpresence.cpp5
-rw-r--r--NorthstarDLL/server/serverpresence.h9
2 files changed, 9 insertions, 5 deletions
diff --git a/NorthstarDLL/server/serverpresence.cpp b/NorthstarDLL/server/serverpresence.cpp
index 072ef347..e0b29cb6 100644
--- a/NorthstarDLL/server/serverpresence.cpp
+++ b/NorthstarDLL/server/serverpresence.cpp
@@ -71,7 +71,7 @@ std::string UnescapeUnicode(const std::string& str)
return result;
}
-ServerPresenceManager::ServerPresenceManager()
+void ServerPresenceManager::CreateConVars()
{
// clang-format off
// register convars
@@ -230,7 +230,6 @@ void ServerPresenceManager::SetPlayerCount(const int iPlayerCount)
ON_DLL_LOAD_RELIESON("engine.dll", ServerPresence, ConVar, (CModule module))
{
- g_pServerPresence = new ServerPresenceManager;
-
+ g_pServerPresence->CreateConVars();
Cvar_hostname = module.Offset(0x1315BAE8).Deref().As<ConVar*>();
}
diff --git a/NorthstarDLL/server/serverpresence.h b/NorthstarDLL/server/serverpresence.h
index 125b2e68..3df2b68d 100644
--- a/NorthstarDLL/server/serverpresence.h
+++ b/NorthstarDLL/server/serverpresence.h
@@ -3,9 +3,12 @@
struct ServerPresence
{
+ public:
int m_iPort;
int m_iAuthPort;
+ 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
@@ -27,6 +30,8 @@ struct ServerPresence
m_iPort = obj->m_iPort;
m_iAuthPort = obj->m_iAuthPort;
+ m_sServerId = obj->m_sServerId;
+
m_sServerName = obj->m_sServerName;
m_sServerDesc = obj->m_sServerDesc;
memcpy(m_Password, obj->m_Password, sizeof(m_Password));
@@ -69,10 +74,10 @@ class ServerPresenceManager
ConVar* Cvar_ns_report_sp_server_to_masterserver;
public:
- ServerPresenceManager();
-
void AddPresenceReporter(ServerPresenceReporter* reporter);
+ void CreateConVars();
+
void CreatePresence();
void DestroyPresence();
void RunFrame(double flCurrentTime);