r5sdk/r5dev/client/vengineclient_impl.cpp
PixieCore 66d122e192 Start of CEngineClient implementation.
* Rebuild SetRestrictedServerCommand and SetRestrictedClientCommands
* Implemented new CMemory Function to walk through a VTable.
* pDetours->GetCon() gets called first now.
*
2022-05-06 00:34:46 +02:00

64 lines
2.2 KiB
C++

//=============================================================================//
//
// Purpose: Interface the engine exposes to the game DLL
//
//=============================================================================//
#include "core/stdafx.h"
#include "client/vengineclient_impl.h"
//#ifdef GAMEDLL_S3
bool* m_bRestrictServerCommands = nullptr;
bool* m_bRestrictClientCommands = nullptr;
//#endif
//---------------------------------------------------------------------------------
// Purpose: define if commands from the server should be restricted or not.
// Input : bRestricted -
// Output :
//---------------------------------------------------------------------------------
void CEngineClient::SetRestrictServerCommands(bool bRestricted)
{
*m_bRestrictServerCommands = bRestricted;
}
//---------------------------------------------------------------------------------
// Purpose: get value for if commands are restricted from servers.
// Input :
// Output : bool
//---------------------------------------------------------------------------------
bool CEngineClient::GetRestrictServerCommands()
{
return *m_bRestrictServerCommands;
}
//---------------------------------------------------------------------------------
// Purpose: define if commands on the client should be restricted or not.
// Input : bRestricted -
// Output :
//---------------------------------------------------------------------------------
void CEngineClient::SetRestrictClientCommands(bool bRestricted)
{
*m_bRestrictClientCommands = bRestricted;
}
//---------------------------------------------------------------------------------
// Purpose: get value for if commands are restricted for clients.
// Input :
// Output : bool
//---------------------------------------------------------------------------------
bool CEngineClient::GetRestrictClientCommands()
{
return *m_bRestrictClientCommands;
}
//---------------------------------------------------------------------------------
// Purpose: get local player
// Input :
// Output : void* (C_Player)
//---------------------------------------------------------------------------------
void* CEngineClient::GetLocalPlayer()
{
return CEngineClient_GetLocalPlayer();
}