mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
[gamecode] Use version instead of locals count
It turned out I need locals count and params_start for debugging, so use the progs version instead to bail early from PR_EnterFunction and PR_LeaveFunction (which I had forgotten anyway, oops).
This commit is contained in:
parent
a0d9cf8d8e
commit
42db8514ae
1 changed files with 5 additions and 1 deletions
|
@ -233,7 +233,7 @@ PR_EnterFunction (progs_t *pr, bfunction_t *f)
|
||||||
pr->pr_xfunction = f;
|
pr->pr_xfunction = f;
|
||||||
pr->pr_xstatement = f->first_statement - 1; // offset the st++
|
pr->pr_xstatement = f->first_statement - 1; // offset the st++
|
||||||
|
|
||||||
if (!f->locals) {
|
if (pr->progs->version == PROG_VERSION) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,6 +334,10 @@ PR_LeaveFunction (progs_t *pr, int to_engine)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pr->progs->version == PROG_VERSION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// restore locals from the stack
|
// restore locals from the stack
|
||||||
pr->localstack_used -= f->locals;
|
pr->localstack_used -= f->locals;
|
||||||
if (pr->localstack_used < 0)
|
if (pr->localstack_used < 0)
|
||||||
|
|
Loading…
Reference in a new issue