[gamecode] Print only entity address when no edicts
If the edicts pointer is null, it's not possible to convert the entity address to an index.
This commit is contained in:
parent
f738639d68
commit
a069fad41e
|
@ -1019,9 +1019,13 @@ pr_debug_entity_view (qfot_type_t *type, pr_type_t *value, void *_data)
|
||||||
__auto_type data = (pr_debug_data_t *) _data;
|
__auto_type data = (pr_debug_data_t *) _data;
|
||||||
progs_t *pr = data->pr;
|
progs_t *pr = data->pr;
|
||||||
dstring_t *dstr = data->dstr;
|
dstring_t *dstr = data->dstr;
|
||||||
edict_t *edict = PROG_TO_EDICT (pr, value->entity_var);
|
|
||||||
|
|
||||||
dasprintf (dstr, "entity %d", NUM_FOR_BAD_EDICT (pr, edict));
|
if (pr->edicts) {
|
||||||
|
edict_t *edict = PROG_TO_EDICT (pr, value->entity_var);
|
||||||
|
dasprintf (dstr, "entity %d", NUM_FOR_BAD_EDICT (pr, edict));
|
||||||
|
} else {
|
||||||
|
dasprintf (dstr, "entity [%x]",value->entity_var);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue