From bb822b7638d5ae9bc4499ff76edc74f3741e6518 Mon Sep 17 00:00:00 2001 From: cat_or_not <41955154+catornot@users.noreply.github.com> Date: Sun, 5 Nov 2023 20:21:50 -0500 Subject: Plugins v3 (#472) - nuked presence logic ( moved to the discord rpc plugin ) - more exposed sq functions - exposed dll addresses - `g_pCVar` is exposed - added "userdata" to plugin's async call - added runframe to plugins --- NorthstarDLL/core/convar/concommand.cpp | 4 +++- NorthstarDLL/core/convar/convar.cpp | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'NorthstarDLL/core/convar') diff --git a/NorthstarDLL/core/convar/concommand.cpp b/NorthstarDLL/core/convar/concommand.cpp index 732e0d1f..41f54c76 100644 --- a/NorthstarDLL/core/convar/concommand.cpp +++ b/NorthstarDLL/core/convar/concommand.cpp @@ -3,6 +3,7 @@ #include "engine/r2engine.h" #include "plugins/pluginbackend.h" +#include "plugins/plugin_abi.h" #include @@ -151,5 +152,6 @@ ON_DLL_LOAD("engine.dll", ConCommand, (CModule module)) ConCommandConstructor = module.Offset(0x415F60).RCast(); AddMiscConCommands(); - g_pPluginCommunicationhandler->m_sEngineData.ConCommandConstructor = (void*)ConCommandConstructor; + g_pPluginCommunicationhandler->m_sEngineData.ConCommandConstructor = + reinterpret_cast(ConCommandConstructor); } diff --git a/NorthstarDLL/core/convar/convar.cpp b/NorthstarDLL/core/convar/convar.cpp index 9aaaca66..594989c2 100644 --- a/NorthstarDLL/core/convar/convar.cpp +++ b/NorthstarDLL/core/convar/convar.cpp @@ -4,6 +4,7 @@ #include "core/sourceinterface.h" #include "plugins/pluginbackend.h" +#include "plugins/plugin_abi.h" #include @@ -40,10 +41,11 @@ ON_DLL_LOAD("engine.dll", ConVar, (CModule module)) R2::g_pCVarInterface = new SourceInterface("vstdlib.dll", "VEngineCvar007"); R2::g_pCVar = *R2::g_pCVarInterface; - g_pPluginCommunicationhandler->m_sEngineData.conVarMalloc = (void*)conVarMalloc; - g_pPluginCommunicationhandler->m_sEngineData.conVarRegister = (void*)conVarRegister; - g_pPluginCommunicationhandler->m_sEngineData.ConVar_Vtable = (void*)g_pConVar_Vtable; - g_pPluginCommunicationhandler->m_sEngineData.IConVar_Vtable = (void*)g_pIConVar_Vtable; + g_pPluginCommunicationhandler->m_sEngineData.conVarMalloc = reinterpret_cast(conVarMalloc); + g_pPluginCommunicationhandler->m_sEngineData.conVarRegister = reinterpret_cast(conVarRegister); + g_pPluginCommunicationhandler->m_sEngineData.ConVar_Vtable = reinterpret_cast(g_pConVar_Vtable); + g_pPluginCommunicationhandler->m_sEngineData.IConVar_Vtable = reinterpret_cast(g_pIConVar_Vtable); + g_pPluginCommunicationhandler->m_sEngineData.g_pCVar = reinterpret_cast(R2::g_pCVar); } //----------------------------------------------------------------------------- -- cgit v1.2.3