2021-12-25 22:36:38 +01:00
|
|
|
//=============================================================================//
|
|
|
|
//
|
|
|
|
// Purpose: Interface the engine exposes to the game DLL
|
|
|
|
//
|
|
|
|
//=============================================================================//
|
|
|
|
|
|
|
|
#include "core/stdafx.h"
|
2022-04-02 12:27:35 +02:00
|
|
|
#include "client/vengineclient_impl.h"
|
2021-12-25 22:36:38 +01:00
|
|
|
|
|
|
|
//#ifdef GAMEDLL_S3
|
2022-04-18 03:35:08 +02:00
|
|
|
bool* m_bRestrictServerCommands = nullptr;
|
2022-05-06 00:34:46 +02:00
|
|
|
bool* m_bRestrictClientCommands = nullptr;
|
2021-12-25 22:36:38 +01:00
|
|
|
//#endif
|
2022-05-06 00:34:46 +02:00
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------
|
|
|
|
// 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
|
|
|
|
//---------------------------------------------------------------------------------
|
2022-05-07 12:28:58 +02:00
|
|
|
bool CEngineClient::GetRestrictServerCommands() const
|
2022-05-06 00:34:46 +02:00
|
|
|
{
|
|
|
|
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
|
|
|
|
//---------------------------------------------------------------------------------
|
2022-05-07 12:28:58 +02:00
|
|
|
bool CEngineClient::GetRestrictClientCommands() const
|
2022-05-06 00:34:46 +02:00
|
|
|
{
|
|
|
|
return *m_bRestrictClientCommands;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------
|
|
|
|
// Purpose: get local player
|
|
|
|
// Input :
|
|
|
|
// Output : void* (C_Player)
|
|
|
|
//---------------------------------------------------------------------------------
|
2022-05-13 14:53:25 +02:00
|
|
|
void* CEngineClient::GetLocalPlayer() const
|
2022-05-06 00:34:46 +02:00
|
|
|
{
|
|
|
|
return CEngineClient_GetLocalPlayer();
|
|
|
|
}
|