mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Set the persistence fields to 'ready' in 'CClient::ActivatePlayer', before executing the rest of the function. Previously, it was set in 'CVEngineServer::PersistenceAvailable', but this is too late. The function 'FairFight_Init' was actually 'CClient::ActivatePlayer', and thus it has been moved to the correct file, and the old file defining it previously has been removed.
32 lines
1.2 KiB
C++
32 lines
1.2 KiB
C++
//=============================================================================//
|
|
//
|
|
// Purpose: Interface the engine exposes to the game DLL
|
|
//
|
|
//=============================================================================//
|
|
|
|
#include "vengineserver_impl.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose: sets the persistence var in the CClient instance to 'ready'
|
|
//-----------------------------------------------------------------------------
|
|
bool CVEngineServer::PersistenceAvailable(void* entidx, int clientidx)
|
|
{
|
|
///////////////////////////////////////////////////////////////////////////
|
|
return IVEngineServer__PersistenceAvailable(entidx, clientidx);
|
|
}
|
|
|
|
void HVEngineServer::Attach() const
|
|
{
|
|
DetourAttach(&IVEngineServer__PersistenceAvailable, &CVEngineServer::PersistenceAvailable);
|
|
}
|
|
|
|
void HVEngineServer::Detach() const
|
|
{
|
|
DetourDetach(&IVEngineServer__PersistenceAvailable, &CVEngineServer::PersistenceAvailable);
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
ServerPlayer_t g_ServerPlayer[MAX_PLAYERS];
|
|
|
|
IVEngineServer* g_pEngineServerVFTable = nullptr;
|
|
CVEngineServer* g_pEngineServer = reinterpret_cast<CVEngineServer*>(&g_pEngineServerVFTable); |