aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/engine/hoststate.cpp
diff options
context:
space:
mode:
authorunknown <for.oliver.kirkham@gmail.com>2023-02-04 15:30:44 +0000
committerunknown <for.oliver.kirkham@gmail.com>2023-02-04 15:30:44 +0000
commitebd11ad933320de70baa54c06a7ee8df912b548d (patch)
treedbf8fe6230ea387dd71d13d702c085b008d1b53c /NorthstarDLL/engine/hoststate.cpp
parent75ae0bf4f6fab277a611ab42fc037580bfdfc06e (diff)
downloadNorthstarLauncher-ebd11ad933320de70baa54c06a7ee8df912b548d.tar.gz
NorthstarLauncher-ebd11ad933320de70baa54c06a7ee8df912b548d.zip
add FUNCTION_AT and VAR_AT macros
Diffstat (limited to 'NorthstarDLL/engine/hoststate.cpp')
-rw-r--r--NorthstarDLL/engine/hoststate.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/NorthstarDLL/engine/hoststate.cpp b/NorthstarDLL/engine/hoststate.cpp
index 4900539b..c7775ac0 100644
--- a/NorthstarDLL/engine/hoststate.cpp
+++ b/NorthstarDLL/engine/hoststate.cpp
@@ -19,10 +19,10 @@ namespace R2
CHostState* g_pHostState;
} // namespace R2
-ConVar* Cvar_hostport;
std::string sLastMode;
-void (*_fastcall _Cmd_Exec_f)(const CCommand& arg, bool bOnlyIfExists, bool bUseWhitelists);
+VAR_AT(engine.dll + 0x13FA6070, ConVar*, Cvar_hostport);
+FUNCTION_AT(engine.dll + 0x1232C0, void, __fastcall, _Cmd_Exec_f, (const CCommand& arg, bool bOnlyIfExists, bool bUseWhitelists));
void ServerStartingOrChangingMap()
{
@@ -195,7 +195,7 @@ ON_DLL_LOAD_RELIESON("engine.dll", HostState, ConVar, (CModule module))
AUTOHOOK_DISPATCH()
g_pHostState = module.Offset(0x7CF180).As<CHostState*>();
- Cvar_hostport = module.Offset(0x13FA6070).As<ConVar*>();
+ Cvar_hostport = module.Offset().As<ConVar*>();
- _Cmd_Exec_f = module.Offset(0x1232C0).As<void (*__fastcall)(const CCommand&, bool, bool)>();
+ _Cmd_Exec_f = module.Offset().As<void (*__fastcall)(const CCommand&, bool, bool)>();
}