diff --git a/public/eiface.h b/public/eiface.h index 0e22f34d..54886078 100644 --- a/public/eiface.h +++ b/public/eiface.h @@ -108,25 +108,6 @@ struct bbox_t Vector maxs; }; -class CEntityIndex -{ -public: - CEntityIndex( int index ) - { - _index = index; - } - - int Get() const - { - return _index; - } - - int _index; - - bool operator==( const CEntityIndex &other ) const { return other._index == _index; } - bool operator!=( const CEntityIndex &other ) const { return other._index != _index; } -}; - class CPlayerUserId { public: diff --git a/public/entity2/entityidentity.h b/public/entity2/entityidentity.h index 4dd943f8..a25197db 100644 --- a/public/entity2/entityidentity.h +++ b/public/entity2/entityidentity.h @@ -23,6 +23,26 @@ struct ChangeAccessorFieldPathIndex_t typedef uint32 SpawnGroupHandle_t; typedef CUtlStringToken WorldGroupId_t; +class CEntityIndex +{ +public: + CEntityIndex( int index ) + { + _index = index; + } + + int Get() const + { + return _index; + } + + bool operator==( const CEntityIndex &other ) const { return other._index == _index; } + bool operator!=( const CEntityIndex &other ) const { return other._index != _index; } + +private: + int _index; +}; + enum EntityFlags_t : uint32 { EF_IS_INVALID_EHANDLE = 0x1, @@ -53,6 +73,16 @@ public: return handle; } + + inline const char *GetClassname() const + { + return m_designerName.String(); + } + + inline CEntityIndex GetEntityIndex() const + { + return m_EHandle.GetEntryIndex(); + } public: CEntityInstance* m_pInstance; // 0x0 diff --git a/public/entity2/entityinstance.h b/public/entity2/entityinstance.h index 7580a65b..42d4cd2f 100644 --- a/public/entity2/entityinstance.h +++ b/public/entity2/entityinstance.h @@ -19,6 +19,16 @@ public: { return m_pEntity->GetRefEHandle(); } + + inline const char *GetClassname() const + { + return m_pEntity->GetClassname(); + } + + inline CEntityIndex GetEntityIndex() const + { + return m_pEntity->GetEntityIndex(); + } CUtlSymbolLarge m_iszPrivateVScripts; // 0x8 CEntityIdentity* m_pEntity; // 0x10