forgot to change ev_function to ev_func in pr_edict and pr_exec was using the

wrong time. weaponframe still not fixed, but static entities were fixed in the
previous checkin
This commit is contained in:
Bill Currie 2001-03-01 23:03:40 +00:00
parent 10e6b7af84
commit 6f590ff9d0
2 changed files with 5 additions and 5 deletions

View file

@ -284,7 +284,7 @@ PR_ValueString (progs_t * pr, etype_t type, eval_t *val)
snprintf (line, sizeof (line), "entity %i",
NUM_FOR_EDICT (pr, PROG_TO_EDICT (pr, val->edict)));
break;
case ev_function:
case ev_func:
f = pr->pr_functions + val->function;
snprintf (line, sizeof (line), "%s()",
PR_GetString (pr, f->s_name));
@ -339,7 +339,7 @@ PR_UglyValueString (progs_t * pr, etype_t type, eval_t *val)
snprintf (line, sizeof (line), "%i",
NUM_FOR_EDICT (pr, PROG_TO_EDICT (pr, val->edict)));
break;
case ev_function:
case ev_func:
f = pr->pr_functions + val->function;
snprintf (line, sizeof (line), "%s", PR_GetString (pr, f->s_name));
break;
@ -730,7 +730,7 @@ ED_ParseEpair (progs_t * pr, pr_type_t *base, ddef_t *key, char *s)
d->_int = G_INT (pr, def->ofs);
break;
case ev_function:
case ev_func:
func = ED_FindFunction (pr, s);
if (!func) {
Con_Printf ("Can't find function %s\n", s);
@ -1012,7 +1012,7 @@ PR_LoadProgs (progs_t * pr, char *progsname)
def = PR_FindGlobal (pr, "self");
if (!def)
PR_Error (pr, "%s: undefined symbol: self", progsname);
pr->globals.self = &pr->pr_globals[def->ofs].edict_var;
pr->globals.self = &pr->pr_globals[def->ofs].entity_var;
if (!(pr->fields.nextthink = FindFieldOffset (pr, "nextthink")))
PR_Error (pr, "%s: undefined field: nextthink", progsname);
if (!(pr->fields.frame = FindFieldOffset (pr, "frame")))

View file

@ -676,7 +676,7 @@ PR_ExecuteProgram (progs_t * pr, func_t fnum)
break;
case OP_STATE:
ed = PROG_TO_EDICT (pr, *pr->globals.self);
ed->v[pr->fields.nextthink].float_var = *pr->time + 0.1;
ed->v[pr->fields.nextthink].float_var = *pr->globals.time + 0.1;
ed->v[pr->fields.frame].float_var = E_OPA->_float;
ed->v[pr->fields.think].func_var = E_OPB->function;
break;