mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Client: get actual client entity list object
This commit is contained in:
parent
6782cdc73b
commit
06ca0479b8
@ -147,6 +147,7 @@
|
||||
#include "game/client/input.h"
|
||||
#include "game/client/movehelper_client.h"
|
||||
#include "game/client/vscript_client.h"
|
||||
#include "game/client/cliententitylist.h"
|
||||
#endif // !DEDICATED
|
||||
#include "public/edict.h"
|
||||
#ifndef DEDICATED
|
||||
@ -678,6 +679,7 @@ void DetourRegister() // Register detour classes to be searched and hooked.
|
||||
REGISTER(V_ViewRender);
|
||||
REGISTER(VInput);
|
||||
REGISTER(VMoveHelperClient);
|
||||
REGISTER(VClientEntityList);
|
||||
#endif // !DEDICATED
|
||||
|
||||
// Public
|
||||
|
@ -4,4 +4,4 @@
|
||||
// Purpose: a global list of all the entities in the game. All iteration through
|
||||
// entities is done through this object.
|
||||
//-----------------------------------------------------------------------------
|
||||
CClientEntityList* g_clientEntityList = nullptr; // todo(amos): obtain game object.
|
||||
CClientEntityList* g_clientEntityList = nullptr;
|
||||
|
@ -62,4 +62,27 @@ COMPILE_TIME_ASSERT(sizeof(CClientEntityList) == 0x3800C0);
|
||||
|
||||
inline IClientEntityList* g_pClientEntityList = nullptr;
|
||||
|
||||
extern CClientEntityList* g_clientEntityList;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int HSys_Error_Internal(char* fmt, va_list args);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class VClientEntityList : public IDetour
|
||||
{
|
||||
virtual void GetAdr(void) const
|
||||
{
|
||||
LogVarAdr("g_clientEntityList", g_clientEntityList);
|
||||
}
|
||||
virtual void GetFun(void) const { }
|
||||
virtual void GetVar(void) const
|
||||
{
|
||||
g_GameDll.FindPatternSIMD("48 8D 0D ?? ?? ?? ?? 48 8D 05 ?? ?? ?? ?? 44 89 0D").
|
||||
ResolveRelativeAddressSelf(3, 7).ResolveRelativeAddressSelf(3, 7).GetPtr(g_clientEntityList);
|
||||
}
|
||||
virtual void GetCon(void) const { }
|
||||
virtual void Detour(const bool bAttach) const { };
|
||||
};
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // CLIENTENTITYLIST_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user