mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* Fix all compiler error for GameSDK on S0 and S1. * Remove some unused patterns and globals (launch performance gains of 100ms). * Remove most duplicate patterns. * Relocate globals from engine to a more appropriate location. * Renamed some unknown vars to a more appropriate name (most of these where obtained a while back, but as we reversed more parts of the engine, some of these vars become known). * Renamed some vars to fit the naming convention used in the SDK. * Fixed pattern debug logging using the wrong pointer, thus displaying the wrong address.
38 lines
1.4 KiB
C++
38 lines
1.4 KiB
C++
#pragma once
|
|
|
|
class CEngineClient
|
|
{
|
|
public:
|
|
void SetRestrictServerCommands(bool bRestrict);
|
|
bool GetRestrictServerCommands() const;
|
|
void SetRestrictClientCommands(bool bRestrict);
|
|
bool GetRestrictClientCommands() const;
|
|
int GetLocalPlayer(); // Local player index.
|
|
};
|
|
|
|
/* ==== CVENGINECLIENT ================================================================================================================================================== */
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
inline CMemory g_pEngineClientVFTable = nullptr;
|
|
inline CEngineClient* g_pEngineClient = nullptr;
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
class HVEngineClient : public IDetour
|
|
{
|
|
virtual void GetAdr(void) const
|
|
{
|
|
spdlog::debug("| CON: g_pEngineClientVFTable : {:#18x} |\n", g_pEngineClientVFTable.GetPtr());
|
|
spdlog::debug("+----------------------------------------------------------------+\n");
|
|
}
|
|
virtual void GetFun(void) const { }
|
|
virtual void GetVar(void) const { }
|
|
virtual void GetCon(void) const
|
|
{
|
|
g_pEngineClientVFTable = g_GameDll.GetVirtualMethodTable(".?AVCEngineClient@@");
|
|
g_pEngineClient = g_pEngineClientVFTable.RCast<CEngineClient*>();
|
|
}
|
|
virtual void Attach(void) const { }
|
|
virtual void Detach(void) const { }
|
|
};
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
REGISTER(HVEngineClient); |