Fixed SDKTools sm_dump_datamaps crash on improperly created entities (bug 4424, r=pred)
This commit is contained in:
parent
12723167fc
commit
fb4f6406c9
@ -811,6 +811,11 @@ CON_COMMAND(sm_dump_datamaps, "Dumps the data map list as a text file")
|
|||||||
|
|
||||||
typedescription_t *datamap = gamehelpers->FindInDataMap(pMap, "m_iEFlags");
|
typedescription_t *datamap = gamehelpers->FindInDataMap(pMap, "m_iEFlags");
|
||||||
|
|
||||||
|
if (!datamap)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
int *eflags = (int *)((char *)entity->GetBaseEntity() + datamap->fieldOffset[TD_OFFSET_NORMAL]);
|
int *eflags = (int *)((char *)entity->GetBaseEntity() + datamap->fieldOffset[TD_OFFSET_NORMAL]);
|
||||||
*eflags |= (1<<0); // EFL_KILLME
|
*eflags |= (1<<0); // EFL_KILLME
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user