Get GetEntityClassname m_iClassname offset from worldspawn (bug 5654, r=asherkin).
This commit is contained in:
parent
3e41d9b794
commit
14a8f4a728
@ -1145,7 +1145,8 @@ const char *CHalfLife2::GetEntityClassname(CBaseEntity *pEntity)
|
||||
static int offset = -1;
|
||||
if (offset == -1)
|
||||
{
|
||||
datamap_t *pMap = GetDataMap(pEntity);
|
||||
CBaseEntity *pGetterEnt = ReferenceToEntity(0);
|
||||
datamap_t *pMap = GetDataMap(pGetterEnt);
|
||||
typedescription_t *pDesc = FindInDataMap(pMap, "m_iClassname");
|
||||
offset = GetTypeDescOffs(pDesc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user