From 9ab16fa9fcdeeb30565dfdbf6fbb312356978a0b Mon Sep 17 00:00:00 2001 From: GAMMACASE <31375974+GAMMACASE@users.noreply.github.com> Date: Wed, 10 Jun 2026 18:13:01 +0300 Subject: [PATCH] Update CEntityClass --- public/entity2/entityclass.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/public/entity2/entityclass.h b/public/entity2/entityclass.h index 3f86ca10..4ed3fb4c 100644 --- a/public/entity2/entityclass.h +++ b/public/entity2/entityclass.h @@ -36,6 +36,8 @@ struct EntInput_t; struct EntOutput_t; struct datamap_t; +typedef void (*BASEPTR)(CEntityInstance *ent); + struct EntClassComponentOverride_t { const char* pszBaseComponent; @@ -92,7 +94,8 @@ public: } public: - using FuncToNameCb = const char *(*)(void (*)(CEntityInstance *ent)); + using FuncToNameCb = const char *(*)(BASEPTR think_fn); + using NameToFuncCb = BASEPTR (*)(const char *fn_name); void *m_pScriptDesc; CNetworkSerializerClassInfo *m_NetworkSerializerInfo; @@ -105,8 +108,10 @@ public: CEntitySharedPulseSignature *m_pSharedPulseSignature; void *m_unk101; - FuncToNameCb m_unk102; - FuncToNameCb m_unk103; + // Allows to get any think functions in use or to get its string name for this class + // does searches to the parent classes as well + NameToFuncCb m_NameToThinkFunc; + FuncToNameCb m_ThinkFuncToName; EntClassComponentOverride_t* m_pComponentOverrides;