aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/buildainfile.cpp
diff options
context:
space:
mode:
authorKawe Mazidjatari <48657826+Mauler125@users.noreply.github.com>2022-02-23 22:27:08 +0100
committerGitHub <noreply@github.com>2022-02-23 18:27:08 -0300
commit4f28a07d0562ca905bbcdb010b69604c330194bb (patch)
tree32ce0e8b0eff10cba6944a561e3538931a6033b6 /NorthstarDedicatedTest/buildainfile.cpp
parent8c9f34283f8670dda98959d0785d682e6f652a93 (diff)
downloadNorthstarLauncher-4f28a07d0562ca905bbcdb010b69604c330194bb.tar.gz
NorthstarLauncher-4f28a07d0562ca905bbcdb010b69604c330194bb.zip
ConVar class rebuild (#90)
* Implement CCvar class with mapped out vtable funcs * Rebuilded ConVar class + code overhaul to use new system * ConVar class is now properly mapped out for r2 (0x80 in size). * Reimplemented and exposed all frequently used ConVar class methods to the SDK. * Implement frequently used CCvar class methods. * Implement all CCVarIteratorInternal class methods. * Performed additional cleanup over the SDK to use new system instead. * ConVar class improvements + rebuilded ConCommand struct * Fix actual struct size for ConCommand
Diffstat (limited to 'NorthstarDedicatedTest/buildainfile.cpp')
-rw-r--r--NorthstarDedicatedTest/buildainfile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/NorthstarDedicatedTest/buildainfile.cpp b/NorthstarDedicatedTest/buildainfile.cpp
index 1d37c0a9..3adb8324 100644
--- a/NorthstarDedicatedTest/buildainfile.cpp
+++ b/NorthstarDedicatedTest/buildainfile.cpp
@@ -231,7 +231,7 @@ void DumpAINInfo(CAI_Network* aiNetwork)
spdlog::info("calculated total linkcount: {}", calculatedLinkcount);
calculatedLinkcount /= 2;
- if (Cvar_ns_ai_dumpAINfileFromLoad->m_nValue)
+ if (Cvar_ns_ai_dumpAINfileFromLoad->GetBool())
{
if (aiNetwork->linkcount == calculatedLinkcount)
spdlog::info("caculated linkcount is normal!");
@@ -365,7 +365,7 @@ void LoadAINFileHook(void* aimanager, void* buf, const char* filename)
{
LoadAINFile(aimanager, buf, filename);
- if (Cvar_ns_ai_dumpAINfileFromLoad->m_nValue)
+ if (Cvar_ns_ai_dumpAINfileFromLoad->GetBool())
{
spdlog::info("running DumpAINInfo for loaded file {}", filename);
DumpAINInfo(*(CAI_Network**)((char*)aimanager + 2536));
@@ -374,7 +374,7 @@ void LoadAINFileHook(void* aimanager, void* buf, const char* filename)
void InitialiseBuildAINFileHooks(HMODULE baseAddress)
{
- Cvar_ns_ai_dumpAINfileFromLoad = RegisterConVar(
+ Cvar_ns_ai_dumpAINfileFromLoad = new ConVar(
"ns_ai_dumpAINfileFromLoad", "0", FCVAR_NONE, "For debugging: whether we should dump ain data for ains loaded from disk");
HookEnabler hook;