mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
36 lines
1.3 KiB
C++
36 lines
1.3 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
|
|
{
|
|
LogConAdr("CEngineClient::`vftable'", g_pEngineClientVFTable.GetPtr());
|
|
}
|
|
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 { }
|
|
};
|
|
///////////////////////////////////////////////////////////////////////////////
|