2022-04-13 01:25:33 +02:00
|
|
|
//=============================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//=============================================================================
|
|
|
|
|
2021-12-25 22:36:38 +01:00
|
|
|
#include "core/stdafx.h"
|
|
|
|
/*****************************************************************************/
|
2022-04-09 16:16:40 +02:00
|
|
|
#include "tier1/cvar.h"
|
2022-01-10 02:47:19 +01:00
|
|
|
#include "tier0/commandline.h"
|
2021-12-25 22:36:38 +01:00
|
|
|
#include "engine/net_chan.h"
|
2022-05-20 11:52:19 +02:00
|
|
|
#include "engine/client/cl_rcon.h"
|
2022-08-09 17:34:10 +02:00
|
|
|
#include "networksystem/bansystem.h"
|
2021-12-25 22:36:38 +01:00
|
|
|
#include "vpc/keyvalues.h"
|
2023-09-12 11:06:16 +02:00
|
|
|
#include "windows/id3dx.h"
|
|
|
|
#include "geforce/reflex.h"
|
2023-05-10 00:05:38 +02:00
|
|
|
#include "vengineclient_impl.h"
|
|
|
|
#include "cdll_engine_int.h"
|
2021-12-25 22:36:38 +01:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2023-01-26 02:59:50 +01:00
|
|
|
#ifndef DEDICATED
|
2021-12-25 22:36:38 +01:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//-----------------------------------------------------------------------------
|
2022-04-13 01:25:33 +02:00
|
|
|
void CHLClient::FrameStageNotify(CHLClient* pHLClient, ClientFrameStage_t frameStage)
|
2021-12-25 22:36:38 +01:00
|
|
|
{
|
2023-09-12 11:06:16 +02:00
|
|
|
// Must be performed before the call, before scene starts rendering.
|
|
|
|
if (frameStage == ClientFrameStage_t::FRAME_RENDER_START)
|
|
|
|
GFX_SetLatencyMarker(D3D11Device(), RENDERSUBMIT_START);
|
|
|
|
|
2022-04-13 01:25:33 +02:00
|
|
|
CHLClient_FrameStageNotify(pHLClient, frameStage);
|
2023-09-12 11:06:16 +02:00
|
|
|
|
|
|
|
// Must be performed after the call, after the scene has been rendered.
|
|
|
|
if (frameStage == ClientFrameStage_t::FRAME_RENDER_END)
|
|
|
|
GFX_SetLatencyMarker(D3D11Device(), RENDERSUBMIT_END);
|
2021-12-25 22:36:38 +01:00
|
|
|
}
|
|
|
|
|
2022-05-02 23:53:26 +02:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Purpose: Get g_pClientClassHead Pointer for all ClientClasses.
|
|
|
|
// Input :
|
|
|
|
// Output : ClientClass*
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
ClientClass* CHLClient::GetAllClasses()
|
|
|
|
{
|
|
|
|
return CHLClient_GetAllClasses();
|
|
|
|
}
|
2023-01-26 02:59:50 +01:00
|
|
|
#endif // !DEDICATED
|
2022-05-02 23:53:26 +02:00
|
|
|
|
2021-12-25 22:36:38 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2023-01-25 02:26:52 +01:00
|
|
|
void VDll_Engine_Int::Attach() const
|
2021-12-25 22:36:38 +01:00
|
|
|
{
|
2023-01-25 02:26:52 +01:00
|
|
|
#ifndef DEDICATED
|
|
|
|
DetourAttach((LPVOID*)&CHLClient_FrameStageNotify, &CHLClient::FrameStageNotify);
|
|
|
|
#endif // !DEDICATED
|
2021-12-25 22:36:38 +01:00
|
|
|
}
|
|
|
|
|
2023-01-25 02:26:52 +01:00
|
|
|
void VDll_Engine_Int::Detach() const
|
2021-12-25 22:36:38 +01:00
|
|
|
{
|
2023-01-25 02:26:52 +01:00
|
|
|
#ifndef DEDICATED
|
|
|
|
DetourDetach((LPVOID*)&CHLClient_FrameStageNotify, &CHLClient::FrameStageNotify);
|
|
|
|
#endif // !DEDICATED
|
2021-12-25 22:36:38 +01:00
|
|
|
}
|