aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/engine/hoststate.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2023-02-23 00:19:48 +0000
committerGitHub <noreply@github.com>2023-02-23 00:19:48 +0000
commit32165afe41c4cf4d3b261ee7a9c69c369253cc13 (patch)
tree156844485e0e463410d76cbb4c4c7a6cd0042786 /NorthstarDLL/engine/hoststate.cpp
parent6aaac4cd452878acc59d9748bcd2d0e072d2a432 (diff)
downloadNorthstarLauncher-32165afe41c4cf4d3b261ee7a9c69c369253cc13.tar.gz
NorthstarLauncher-32165afe41c4cf4d3b261ee7a9c69c369253cc13.zip
Add `FUNCTION_AT` and `VAR_AT` macros (#416)
* add FUNCTION_AT and VAR_AT macros * fix build issues oops * fix formatting * add PREDEFINED_VAR_AT * change func name * fixup formatting * update to use DEFINED_VAR_AT
Diffstat (limited to 'NorthstarDLL/engine/hoststate.cpp')
-rw-r--r--NorthstarDLL/engine/hoststate.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/NorthstarDLL/engine/hoststate.cpp b/NorthstarDLL/engine/hoststate.cpp
index 5a295425..44a66113 100644
--- a/NorthstarDLL/engine/hoststate.cpp
+++ b/NorthstarDLL/engine/hoststate.cpp
@@ -18,10 +18,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()
{
@@ -194,7 +194,4 @@ 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*>();
-
- _Cmd_Exec_f = module.Offset(0x1232C0).As<void (*__fastcall)(const CCommand&, bool, bool)>();
}