From 81374e8682474fb58897e2467f9d74e142dd15a9 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 24 Jul 2022 13:40:37 +0200 Subject: [PATCH] Add VClientEntityList003 interface --- r5dev/client/cdll_engine_int.h | 6 +++++- r5dev/launcher/IApplication.cpp | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/r5dev/client/cdll_engine_int.h b/r5dev/client/cdll_engine_int.h index f09e9ce0..33a604ba 100644 --- a/r5dev/client/cdll_engine_int.h +++ b/r5dev/client/cdll_engine_int.h @@ -1,7 +1,8 @@ #pragma once #ifndef DEDICATED // We should think about not including this file at all in dedicated tbh. #include "public/include/client_class.h" -#endif +#include "public/include/icliententitylist.h" +#endif // !DEDICATED enum class ClientFrameStage_t : int { @@ -63,6 +64,9 @@ inline bool* cl_time_use_host_tickcount = nullptr; inline CHLClient* gHLClient = nullptr; inline CHLClient* g_pHLClient = nullptr; +#ifndef DEDICATED +inline IClientEntityList* g_pClientEntityList = nullptr; +#endif // !DEDICATED /////////////////////////////////////////////////////////////////////////////// void CHLClient_Attach(); diff --git a/r5dev/launcher/IApplication.cpp b/r5dev/launcher/IApplication.cpp index 155663b7..0868b9eb 100644 --- a/r5dev/launcher/IApplication.cpp +++ b/r5dev/launcher/IApplication.cpp @@ -58,8 +58,9 @@ bool CModAppSystemGroup::Create(CModAppSystemGroup* pModAppSystemGroup) #endif // DEDICATED g_pConCommand->Init(); g_pFactory->GetFactoriesFromRegister(); - #ifndef DEDICATED + g_pClientEntityList = g_pFactory->GetFactoryPtr("VClientEntityList003", false).RCast(); + for (auto& map : g_pCVar->DumpToMap()) { g_pConsole->m_vsvCommandBases.push_back(