mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
refactor script function registration hooks
remove vm-specific hooks for registering custom SQVM funcs
This commit is contained in:
parent
f90bba9d85
commit
955e027ad2
@ -145,80 +145,40 @@ void Script_RegisterUIFunctions(CSquirrelVM* s)
|
||||
Script_RegisterFunction(s, "ShutdownHostGame", "Script_ShutdownHostGame", "Shuts the local host game down", "void", "", &VSquirrel::SHARED::ShutdownHostGame);
|
||||
Script_RegisterFunction(s, "IsClientDLL", "Script_IsClientDLL", "Returns whether this build is client only", "bool", "", &VSquirrel::SHARED::IsClientDLL);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Initialize all CLIENT/UI global structs and register SDK (CLIENT/UI) script functions
|
||||
// Input : *v -
|
||||
// context - (1 = CLIENT 2 = UI)
|
||||
//---------------------------------------------------------------------------------
|
||||
SQRESULT Script_InitializeCLGlobalStructs(HSQUIRRELVM v, SQCONTEXT context)
|
||||
{
|
||||
SQRESULT results = v_Script_InitializeCLGlobalStructs(v, context);
|
||||
|
||||
if (context == SQCONTEXT::CLIENT)
|
||||
Script_RegisterClientFunctions(g_pClientScript.GetValue<CSquirrelVM*>());
|
||||
if (context == SQCONTEXT::UI)
|
||||
Script_RegisterUIFunctions(g_pUIScript.GetValue<CSquirrelVM*>());
|
||||
return results;
|
||||
}
|
||||
#endif // !DEDICATED
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Initialises a Squirrel VM instance
|
||||
// Output : True on success, false on failure
|
||||
//---------------------------------------------------------------------------------
|
||||
bool CSquirrelVM_Init(CSquirrelVM* s, SQCONTEXT context, float curTime)
|
||||
{
|
||||
v_CSquirrelVM_Init(s, context, curTime);
|
||||
|
||||
DevMsg((eDLL_T)context, "Created %s VM: '0x%p'\n", s->GetVM()->_sharedstate->_contextname, s);
|
||||
|
||||
switch (context)
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Initialize all SERVER global structs and register SDK (SERVER) script functions
|
||||
// Input : *v -
|
||||
//---------------------------------------------------------------------------------
|
||||
void Script_InitializeSVGlobalStructs(HSQUIRRELVM v)
|
||||
{
|
||||
v_Script_InitializeSVGlobalStructs(v);
|
||||
Script_RegisterServerFunctions(Script_GetScriptHandle(SQCONTEXT::SERVER));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Creates the SERVER Squirrel VM
|
||||
// Output : True on success, false on failure
|
||||
//---------------------------------------------------------------------------------
|
||||
SQBool Script_CreateServerVM()
|
||||
{
|
||||
SQBool results = v_Script_CreateServerVM();
|
||||
if (results)
|
||||
DevMsg(eDLL_T::SERVER, "Created SERVER VM: '0x%p'\n", Script_GetScriptHandle(SQCONTEXT::SERVER));
|
||||
else
|
||||
Error(eDLL_T::SERVER, EXIT_FAILURE, "Failed to create SERVER VM\n");
|
||||
return results;
|
||||
}
|
||||
#endif // !CLIENT_DLL
|
||||
|
||||
case SQCONTEXT::SERVER:
|
||||
g_pServerScript = s;
|
||||
Script_RegisterServerFunctions(s);
|
||||
break;
|
||||
#endif
|
||||
#ifndef DEDICATED
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Creates the CLIENT Squirrel VM
|
||||
// Input : *hlClient -
|
||||
// Output : True on success, false on failure
|
||||
//---------------------------------------------------------------------------------
|
||||
SQBool Script_CreateClientVM(CHLClient* hlclient)
|
||||
{
|
||||
SQBool results = v_Script_CreateClientVM(hlclient);
|
||||
if (results)
|
||||
DevMsg(eDLL_T::CLIENT, "Created CLIENT VM: '0x%p'\n", Script_GetScriptHandle(SQCONTEXT::CLIENT));
|
||||
else
|
||||
Error(eDLL_T::CLIENT, EXIT_FAILURE, "Failed to create CLIENT VM\n");
|
||||
return results;
|
||||
}
|
||||
case SQCONTEXT::CLIENT:
|
||||
g_pClientScript = s;
|
||||
Script_RegisterClientFunctions(s);
|
||||
break;
|
||||
case SQCONTEXT::UI:
|
||||
g_pUIScript = s;
|
||||
Script_RegisterUIFunctions(s);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Creates the UI Squirrel VM
|
||||
// Output : True on success, false on failure
|
||||
//---------------------------------------------------------------------------------
|
||||
SQBool Script_CreateUIVM()
|
||||
{
|
||||
SQBool results = v_Script_CreateUIVM();
|
||||
if (results)
|
||||
DevMsg(eDLL_T::UI, "Created UI VM: '0x%p'\n", Script_GetScriptHandle(SQCONTEXT::UI));
|
||||
else
|
||||
Error(eDLL_T::UI, EXIT_FAILURE, "Failed to create UI VM\n");
|
||||
return results;
|
||||
return true; // original func always returns true
|
||||
}
|
||||
#endif // !DEDICATED
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Returns the script VM pointer by context
|
||||
@ -231,13 +191,13 @@ CSquirrelVM* Script_GetScriptHandle(const SQCONTEXT context)
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
case SQCONTEXT::SERVER:
|
||||
return g_pServerScript.GetValue<CSquirrelVM*>();
|
||||
return g_pServerScript;
|
||||
#endif // !CLIENT_DLL
|
||||
#ifndef DEDICATED
|
||||
case SQCONTEXT::CLIENT:
|
||||
return g_pClientScript.GetValue<CSquirrelVM*>();
|
||||
return g_pClientScript;
|
||||
case SQCONTEXT::UI:
|
||||
return g_pUIScript.GetValue<CSquirrelVM*>();
|
||||
return g_pUIScript;
|
||||
#endif // !DEDICATED
|
||||
default:
|
||||
return nullptr;
|
||||
@ -277,7 +237,6 @@ SQInteger Script_LoadRson(const SQChar* rsonfile)
|
||||
//---------------------------------------------------------------------------------
|
||||
SQBool Script_LoadScript(HSQUIRRELVM v, const SQChar* path, const SQChar* name, SQInteger flags)
|
||||
{
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
return v_Script_LoadScript(v, path, name, flags);
|
||||
}
|
||||
|
||||
@ -332,17 +291,7 @@ void Script_Execute(const SQChar* code, const SQCONTEXT context)
|
||||
void VSquirrelVM::Attach() const
|
||||
{
|
||||
DetourAttach((LPVOID*)&v_Script_RegisterConstant, &Script_RegisterConstant);
|
||||
#ifndef DEDICATED
|
||||
DetourAttach((LPVOID*)&v_Script_InitializeCLGlobalStructs, &Script_InitializeCLGlobalStructs);
|
||||
#endif // !DEDICATED
|
||||
#ifndef CLIENT_DLL
|
||||
DetourAttach((LPVOID*)&v_Script_InitializeSVGlobalStructs, &Script_InitializeSVGlobalStructs);
|
||||
DetourAttach((LPVOID*)&v_Script_CreateServerVM, &Script_CreateServerVM);
|
||||
#endif // !CLIENT_DLL
|
||||
#ifndef DEDICATED
|
||||
DetourAttach((LPVOID*)&v_Script_CreateClientVM, &Script_CreateClientVM);
|
||||
DetourAttach((LPVOID*)&v_Script_CreateUIVM, &Script_CreateUIVM);
|
||||
#endif // !DEDICATED
|
||||
DetourAttach((LPVOID*)&v_CSquirrelVM_Init, &CSquirrelVM_Init);
|
||||
DetourAttach((LPVOID*)&v_Script_DestroySignalEntryListHead, &Script_DestroySignalEntryListHead);
|
||||
DetourAttach((LPVOID*)&v_Script_LoadRson, &Script_LoadRson);
|
||||
//DetourAttach((LPVOID*)&v_Script_LoadScript, &Script_LoadScript);
|
||||
@ -351,17 +300,7 @@ void VSquirrelVM::Attach() const
|
||||
void VSquirrelVM::Detach() const
|
||||
{
|
||||
DetourDetach((LPVOID*)&v_Script_RegisterConstant, &Script_RegisterConstant);
|
||||
#ifndef DEDICATED
|
||||
DetourDetach((LPVOID*)&v_Script_InitializeCLGlobalStructs, &Script_InitializeCLGlobalStructs);
|
||||
#endif // !DEDICATED
|
||||
#ifndef CLIENT_DLL
|
||||
DetourDetach((LPVOID*)&v_Script_InitializeSVGlobalStructs, &Script_InitializeSVGlobalStructs);
|
||||
DetourDetach((LPVOID*)&v_Script_CreateServerVM, &Script_CreateServerVM);
|
||||
#endif // !CLIENT_DLL
|
||||
#ifndef DEDICATED
|
||||
DetourDetach((LPVOID*)&v_Script_CreateClientVM, &Script_CreateClientVM);
|
||||
DetourDetach((LPVOID*)&v_Script_CreateUIVM, &Script_CreateUIVM);
|
||||
#endif // !DEDICATED
|
||||
DetourDetach((LPVOID*)&v_CSquirrelVM_Init, &CSquirrelVM_Init);
|
||||
DetourDetach((LPVOID*)&v_Script_DestroySignalEntryListHead, &Script_DestroySignalEntryListHead);
|
||||
DetourDetach((LPVOID*)&v_Script_LoadRson, &Script_LoadRson);
|
||||
//DetourDetach((LPVOID*)&v_Script_LoadScript, &Script_LoadScript);
|
||||
|
@ -78,32 +78,10 @@ inline auto v_Script_RegisterFunction = p_Script_RegisterFunction.RCast<SQRESULT
|
||||
|
||||
inline CMemory p_Script_RegisterConstant;
|
||||
inline auto v_Script_RegisterConstant = p_Script_RegisterConstant.RCast<SQRESULT(*)(CSquirrelVM* s, const SQChar* name, SQInteger value)>();
|
||||
#if !defined (CLIENT_DLL)
|
||||
inline CMemory p_Script_InitializeSVGlobalStructs;
|
||||
inline auto v_Script_InitializeSVGlobalStructs = p_Script_InitializeSVGlobalStructs.RCast<SQRESULT(*)(HSQUIRRELVM v)>();
|
||||
#endif // !CLIENT_DLL
|
||||
#if !defined (DEDICATED)
|
||||
inline CMemory p_Script_InitializeCLGlobalStructs;
|
||||
inline auto v_Script_InitializeCLGlobalStructs = p_Script_InitializeCLGlobalStructs.RCast<SQRESULT(*)(HSQUIRRELVM v, SQCONTEXT context)>();
|
||||
#endif // !DEDICATED
|
||||
#if !defined (CLIENT_DLL) && defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
|
||||
inline CMemory p_Script_CreateServerVM;
|
||||
inline auto v_Script_CreateServerVM = p_Script_CreateServerVM.RCast<SQBool(*)(void)>();
|
||||
#elif !defined (CLIENT_DLL) && defined (GAMEDLL_S3) || defined (GAMEDLL_S2)
|
||||
inline CMemory p_Script_CreateServerVM;
|
||||
inline auto v_Script_CreateServerVM = p_Script_CreateServerVM.RCast<SQBool(*)(void)>();
|
||||
#endif
|
||||
#if !defined (DEDICATED) && defined (GAMEDLL_S0) || defined (GAMEDLL_S1) || defined (GAMEDLL_S2)
|
||||
inline CMemory p_Script_CreateClientVM;
|
||||
inline auto v_Script_CreateClientVM = p_Script_CreateClientVM.RCast<SQBool(*)(CHLClient* hlclient)>();
|
||||
#elif !defined (DEDICATED) && defined (GAMEDLL_S3)
|
||||
inline CMemory p_Script_CreateClientVM;
|
||||
inline auto v_Script_CreateClientVM = p_Script_CreateClientVM.RCast<SQBool(*)(CHLClient* hlclient)>();
|
||||
#endif
|
||||
#if !defined (DEDICATED)
|
||||
inline CMemory p_Script_CreateUIVM;
|
||||
inline auto v_Script_CreateUIVM = p_Script_CreateUIVM.RCast<SQBool(*)(void)>();
|
||||
#endif // !DEDICATED
|
||||
|
||||
inline CMemory p_CSquirrelVM_Init;
|
||||
inline auto v_CSquirrelVM_Init = p_CSquirrelVM_Init.RCast<bool(__fastcall*)(CSquirrelVM * s, SQCONTEXT context, float curtime)>();
|
||||
|
||||
inline CMemory p_Script_DestroySignalEntryListHead;
|
||||
inline auto v_Script_DestroySignalEntryListHead = p_Script_DestroySignalEntryListHead.RCast<SQBool(*)(CSquirrelVM* s, HSQUIRRELVM v, SQFloat f)>();
|
||||
|
||||
@ -113,12 +91,13 @@ inline auto v_Script_LoadRson = p_Script_LoadRson.RCast<SQInteger(*)(const SQCha
|
||||
inline CMemory p_Script_LoadScript;
|
||||
inline auto v_Script_LoadScript = p_Script_LoadScript.RCast<SQBool(*)(HSQUIRRELVM v, const SQChar* path, const SQChar* name, SQInteger flags)>();
|
||||
|
||||
#if !defined (CLIENT_DLL)
|
||||
inline CMemory g_pServerScript;
|
||||
#ifndef CLIENT_DLL
|
||||
inline CSquirrelVM* g_pServerScript;
|
||||
#endif // !CLIENT_DLL
|
||||
#if !defined (DEDICATED)
|
||||
inline CMemory g_pClientScript;
|
||||
inline CMemory g_pUIScript;
|
||||
|
||||
#ifndef DEDICATED
|
||||
inline CSquirrelVM* g_pClientScript;
|
||||
inline CSquirrelVM* g_pUIScript;
|
||||
#endif // !DEDICATED
|
||||
|
||||
SQRESULT Script_RegisterConstant(CSquirrelVM* s, const SQChar* name, SQInteger value);
|
||||
@ -128,14 +107,6 @@ void Script_RegisterServerFunctions(CSquirrelVM* s);
|
||||
void Script_RegisterClientFunctions(CSquirrelVM* s);
|
||||
void Script_RegisterUIFunctions(CSquirrelVM* s);
|
||||
|
||||
SQRESULT Script_InitializeCLGlobalStructs(HSQUIRRELVM v, SQCONTEXT context);
|
||||
void Script_InitializeSVGlobalStructs(HSQUIRRELVM v);
|
||||
|
||||
SQBool Script_CreateServerVM();
|
||||
#ifndef DEDICATED
|
||||
SQBool Script_CreateClientVM(CHLClient* hlclient);
|
||||
#endif // !DEDICATED
|
||||
SQBool Script_CreateUIVM();
|
||||
CSquirrelVM* Script_GetScriptHandle(const SQCONTEXT context);
|
||||
|
||||
SQInteger Script_LoadRson(const SQChar* rsonfile);
|
||||
@ -150,53 +121,17 @@ class VSquirrelVM : public IDetour
|
||||
{
|
||||
LogFunAdr("Script_RegisterConstant", p_Script_RegisterConstant.GetPtr());
|
||||
LogFunAdr("Script_RegisterFunction", p_Script_RegisterFunction.GetPtr());
|
||||
#ifndef CLIENT_DLL
|
||||
LogFunAdr("Script_InitializeSVGlobalStructs", p_Script_InitializeSVGlobalStructs.GetPtr());
|
||||
#endif // !CLIENT_DLL
|
||||
#ifndef DEDICATED
|
||||
LogFunAdr("Script_InitializeCLGlobalStructs", p_Script_InitializeCLGlobalStructs.GetPtr());
|
||||
#endif // !DEDICATED
|
||||
#ifndef CLIENT_DLL
|
||||
LogFunAdr("Script_CreateServerVM", p_Script_CreateServerVM.GetPtr());
|
||||
#endif // !CLIENT_DLL
|
||||
#ifndef DEDICATED
|
||||
LogFunAdr("Script_CreateClientVM", p_Script_CreateClientVM.GetPtr());
|
||||
LogFunAdr("Script_CreateUIVM", p_Script_CreateUIVM.GetPtr());
|
||||
#endif // !DEDICATED
|
||||
LogFunAdr("Script_DestroySignalEntryListHead", p_Script_DestroySignalEntryListHead.GetPtr());
|
||||
LogFunAdr("Script_LoadRson", p_Script_LoadRson.GetPtr());
|
||||
LogFunAdr("Script_LoadScript", p_Script_LoadScript.GetPtr());
|
||||
#ifndef CLIENT_DLL
|
||||
LogVarAdr("g_pServerScript", g_pServerScript.GetPtr());
|
||||
#endif // !CLIENT_DLL
|
||||
#ifndef DEDICATED
|
||||
LogVarAdr("g_pClientScript", g_pClientScript.GetPtr());
|
||||
LogVarAdr("g_pUIScript", g_pUIScript.GetPtr());
|
||||
#endif // !DEDICATED
|
||||
}
|
||||
virtual void GetFun(void) const
|
||||
{
|
||||
p_Script_RegisterConstant = g_GameDll.FindPatternSIMD("48 89 5C 24 ?? 48 89 6C 24 ?? 48 89 74 24 ?? 57 48 83 EC 30 4C 8B");
|
||||
p_Script_RegisterFunction = g_GameDll.FindPatternSIMD("48 83 EC 38 45 0F B6 C8");
|
||||
#if !defined (CLIENT_DLL)
|
||||
p_Script_InitializeSVGlobalStructs = g_GameDll.FindPatternSIMD("48 89 74 24 ?? 57 48 83 EC 30 48 8B 3D ?? ?? ?? ?? 48 8B F1");
|
||||
#endif // !CLIENT_DLL
|
||||
#if !defined (DEDICATED)
|
||||
p_Script_InitializeCLGlobalStructs = g_GameDll.FindPatternSIMD("48 89 74 24 ?? 48 89 7C 24 ?? 41 56 48 83 EC 30 48 63 C2 48 8D 3D ?? ?? ?? ??");
|
||||
#endif // !DEDICATED
|
||||
#if !defined (CLIENT_DLL) && defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
|
||||
p_Script_CreateServerVM = g_GameDll.FindPatternSIMD("40 53 48 83 EC 50 48 8D 0D ?? ?? ?? ??");
|
||||
#elif !defined (CLIENT_DLL) && defined (GAMEDLL_S3) || defined (GAMEDLL_S2)
|
||||
p_Script_CreateServerVM = g_GameDll.FindPatternSIMD("40 53 56 48 83 EC 48 48 8D 0D ?? ?? ?? ??");
|
||||
#endif
|
||||
#if !defined (DEDICATED) && defined (GAMEDLL_S0) || defined (GAMEDLL_S1) || defined (GAMEDLL_S2)
|
||||
p_Script_CreateClientVM = g_GameDll.FindPatternSIMD("48 83 EC 58 48 83 3D ?? ?? ?? ?? ?? 74 05");
|
||||
#elif !defined (DEDICATED) && defined (GAMEDLL_S3)
|
||||
p_Script_CreateClientVM = g_GameDll.FindPatternSIMD("40 53 41 57 48 83 EC 68 48 83 3D ?? ?? ?? ?? ??");
|
||||
#endif
|
||||
#if !defined (DEDICATED)
|
||||
p_Script_CreateUIVM = g_GameDll.FindPatternSIMD("40 53 48 83 EC 20 48 8B 1D ?? ?? ?? ?? C6 05 ?? ?? ?? ?? ??");
|
||||
#endif // !DEDICATED
|
||||
|
||||
p_CSquirrelVM_Init = g_GameDll.FindPatternSIMD("E8 ? ? ? ? 0F 28 74 24 ? 48 89 1D ? ? ? ?").FollowNearCallSelf();
|
||||
|
||||
p_Script_DestroySignalEntryListHead = g_GameDll.FindPatternSIMD("48 89 5C 24 ?? 48 89 6C 24 ?? 56 57 41 56 48 83 EC 50 44 8B 42");
|
||||
p_Script_LoadRson = g_GameDll.FindPatternSIMD("4C 8B DC 49 89 5B 08 57 48 81 EC A0 ?? ?? ?? 33");
|
||||
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
|
||||
@ -206,32 +141,14 @@ class VSquirrelVM : public IDetour
|
||||
#endif
|
||||
v_Script_RegisterConstant = p_Script_RegisterConstant.RCast<SQRESULT(*)(CSquirrelVM*, const SQChar*, SQInteger)>(); /*48 89 5C 24 ?? 48 89 6C 24 ?? 48 89 74 24 ?? 57 48 83 EC 30 4C 8B*/
|
||||
v_Script_RegisterFunction = p_Script_RegisterFunction.RCast<SQRESULT(*)(CSquirrelVM*, ScriptFunctionBinding_t*, SQInteger)>(); /*48 83 EC 38 45 0F B6 C8*/
|
||||
#if !defined (CLIENT_DLL)
|
||||
v_Script_InitializeSVGlobalStructs = p_Script_InitializeSVGlobalStructs.RCast<SQRESULT(*)(HSQUIRRELVM)>(); /*48 89 74 24 ?? 57 48 83 EC 30 48 8B 3D ?? ?? ?? ?? 48 8B F1*/
|
||||
#endif // !CLIENT_DLL
|
||||
#if !defined (DEDICATED)
|
||||
v_Script_InitializeCLGlobalStructs = p_Script_InitializeCLGlobalStructs.RCast<SQRESULT(*)(HSQUIRRELVM, SQCONTEXT)>(); /*48 89 74 24 ?? 48 89 7C 24 ?? 41 56 48 83 EC 30 48 63 C2 48 8D 3D ?? ?? ?? ??*/
|
||||
#endif // !DEDICATED
|
||||
#if !defined (CLIENT_DLL)
|
||||
v_Script_CreateServerVM = p_Script_CreateServerVM.RCast<SQBool(*)(void)>(); /*40 53 56 48 83 EC 48 48 8D 0D ?? ?? ?? ??*/
|
||||
#endif // !CLIENT_DLL
|
||||
#if !defined (DEDICATED)
|
||||
v_Script_CreateClientVM = p_Script_CreateClientVM.RCast<SQBool(*)(CHLClient*)>(); /*40 53 41 57 48 83 EC 68 48 83 3D ?? ?? ?? ?? ??*/
|
||||
v_Script_CreateUIVM = p_Script_CreateUIVM.RCast<SQBool(*)(void)>(); /*40 53 48 83 EC 20 48 8B 1D ?? ?? ?? ?? C6 05 ?? ?? ?? ?? ??*/
|
||||
#endif // !DEDICATED
|
||||
|
||||
v_CSquirrelVM_Init = p_CSquirrelVM_Init.RCast<bool(__fastcall*)(CSquirrelVM* s, SQCONTEXT context, float curtime)>();
|
||||
v_Script_DestroySignalEntryListHead = p_Script_DestroySignalEntryListHead.RCast<SQBool(*)(CSquirrelVM*, HSQUIRRELVM, SQFloat)>();/*48 89 5C 24 ?? 48 89 6C 24 ?? 56 57 41 56 48 83 EC 50 44 8B 42*/
|
||||
v_Script_LoadRson = p_Script_LoadRson.RCast<SQInteger(*)(const SQChar*)>(); /*4C 8B DC 49 89 5B 08 57 48 81 EC A0 00 00 00 33*/
|
||||
v_Script_LoadScript = p_Script_LoadScript.RCast<SQBool(*)(HSQUIRRELVM, const SQChar*, const SQChar*, SQInteger)>(); /*48 8B C4 48 89 48 08 55 41 56 48 8D 68*/
|
||||
}
|
||||
virtual void GetVar(void) const
|
||||
{
|
||||
#if !defined (CLIENT_DLL)
|
||||
g_pServerScript = p_Script_CreateServerVM.FindPatternSelf("48 89 1D", CMemory::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x3, 0x7);
|
||||
#endif // !CLIENT_DLL
|
||||
#if !defined (DEDICATED)
|
||||
g_pClientScript = p_Script_CreateClientVM.FindPatternSelf("48 83 3D", CMemory::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x3, 0x8);
|
||||
g_pUIScript = p_Script_CreateUIVM.FindPatternSelf("48 8B 1D", CMemory::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x3, 0x7);
|
||||
#endif // !DEDICATED
|
||||
}
|
||||
virtual void GetCon(void) const { }
|
||||
virtual void Attach(void) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user