mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
CClientEntityList reversal
Slightly reversed CClientEntityList while looking around its singleton.
This commit is contained in:
parent
82c914c2fd
commit
dcf05a0adf
@ -62,9 +62,6 @@ inline auto CHLClient_GetAllClasses = p_CHLClient_GetAllClasses.RCast<ClientClas
|
||||
|
||||
inline CHLClient** gHLClient = nullptr;
|
||||
inline CHLClient** g_pHLClient = nullptr;
|
||||
#ifndef DEDICATED
|
||||
inline IClientEntityList* g_pClientEntityList = nullptr;
|
||||
#endif // !DEDICATED
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void CHLClient_Attach();
|
||||
|
@ -42,10 +42,4 @@ class C_Player : public C_BaseCombatCharacter, public C_BaseAnimatingOverlay
|
||||
|
||||
};
|
||||
|
||||
|
||||
void F()
|
||||
{
|
||||
sizeof(C_Player);
|
||||
}
|
||||
|
||||
#endif // C_BASEPLAYER_H
|
||||
|
55
r5dev/game/client/cliententitylist.h
Normal file
55
r5dev/game/client/cliententitylist.h
Normal file
@ -0,0 +1,55 @@
|
||||
//===== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ======//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
// $NoKeywords: $
|
||||
//===========================================================================//
|
||||
#if !defined( CLIENTENTITYLIST_H )
|
||||
#define CLIENTENTITYLIST_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
#include "public/icliententitylist.h"
|
||||
#include "tier1/utlvector.h"
|
||||
#include "c_baseplayer.h"
|
||||
|
||||
// Implement this class and register with entlist to receive entity create/delete notification
|
||||
class IClientEntityListener
|
||||
{
|
||||
public:
|
||||
virtual void OnEntityCreated(C_BaseEntity* pEntity) {};
|
||||
virtual void OnEntityDeleted(C_BaseEntity* pEntity) {};
|
||||
};
|
||||
|
||||
class CClientEntityList : public IClientEntityList
|
||||
{
|
||||
class CPVSNotifyInfo // !TODO: confirm this!!
|
||||
{
|
||||
public:
|
||||
//IPVSNotify* m_pNotify;
|
||||
IClientRenderable* m_pRenderable;
|
||||
unsigned char m_InPVSStatus; // Combination of the INPVS_ flags.
|
||||
unsigned short m_PVSNotifiersLink; // Into m_PVSNotifyInfos.
|
||||
};
|
||||
|
||||
CUtlVector<IClientEntityListener*> m_entityListeners;
|
||||
|
||||
int m_iNumServerEnts; // Current count
|
||||
int m_iMaxServerEnts; // Max allowed
|
||||
int m_iNumClientNonNetworkable; // Non networkable count
|
||||
int m_iMaxUsedServerIndex; // Current last used slot
|
||||
|
||||
// !TODO:
|
||||
/*
|
||||
// This holds fast lookups for special edicts.
|
||||
EntityCacheInfo_t m_EntityCacheInfo[NUM_ENT_ENTRIES];
|
||||
|
||||
// For fast iteration.
|
||||
CUtlLinkedList<C_BaseEntity*, unsigned short> m_BaseEntities;*/
|
||||
};
|
||||
|
||||
inline CClientEntityList* g_pClientEntityList = nullptr;
|
||||
|
||||
#endif // CLIENTENTITYLIST_H
|
20
r5dev/game/shared/util_shared.cpp
Normal file
20
r5dev/game/shared/util_shared.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
//===== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ======//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//===========================================================================//
|
||||
#include "core/stdafx.h"
|
||||
#include "util_shared.h"
|
||||
#ifndef CLIENT_DLL
|
||||
#include "game/server/player.h"
|
||||
#include "game/server/gameinterface.h"
|
||||
#endif // !CLIENT_DLL
|
||||
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
|
||||
CPlayer* UTIL_PlayerByIndex(int nIndex)
|
||||
{
|
||||
|
||||
}
|
||||
#endif // CLIENT_DLL
|
0
r5dev/game/shared/util_shared.h
Normal file
0
r5dev/game/shared/util_shared.h
Normal file
@ -27,6 +27,7 @@
|
||||
#include "game/server/gameinterface.h"
|
||||
#endif // !CLIENT_DLL
|
||||
#ifndef DEDICATED
|
||||
#include "game/client/cliententitylist.h"
|
||||
#include "gameui/IConsole.h"
|
||||
#endif // !DEDICATED
|
||||
|
||||
@ -82,7 +83,7 @@ bool CModAppSystemGroup::Create(CModAppSystemGroup* pModAppSystemGroup)
|
||||
#endif // !CLIENT_DLL
|
||||
|
||||
#ifndef DEDICATED
|
||||
g_pClientEntityList = g_pFactory->GetFactoryPtr(VCLIENTENTITYLIST_INTERFACE_VERSION, false).RCast<IClientEntityList*>();
|
||||
g_pClientEntityList = g_pFactory->GetFactoryPtr(VCLIENTENTITYLIST_INTERFACE_VERSION, false).RCast<CClientEntityList*>();
|
||||
g_pEngineTrace = g_pFactory->GetFactoryPtr(INTERFACEVERSION_ENGINETRACE_CLIENT, false).RCast<CEngineTrace*>();
|
||||
|
||||
g_pImGuiConfig->Load(); // Load ImGui configs.
|
||||
|
@ -66,6 +66,7 @@
|
||||
<ClCompile Include="..\game\shared\animation.cpp" />
|
||||
<ClCompile Include="..\game\shared\collisionproperty.cpp" />
|
||||
<ClCompile Include="..\game\shared\entitylist_base.cpp" />
|
||||
<ClCompile Include="..\game\shared\util_shared.cpp" />
|
||||
<ClCompile Include="..\inputsystem\inputsystem.cpp" />
|
||||
<ClCompile Include="..\launcher\IApplication.cpp" />
|
||||
<ClCompile Include="..\launcher\launcher.cpp" />
|
||||
@ -228,6 +229,7 @@
|
||||
<ClInclude Include="..\filesystem\filesystem.h" />
|
||||
<ClInclude Include="..\gameui\IConsole.h" />
|
||||
<ClInclude Include="..\gameui\IBrowser.h" />
|
||||
<ClInclude Include="..\game\client\cliententitylist.h" />
|
||||
<ClInclude Include="..\game\client\c_baseentity.h" />
|
||||
<ClInclude Include="..\game\client\c_baseplayer.h" />
|
||||
<ClInclude Include="..\game\client\enginesprite.h" />
|
||||
@ -245,6 +247,7 @@
|
||||
<ClInclude Include="..\game\shared\shared_classnames.h" />
|
||||
<ClInclude Include="..\game\shared\takedamageinfo.h" />
|
||||
<ClInclude Include="..\game\shared\usercmd.h" />
|
||||
<ClInclude Include="..\game\shared\util_shared.h" />
|
||||
<ClInclude Include="..\inputsystem\ButtonCode.h" />
|
||||
<ClInclude Include="..\inputsystem\inputsystem.h" />
|
||||
<ClInclude Include="..\launcher\IApplication.h" />
|
||||
|
@ -663,6 +663,9 @@
|
||||
<ClCompile Include="..\game\client\movehelper_client.cpp">
|
||||
<Filter>sdk\game\client</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\game\shared\util_shared.cpp">
|
||||
<Filter>sdk\game\shared</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\client\cdll_engine_int.h">
|
||||
@ -1943,6 +1946,12 @@
|
||||
<ClInclude Include="..\game\client\movehelper_client.h">
|
||||
<Filter>sdk\game\client</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\game\shared\util_shared.h">
|
||||
<Filter>sdk\game\shared</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\game\client\cliententitylist.h">
|
||||
<Filter>sdk\game\client</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\shared\resource\lockedserver.png">
|
||||
|
@ -201,6 +201,7 @@
|
||||
<ClInclude Include="..\game\shared\shared_classnames.h" />
|
||||
<ClInclude Include="..\game\shared\takedamageinfo.h" />
|
||||
<ClInclude Include="..\game\shared\usercmd.h" />
|
||||
<ClInclude Include="..\game\shared\util_shared.h" />
|
||||
<ClInclude Include="..\launcher\IApplication.h" />
|
||||
<ClInclude Include="..\launcher\launcher.h" />
|
||||
<ClInclude Include="..\launcher\prx.h" />
|
||||
@ -562,6 +563,7 @@
|
||||
<ClCompile Include="..\game\shared\animation.cpp" />
|
||||
<ClCompile Include="..\game\shared\collisionproperty.cpp" />
|
||||
<ClCompile Include="..\game\shared\entitylist_base.cpp" />
|
||||
<ClCompile Include="..\game\shared\util_shared.cpp" />
|
||||
<ClCompile Include="..\launcher\IApplication.cpp" />
|
||||
<ClCompile Include="..\launcher\launcher.cpp" />
|
||||
<ClCompile Include="..\launcher\prx.cpp" />
|
||||
|
@ -1374,6 +1374,9 @@
|
||||
<ClInclude Include="..\game\server\physics_main.h">
|
||||
<Filter>sdk\game\server</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\game\shared\util_shared.h">
|
||||
<Filter>sdk\game\shared</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\common\opcodes.cpp">
|
||||
@ -1736,6 +1739,9 @@
|
||||
<ClCompile Include="..\game\server\physics_main.cpp">
|
||||
<Filter>sdk\game\server</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\game\shared\util_shared.cpp">
|
||||
<Filter>sdk\game\shared</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Dedicated.def" />
|
||||
|
@ -78,6 +78,7 @@
|
||||
<ClCompile Include="..\game\shared\animation.cpp" />
|
||||
<ClCompile Include="..\game\shared\collisionproperty.cpp" />
|
||||
<ClCompile Include="..\game\shared\entitylist_base.cpp" />
|
||||
<ClCompile Include="..\game\shared\util_shared.cpp" />
|
||||
<ClCompile Include="..\inputsystem\inputsystem.cpp" />
|
||||
<ClCompile Include="..\launcher\IApplication.cpp" />
|
||||
<ClCompile Include="..\launcher\launcher.cpp" />
|
||||
@ -248,6 +249,7 @@
|
||||
<ClInclude Include="..\filesystem\filesystem.h" />
|
||||
<ClInclude Include="..\gameui\IConsole.h" />
|
||||
<ClInclude Include="..\gameui\IBrowser.h" />
|
||||
<ClInclude Include="..\game\client\cliententitylist.h" />
|
||||
<ClInclude Include="..\game\client\c_baseentity.h" />
|
||||
<ClInclude Include="..\game\client\c_baseplayer.h" />
|
||||
<ClInclude Include="..\game\client\enginesprite.h" />
|
||||
@ -281,6 +283,7 @@
|
||||
<ClInclude Include="..\game\shared\shared_classnames.h" />
|
||||
<ClInclude Include="..\game\shared\takedamageinfo.h" />
|
||||
<ClInclude Include="..\game\shared\usercmd.h" />
|
||||
<ClInclude Include="..\game\shared\util_shared.h" />
|
||||
<ClInclude Include="..\inputsystem\ButtonCode.h" />
|
||||
<ClInclude Include="..\inputsystem\inputsystem.h" />
|
||||
<ClInclude Include="..\launcher\IApplication.h" />
|
||||
|
@ -720,6 +720,9 @@
|
||||
<ClCompile Include="..\game\server\physics_main.cpp">
|
||||
<Filter>sdk\game\server</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\game\shared\util_shared.cpp">
|
||||
<Filter>sdk\game\shared</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\client\cdll_engine_int.h">
|
||||
@ -2099,6 +2102,12 @@
|
||||
<ClInclude Include="..\game\server\physics_main.h">
|
||||
<Filter>sdk\game\server</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\game\shared\util_shared.h">
|
||||
<Filter>sdk\game\shared</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\game\client\cliententitylist.h">
|
||||
<Filter>sdk\game\client</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\shared\resource\lockedserver.png">
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include "game/server/gameinterface.h"
|
||||
#endif // !CLIENT_DLL
|
||||
#ifndef DEDICATED
|
||||
#include "game/client/cliententitylist.h"
|
||||
#include "game/client/viewrender.h"
|
||||
#endif // !DEDICATED
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user