1
0
mirror of https://github.com/Mauler125/r5sdk.git synced 2025-02-09 19:15:03 +01:00

Add 'ip' cvar to SDK

This commit is contained in:
Kawe Mazidjatari 2023-04-16 00:32:50 +02:00
parent abf74d71a0
commit 72a0399427
2 changed files with 5 additions and 1 deletions
r5dev
public/tier1
tier1

@ -33,6 +33,7 @@ extern ConVar* staticProp_gather_size_weight;
extern ConVar* model_defaultFadeDistScale;
extern ConVar* model_defaultFadeDistMin;
extern ConVar* ip;
extern ConVar* hostname;
extern ConVar* hostdesc;
extern ConVar* hostip;

@ -1,5 +1,6 @@
#include "core/stdafx.h"
#include "tier1/utlrbtree.h"
#include "tier1/NetAdr.h"
#include "tier1/cvar.h"
#include "public/const.h"
#include "engine/sys_dll2.h"
@ -27,6 +28,7 @@ ConVar* staticProp_gather_size_weight = nullptr;
ConVar* model_defaultFadeDistScale = nullptr;
ConVar* model_defaultFadeDistMin = nullptr;
ConVar* ip = nullptr;
ConVar* hostname = nullptr;
ConVar* hostdesc = nullptr;
ConVar* hostip = nullptr;
@ -503,6 +505,7 @@ void ConVar::InitShipped(void)
origin_disconnectWhenOffline = g_pCVar->FindVar("origin_disconnectWhenOffline");
#endif // !DEDICATED
mp_gamemode = g_pCVar->FindVar("mp_gamemode");
ip = g_pCVar->FindVar("ip");
hostname = g_pCVar->FindVar("hostname");
hostip = g_pCVar->FindVar("hostip");
hostport = g_pCVar->FindVar("hostport");
@ -594,7 +597,7 @@ void ConVar::PurgeHostNames(void)
{
if (ConVar* pCVar = g_pCVar->FindVar(pszHostNames[i]))
{
pCVar->SetValue("0.0.0.0");
pCVar->SetValue(NET_IPV4_UNSPEC);
}
}
}