GetEntityClassname should handle the case where the world entity has not been created yet.
This commit is contained in:
parent
3f220bca0d
commit
3c079bcca0
@ -1170,6 +1170,12 @@ const char *CHalfLife2::GetEntityClassname(CBaseEntity *pEntity)
|
||||
if (offset == -1)
|
||||
{
|
||||
CBaseEntity *pGetterEnt = ReferenceToEntity(0);
|
||||
if (pGetterEnt == NULL)
|
||||
{
|
||||
// If we don't have a world entity yet, we'll have to rely on the given entity
|
||||
pGetterEnt = pEntity;
|
||||
}
|
||||
|
||||
datamap_t *pMap = GetDataMap(pGetterEnt);
|
||||
|
||||
sm_datatable_info_t info;
|
||||
|
Loading…
Reference in New Issue
Block a user