support printing a couple more types (especially for edicts)

This commit is contained in:
Bill Currie 2003-03-26 18:45:44 +00:00
parent 25a7216b8c
commit 58541b6855

View file

@ -251,6 +251,10 @@ PR_ValueString (progs_t *pr, etype_t type, pr_type_t *val)
case ev_uinteger: case ev_uinteger:
snprintf (line, sizeof (line), "$%08x", val->uinteger_var); snprintf (line, sizeof (line), "$%08x", val->uinteger_var);
break; break;
case ev_sel:
snprintf (line, sizeof (line), "(SEL) %s",
PR_GetString (pr, val->string_var));
break;
default: default:
snprintf (line, sizeof (line), "bad type %i", type); snprintf (line, sizeof (line), "bad type %i", type);
break; break;
@ -383,11 +387,18 @@ ED_Print (progs_t *pr, edict_t *ed)
switch (type) { switch (type) {
case ev_entity: case ev_entity:
case ev_integer: case ev_integer:
case ev_uinteger:
case ev_pointer:
case ev_func: case ev_func:
case ev_field: case ev_field:
if (!v->integer_var) if (!v->integer_var)
continue; continue;
break; break;
case ev_sel:
if (!v[0].integer_var
&& !PR_GetString (pr, v[1].string_var)[0])
continue;
break;
case ev_string: case ev_string:
if (!PR_GetString (pr, v->string_var)[0]) if (!PR_GetString (pr, v->string_var)[0])
continue; continue;