From 55fcead77c439d45113e68eb0d16f5b38afadabd Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 31 May 2002 17:21:38 +0000 Subject: [PATCH] look for the .this field but don't complain if not found --- include/QF/progs.h | 1 + libs/gamecode/engine/pr_obj.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/QF/progs.h b/include/QF/progs.h index 5b3f4232a..12d6a240e 100644 --- a/include/QF/progs.h +++ b/include/QF/progs.h @@ -374,6 +374,7 @@ struct progs_s { int nextthink; int frame; int think; + int this; } fields; }; diff --git a/libs/gamecode/engine/pr_obj.c b/libs/gamecode/engine/pr_obj.c index 86650c9b2..612650d5a 100644 --- a/libs/gamecode/engine/pr_obj.c +++ b/libs/gamecode/engine/pr_obj.c @@ -913,6 +913,7 @@ PR_InitRuntime (progs_t *pr) pr->classes = Hash_NewTable (1021, class_get_key, 0, pr); else Hash_FlushTable (pr->classes); + pr->fields.this = ED_GetFieldIndex (pr, ".this"); for (fnum = 0; fnum < pr->progs->numfunctions; fnum++) { if (strequal (PR_GetString (pr, pr->pr_functions[fnum].s_name), ".ctor")) {