mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix CBaseClientState pointer vars.
This commit is contained in:
parent
a479b4ac78
commit
51ace16074
@ -15,7 +15,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
bool CBaseClientState::IsPaused()
|
||||
{
|
||||
return *m_bPaused;
|
||||
return **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)**host_tickcount * (float)*client_debugdraw_int_unk;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -39,7 +39,7 @@ float CBaseClientState::GetClientTime()
|
||||
//------------------------------------------------------------------------------
|
||||
int CBaseClientState::GetClientTickCount() const
|
||||
{
|
||||
return *host_tickcount;
|
||||
return **host_tickcount;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -47,7 +47,7 @@ int CBaseClientState::GetClientTickCount() const
|
||||
//------------------------------------------------------------------------------
|
||||
void CBaseClientState::SetClientTickCount(int tick)
|
||||
{
|
||||
*host_tickcount = tick;
|
||||
**host_tickcount = tick;
|
||||
}
|
||||
|
||||
CBaseClientState* g_pBaseClientState = new CBaseClientState();
|
||||
|
@ -8,8 +8,8 @@ inline int* cl_host_tickcount = nullptr;
|
||||
class CBaseClientState
|
||||
{
|
||||
public:
|
||||
bool* m_bPaused = cl_m_bPaused; // pauzes the client side simulation in apex.
|
||||
int* host_tickcount = cl_host_tickcount; // client simulation tick count.
|
||||
bool** m_bPaused = &cl_m_bPaused; // pauzes the client side simulation in apex.
|
||||
int** host_tickcount = &cl_host_tickcount; // client simulation tick count.
|
||||
|
||||
bool IsPaused();
|
||||
float GetClientTime();
|
||||
@ -61,6 +61,8 @@ class HClientState : public IDetour
|
||||
.FindPatternSelf("80 3D ? ? ? 01 ?", CMemory::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x2, 0x7).RCast<bool*>();
|
||||
cl_host_tickcount = localRef.Offset(0xC0)
|
||||
.FindPatternSelf("66 0F 6E", CMemory::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x4, 0x8).RCast<int*>();
|
||||
|
||||
bool test = g_pBaseClientState->IsPaused();
|
||||
#endif
|
||||
}
|
||||
virtual void GetCon(void) const { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user