mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Getting games CBaseClientState now.
This commit is contained in:
parent
116d66f241
commit
8acc208e61
@ -52,7 +52,6 @@ bool CEngineClient::GetRestrictClientCommands() const
|
||||
return *m_bRestrictClientCommands;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: get local player
|
||||
// Input :
|
||||
|
@ -29,7 +29,7 @@ class HVEngineClient : public IDetour
|
||||
{
|
||||
virtual void GetAdr(void) const
|
||||
{
|
||||
std::cout << "| FUN: IVEngineClient::CommandExecute : 0x" << std::hex << std::uppercase << p_CEngineClient_CommandExecute.GetPtr() << std::setw(nPad) << " |" << std::endl;
|
||||
std::cout << "| FUN: IVEngineClient::CommandExecute : 0x" << std::hex << std::uppercase << p_CEngineClient_CommandExecute.GetPtr() << std::setw(nPad) << " |" << std::endl;
|
||||
std::cout << "| VAR: m_bRestrictServerCommands : 0x" << std::hex << std::uppercase << m_bRestrictServerCommands << std::setw(0) << " |" << std::endl;
|
||||
std::cout << "| VAR: m_bRestrictClientCommands : 0x" << std::hex << std::uppercase << m_bRestrictClientCommands << std::setw(0) << " |" << std::endl;
|
||||
std::cout << "| CON: g_ppEngineClient : 0x" << std::hex << std::uppercase << g_ppEngineClient << std::setw(0) << " |" << std::endl;
|
||||
|
@ -15,7 +15,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
bool CBaseClientState::IsPaused()
|
||||
{
|
||||
return **m_bPaused;
|
||||
return *cl_m_bPaused;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -26,7 +26,7 @@ float CBaseClientState::GetClientTime()
|
||||
{
|
||||
if (*cl_time_use_host_tickcount)
|
||||
{
|
||||
return (float)(int)**host_tickcount * (float)*client_debugdraw_int_unk;
|
||||
return (float)(int)*cl_host_tickcount * (float)*client_debugdraw_int_unk;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -39,7 +39,7 @@ float CBaseClientState::GetClientTime()
|
||||
//------------------------------------------------------------------------------
|
||||
int CBaseClientState::GetClientTickCount() const
|
||||
{
|
||||
return **host_tickcount;
|
||||
return *cl_host_tickcount;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -47,7 +47,7 @@ int CBaseClientState::GetClientTickCount() const
|
||||
//------------------------------------------------------------------------------
|
||||
void CBaseClientState::SetClientTickCount(int tick)
|
||||
{
|
||||
**host_tickcount = tick;
|
||||
*cl_host_tickcount = tick;
|
||||
}
|
||||
|
||||
CBaseClientState* g_pBaseClientState = new CBaseClientState();
|
||||
CBaseClientState* g_pBaseClientState = nullptr;
|
||||
|
@ -8,9 +8,6 @@ inline int* cl_host_tickcount = nullptr;
|
||||
class CBaseClientState
|
||||
{
|
||||
public:
|
||||
bool** m_bPaused = &cl_m_bPaused; // pauses the client side simulation in apex.
|
||||
int** host_tickcount = &cl_host_tickcount; // client simulation tick count.
|
||||
|
||||
bool IsPaused();
|
||||
float GetClientTime();
|
||||
int GetClientTickCount() const; // Get the client tick count.
|
||||
@ -63,7 +60,10 @@ class HClientState : public IDetour
|
||||
.FindPatternSelf("66 0F 6E", CMemory::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x4, 0x8).RCast<int*>();
|
||||
#endif
|
||||
}
|
||||
virtual void GetCon(void) const { }
|
||||
virtual void GetCon(void) const
|
||||
{
|
||||
g_pBaseClientState = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x0F\x84\x00\x00\x00\x00\x48\x8D\x0D\x00\x00\x00\x00\x48\x83\xC4\x28"), "xx????xxx????xxxx").FindPatternSelf("48 8D").ResolveRelativeAddressSelf(0x3, 0x7).RCast<CBaseClientState*>(); /*0F 84 ? ? ? ? 48 8D 0D ? ? ? ? 48 83 C4 28*/
|
||||
}
|
||||
virtual void Attach(void) const { }
|
||||
virtual void Detach(void) const { }
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user