mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-08 11:08:23 +00:00
Update CGameEntitySystem (#159)
This commit is contained in:
parent
a138f7fb01
commit
edef920f90
@ -38,3 +38,16 @@ CBaseEntity* CEntitySystem::GetBaseEntity(const CEntityHandle& hEnt)
|
|||||||
|
|
||||||
return dynamic_cast<CBaseEntity*>(pIdentity->m_pInstance);
|
return dynamic_cast<CBaseEntity*>(pIdentity->m_pInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGameEntitySystem::AddListenerEntity(IEntityListener* pListener)
|
||||||
|
{
|
||||||
|
if (m_entityListeners.Find(pListener) == -1)
|
||||||
|
{
|
||||||
|
m_entityListeners.AddToTail(pListener);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGameEntitySystem::RemoveListenerEntity(IEntityListener* pListener)
|
||||||
|
{
|
||||||
|
m_entityListeners.FindAndRemove(pListener);
|
||||||
|
}
|
||||||
|
|||||||
@ -65,7 +65,7 @@ struct EntityDormancyChange_t : EntityNotification_t
|
|||||||
struct EntitySpawnInfo_t : EntityNotification_t
|
struct EntitySpawnInfo_t : EntityNotification_t
|
||||||
{
|
{
|
||||||
const CEntityKeyValues* m_pKeyValues;
|
const CEntityKeyValues* m_pKeyValues;
|
||||||
uint64 unknown;
|
uint64 m_Unk1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct EntityActivation_t : EntityNotification_t
|
struct EntityActivation_t : EntityNotification_t
|
||||||
@ -81,7 +81,6 @@ struct PostDataUpdateInfo_t : EntityNotification_t
|
|||||||
DataUpdateType_t m_updateType;
|
DataUpdateType_t m_updateType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct CEntityPrecacheContext
|
struct CEntityPrecacheContext
|
||||||
{
|
{
|
||||||
const CEntityKeyValues* m_pKeyValues;
|
const CEntityKeyValues* m_pKeyValues;
|
||||||
@ -92,9 +91,10 @@ struct CEntityPrecacheContext
|
|||||||
class IEntityListener
|
class IEntityListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void OnEntityCreated(CBaseEntity* pEntity) {};
|
virtual void OnEntityCreated(CEntityInstance* pEntity) {};
|
||||||
virtual void OnEntitySpawned(CBaseEntity* pEntity) {};
|
virtual void OnEntitySpawned(CEntityInstance* pEntity) {};
|
||||||
virtual void OnEntityDeleted(CBaseEntity* pEntity) {};
|
virtual void OnEntityDeleted(CEntityInstance* pEntity) {};
|
||||||
|
virtual void OnEntityParentChanged(CEntityInstance* pEntity, CEntityInstance* pNewParent) {};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CEntityResourceManifestLock
|
struct CEntityResourceManifestLock
|
||||||
@ -123,8 +123,7 @@ public:
|
|||||||
virtual void LockResourceManifest(bool bLock, CEntityResourceManifestLock* const context) = 0;
|
virtual void LockResourceManifest(bool bLock, CEntityResourceManifestLock* const context) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Size: 0x1510 | 0x1540 (from constructor)
|
||||||
// Size: 0x1510 (from constructor)
|
|
||||||
class CEntitySystem : public IEntityResourceManifestBuilder
|
class CEntitySystem : public IEntityResourceManifestBuilder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -152,10 +151,15 @@ public:
|
|||||||
CConcreteEntityList m_EntityList;
|
CConcreteEntityList m_EntityList;
|
||||||
// CConcreteEntityList seems to be correct but m_CallQueue supposedly starts at offset 2664, which is... impossible?
|
// CConcreteEntityList seems to be correct but m_CallQueue supposedly starts at offset 2664, which is... impossible?
|
||||||
// Based on CEntitySystem::CEntitySystem found via string "MaxNonNetworkableEntities"
|
// Based on CEntitySystem::CEntitySystem found via string "MaxNonNetworkableEntities"
|
||||||
uint8 unk2696[0xa88];
|
|
||||||
|
private:
|
||||||
|
uint8 pad2696[0xa88];
|
||||||
|
#ifdef PLATFORM_LINUX
|
||||||
|
uint8 pad5392[0x30];
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
// Size: 0x1580 (from constructor)
|
// Size: 0x1580 | 0x15B0 (from constructor)
|
||||||
class CGameEntitySystem : public CEntitySystem
|
class CGameEntitySystem : public CEntitySystem
|
||||||
{
|
{
|
||||||
struct SpawnGroupEntityFilterInfo_t
|
struct SpawnGroupEntityFilterInfo_t
|
||||||
@ -165,18 +169,22 @@ class CGameEntitySystem : public CEntitySystem
|
|||||||
};
|
};
|
||||||
//typedef SpawnGroupEntityFilterInfo_t CUtlMap<char const*, SpawnGroupEntityFilterInfo_t, int, bool (*)(char const* const&, char const* const&)>::ElemType_t;
|
//typedef SpawnGroupEntityFilterInfo_t CUtlMap<char const*, SpawnGroupEntityFilterInfo_t, int, bool (*)(char const* const&, char const* const&)>::ElemType_t;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~CGameEntitySystem() = 0;
|
virtual ~CGameEntitySystem() = 0;
|
||||||
|
|
||||||
|
void AddListenerEntity(IEntityListener* pListener);
|
||||||
|
void RemoveListenerEntity(IEntityListener* pListener);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int m_iMaxNetworkedEntIndex;
|
int m_iMaxNetworkedEntIndex; // 5392 | 5440
|
||||||
int m_iNetworkedEntCount;
|
int m_iNetworkedEntCount; // 5396 | 5444
|
||||||
int m_iNonNetworkedSavedEntCount;
|
int m_iNonNetworkedSavedEntCount; // 5400 | 5448
|
||||||
// int m_iNumEdicts; // This is no longer referenced in the server binary
|
// int m_iNumEdicts; // This is no longer referenced in the server binary
|
||||||
CUtlDict<CGameEntitySystem::SpawnGroupEntityFilterInfo_t, int> m_spawnGroupEntityFilters;
|
CUtlDict<SpawnGroupEntityFilterInfo_t> m_spawnGroupEntityFilters; // 5408 | 5456
|
||||||
CUtlVector<IEntityListener*, CUtlMemory<IEntityListener*, int> > m_entityListeners;
|
CUtlVector<IEntityListener*> m_entityListeners; // 5448 | 5496
|
||||||
uint8 unk5480[0x18];
|
|
||||||
|
private:
|
||||||
|
uint8 pad5480[0x20];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ENTITYSYSTEM_H
|
#endif // ENTITYSYSTEM_H
|
||||||
Loading…
Reference in New Issue
Block a user