mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 12:06:07 +08:00
Update CGameEntitySystem members (#204)
This commit is contained in:
@ -313,11 +313,12 @@ EntityInstanceByClassIter_t::EntityInstanceByClassIter_t(const char* szClassName
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityInstanceByClassIter_t::EntityInstanceByClassIter_t(CEntityInstance* pStart, char const* szClassName, IEntityFindFilter* pFilter, EntityIterType_t eIterType)
|
EntityInstanceByClassIter_t::EntityInstanceByClassIter_t(CEntityInstance* pStart, const char* szClassName, IEntityFindFilter* pFilter, EntityIterType_t eIterType)
|
||||||
{
|
{
|
||||||
m_pCurrentEnt = pStart ? pStart->m_pEntity : nullptr;
|
m_pCurrentEnt = pStart ? pStart->m_pEntity : nullptr;
|
||||||
m_pFilter = pFilter;
|
m_pFilter = pFilter;
|
||||||
m_eIterType = eIterType;
|
m_eIterType = eIterType;
|
||||||
|
m_hWorldGroupId = WorldGroupId_t();
|
||||||
m_pszClassName = szClassName;
|
m_pszClassName = szClassName;
|
||||||
m_pEntityClass = NULL;
|
m_pEntityClass = NULL;
|
||||||
}
|
}
|
||||||
|
@ -290,10 +290,10 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
CUtlString m_sEntSystemName; // 2696
|
CUtlString m_sEntSystemName; // 2696
|
||||||
CUtlMap<const char*, CEntityClass*> m_entClassesByCPPClassname; // 2704
|
CUtlMap<const char*, CEntityClass*, uint16, CDefFastCaselessStringLess> m_entClassesByCPPClassname; // 2704
|
||||||
CUtlMap<const char*, CEntityClass*> m_entClassesByClassname; // 2736
|
CUtlMap<const char*, CEntityClass*, uint16, CDefFastCaselessStringLess> m_entClassesByClassname; // 2736
|
||||||
CUtlMap<const char*, CEntityComponentHelper*> m_entityComponentHelpers; // 2768
|
CUtlMap<const char*, CEntityComponentHelper*, uint16, CDefFastCaselessStringLess> m_entityComponentHelpers; // 2768
|
||||||
CUtlMap<CUtlSymbolLarge, CUtlVector<CEntityHandle>*> m_entityNames; // 2800
|
CUtlMap<CUtlSymbolLarge, CUtlVector<CEntityHandle>*, uint16, CDefLess<CUtlSymbolLarge>> m_entityNames; // 2800
|
||||||
CEventQueue m_EventQueue; // 2832
|
CEventQueue m_EventQueue; // 2832
|
||||||
CUtlVectorFixedGrowable<IEntityIONotify*, 2> m_entityIONotifiers; // 2968 | 2984
|
CUtlVectorFixedGrowable<IEntityIONotify*, 2> m_entityIONotifiers; // 2968 | 2984
|
||||||
int m_nSuppressDormancyChangeCount; // 3008 | 3024
|
int m_nSuppressDormancyChangeCount; // 3008 | 3024
|
||||||
@ -331,7 +331,7 @@ public:
|
|||||||
CUtlHashtable<CUtlString, void*> m_EntityMaterialAttributes; // 5360 | 5408
|
CUtlHashtable<CUtlString, void*> m_EntityMaterialAttributes; // 5360 | 5408
|
||||||
};
|
};
|
||||||
|
|
||||||
// Size: 0x1580 | 0x15B0 (from constructor)
|
// Size: 0x1570 | 0x15A0 (from constructor)
|
||||||
class CGameEntitySystem : public CEntitySystem
|
class CGameEntitySystem : public CEntitySystem
|
||||||
{
|
{
|
||||||
struct SpawnGroupEntityFilterInfo_t
|
struct SpawnGroupEntityFilterInfo_t
|
||||||
@ -356,7 +356,6 @@ public:
|
|||||||
CUtlVector<IEntityListener*> m_entityListeners; // 5448 | 5496
|
CUtlVector<IEntityListener*> m_entityListeners; // 5448 | 5496
|
||||||
IEntity2SaveRestore* m_pEntity2SaveRestore; // 5472 | 5520
|
IEntity2SaveRestore* m_pEntity2SaveRestore; // 5472 | 5520
|
||||||
IEntity2Networkables* m_pEntity2Networkables; // 5480 | 5528
|
IEntity2Networkables* m_pEntity2Networkables; // 5480 | 5528
|
||||||
bool m_Unk7; // 5488 | 5536
|
|
||||||
};
|
};
|
||||||
|
|
||||||
abstract_class IEntityFindFilter
|
abstract_class IEntityFindFilter
|
||||||
@ -408,7 +407,7 @@ class EntityInstanceByClassIter_t
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EntityInstanceByClassIter_t(const char* szClassName, IEntityFindFilter* pFilter = nullptr, EntityIterType_t eIterType = ENTITY_ITER_OVER_ACTIVE);
|
EntityInstanceByClassIter_t(const char* szClassName, IEntityFindFilter* pFilter = nullptr, EntityIterType_t eIterType = ENTITY_ITER_OVER_ACTIVE);
|
||||||
EntityInstanceByClassIter_t(CEntityInstance* pStart, char const* szClassName, IEntityFindFilter* pFilter = nullptr, EntityIterType_t eIterType = ENTITY_ITER_OVER_ACTIVE);
|
EntityInstanceByClassIter_t(CEntityInstance* pStart, const char* szClassName, IEntityFindFilter* pFilter = nullptr, EntityIterType_t eIterType = ENTITY_ITER_OVER_ACTIVE);
|
||||||
|
|
||||||
CEntityInstance* First();
|
CEntityInstance* First();
|
||||||
CEntityInstance* Next();
|
CEntityInstance* Next();
|
||||||
|
@ -25,12 +25,14 @@ enum EDictCompareType
|
|||||||
{
|
{
|
||||||
k_eDictCompareTypeCaseSensitive=0,
|
k_eDictCompareTypeCaseSensitive=0,
|
||||||
k_eDictCompareTypeCaseInsensitive=1,
|
k_eDictCompareTypeCaseInsensitive=1,
|
||||||
|
k_eDictCompareTypeCaseInsensitiveFast=2,
|
||||||
k_eDictCompareTypeFilenames // Slashes and backslashes count as the same character..
|
k_eDictCompareTypeFilenames // Slashes and backslashes count as the same character..
|
||||||
};
|
};
|
||||||
|
|
||||||
template <int COMPARE_TYPE> struct CDictCompareTypeDeducer {};
|
template <int COMPARE_TYPE> struct CDictCompareTypeDeducer {};
|
||||||
template <> struct CDictCompareTypeDeducer<k_eDictCompareTypeCaseSensitive> { typedef CDefStringLess Type_t; };
|
template <> struct CDictCompareTypeDeducer<k_eDictCompareTypeCaseSensitive> { typedef CDefStringLess Type_t; };
|
||||||
template <> struct CDictCompareTypeDeducer<k_eDictCompareTypeCaseInsensitive> { typedef CDefCaselessStringLess Type_t; };
|
template <> struct CDictCompareTypeDeducer<k_eDictCompareTypeCaseInsensitive> { typedef CDefCaselessStringLess Type_t; };
|
||||||
|
template <> struct CDictCompareTypeDeducer<k_eDictCompareTypeCaseInsensitiveFast> { typedef CDefFastCaselessStringLess Type_t; };
|
||||||
template <> struct CDictCompareTypeDeducer<k_eDictCompareTypeFilenames> { typedef CDefCaselessStringLessIgnoreSlashes Type_t; };
|
template <> struct CDictCompareTypeDeducer<k_eDictCompareTypeFilenames> { typedef CDefCaselessStringLessIgnoreSlashes Type_t; };
|
||||||
|
|
||||||
#define FOR_EACH_DICT( dictName, iteratorName ) \
|
#define FOR_EACH_DICT( dictName, iteratorName ) \
|
||||||
@ -43,7 +45,7 @@ template <> struct CDictCompareTypeDeducer<k_eDictCompareTypeFilenames> { typede
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// A dictionary mapping from symbol to structure
|
// A dictionary mapping from symbol to structure
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
template <class T, class I = int, int COMPARE_TYPE = k_eDictCompareTypeCaseInsensitive>
|
template <class T, class I = int, int COMPARE_TYPE = k_eDictCompareTypeCaseInsensitiveFast>
|
||||||
class CUtlDict
|
class CUtlDict
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -45,9 +45,26 @@ public:
|
|||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
|
|
||||||
inline bool StringLessThan( const char * const &lhs, const char * const &rhs) { return ( strcmp( lhs, rhs) < 0 ); }
|
inline bool StringLessThan( const char * const &lhs, const char * const &rhs)
|
||||||
inline bool CaselessStringLessThan( const char * const &lhs, const char * const &rhs ) { return ( V_stricmp_fast( lhs, rhs) < 0 ); }
|
{
|
||||||
|
if ( !lhs ) return false;
|
||||||
|
if ( !rhs ) return true;
|
||||||
|
return ( strcmp( lhs, rhs ) < 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool CaselessStringLessThan( const char * const &lhs, const char * const &rhs )
|
||||||
|
{
|
||||||
|
if ( !lhs ) return false;
|
||||||
|
if ( !rhs ) return true;
|
||||||
|
return ( stricmp( lhs, rhs ) < 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool FastCaselessStringLessThan( const char * const &lhs, const char * const &rhs )
|
||||||
|
{
|
||||||
|
if ( !lhs ) return false;
|
||||||
|
if ( !rhs ) return true;
|
||||||
|
return ( V_stricmp_fast( lhs, rhs ) < 0 );
|
||||||
|
}
|
||||||
|
|
||||||
// Same as CaselessStringLessThan, but it ignores differences in / and \.
|
// Same as CaselessStringLessThan, but it ignores differences in / and \.
|
||||||
inline bool CaselessStringLessThanIgnoreSlashes( const char * const &lhs, const char * const &rhs )
|
inline bool CaselessStringLessThanIgnoreSlashes( const char * const &lhs, const char * const &rhs )
|
||||||
@ -97,7 +114,7 @@ class CDefStringLess
|
|||||||
public:
|
public:
|
||||||
CDefStringLess() {}
|
CDefStringLess() {}
|
||||||
CDefStringLess( int i ) {}
|
CDefStringLess( int i ) {}
|
||||||
inline bool operator()( const char * const &lhs, const char * const &rhs ) const { return StringLessThan( lhs, rhs ); }
|
inline bool operator()( const char * const &lhs, const char * const &rhs ) const { return ( strcmp( lhs, rhs ) < 0 ); }
|
||||||
inline bool operator!() const { return false; }
|
inline bool operator!() const { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -106,7 +123,16 @@ class CDefCaselessStringLess
|
|||||||
public:
|
public:
|
||||||
CDefCaselessStringLess() {}
|
CDefCaselessStringLess() {}
|
||||||
CDefCaselessStringLess( int i ) {}
|
CDefCaselessStringLess( int i ) {}
|
||||||
inline bool operator()( const char * const &lhs, const char * const &rhs ) const { return CaselessStringLessThan( lhs, rhs ); }
|
inline bool operator()( const char * const &lhs, const char * const &rhs ) const { return ( stricmp( lhs, rhs ) < 0 ); }
|
||||||
|
inline bool operator!() const { return false; }
|
||||||
|
};
|
||||||
|
|
||||||
|
class CDefFastCaselessStringLess
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CDefFastCaselessStringLess() {}
|
||||||
|
CDefFastCaselessStringLess( int i ) {}
|
||||||
|
inline bool operator()( const char * const &lhs, const char * const &rhs ) const { return ( V_stricmp_fast( lhs, rhs ) < 0 ); }
|
||||||
inline bool operator!() const { return false; }
|
inline bool operator!() const { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -58,6 +58,12 @@ public:
|
|||||||
{
|
{
|
||||||
return m_pString != src.m_pString;
|
return m_pString != src.m_pString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// operator<
|
||||||
|
bool operator<( CUtlSymbolLarge const& src ) const
|
||||||
|
{
|
||||||
|
return ( intp )m_pString < ( intp )src.m_pString;
|
||||||
|
}
|
||||||
|
|
||||||
inline const char* String() const
|
inline const char* String() const
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user