From 450d0b1ed437cf37b4309af952af8904f3f07768 Mon Sep 17 00:00:00 2001 From: Emma Miler Date: Tue, 11 Apr 2023 20:49:16 +0200 Subject: Plugin system v2 (#343) * Some work * Rewrite gamestate presence * Add plugin system logger * Format changes * Format chjange * Fix gamestate stuff * some callback stuff * move around invite stuff * move invite to funcs * fix presence server data * Actually call InformSQVMCreated * bruh * Fix TODO's * Formatting * Fix filters * Add InformDLLLoads * Fix plugin handle always being 0 * Formatting * Fix merge issues * Formatting * Mods can add files compiled at SQVM init * Some Small Fixes * Add changes from review * Fix load failure * Add new squirrel functions * actually call InformSQVMDestroyed * add CreateObject function * answers to complaints * remove snake cases from GameStatePresence --------- Co-authored-by: cat_or_not <41955154+catornot@users.noreply.github.com> --- NorthstarDLL/core/convar/concommand.cpp | 4 ++++ NorthstarDLL/core/convar/convar.cpp | 7 +++++++ 2 files changed, 11 insertions(+) (limited to 'NorthstarDLL/core/convar') diff --git a/NorthstarDLL/core/convar/concommand.cpp b/NorthstarDLL/core/convar/concommand.cpp index 67c867f8..82594f04 100644 --- a/NorthstarDLL/core/convar/concommand.cpp +++ b/NorthstarDLL/core/convar/concommand.cpp @@ -2,6 +2,8 @@ #include "shared/misccommands.h" #include "engine/r2engine.h" +#include "plugins/pluginbackend.h" + #include //----------------------------------------------------------------------------- @@ -148,4 +150,6 @@ ON_DLL_LOAD("engine.dll", ConCommand, (CModule module)) { ConCommandConstructor = module.Offset(0x415F60).As(); AddMiscConCommands(); + + g_pPluginCommunicationhandler->m_sEngineData.ConCommandConstructor = ConCommandConstructor; } diff --git a/NorthstarDLL/core/convar/convar.cpp b/NorthstarDLL/core/convar/convar.cpp index 21fca8c0..6646729a 100644 --- a/NorthstarDLL/core/convar/convar.cpp +++ b/NorthstarDLL/core/convar/convar.cpp @@ -3,6 +3,8 @@ #include "convar.h" #include "core/sourceinterface.h" +#include "plugins/pluginbackend.h" + #include typedef void (*ConVarRegisterType)( @@ -37,6 +39,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 = conVarMalloc; + g_pPluginCommunicationhandler->m_sEngineData.conVarRegister = conVarRegister; + g_pPluginCommunicationhandler->m_sEngineData.ConVar_Vtable = g_pConVar_Vtable; + g_pPluginCommunicationhandler->m_sEngineData.IConVar_Vtable = g_pIConVar_Vtable; } //----------------------------------------------------------------------------- -- cgit v1.2.3