From 880a70837c8e946d025c6178cbd886f28e71bb31 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 5 Oct 2008 02:51:41 +0000 Subject: [PATCH] DP_SV_SPAWNFUNC_PREFIX support git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3036 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/pr_edict.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/qclib/pr_edict.c b/engine/qclib/pr_edict.c index 78a1601f9..f831e9d6e 100644 --- a/engine/qclib/pr_edict.c +++ b/engine/qclib/pr_edict.c @@ -2006,6 +2006,7 @@ int LoadEnts(progfuncs_t *progfuncs, char *file, float killonspawnflags) if (!resethunk) { + char *eclassname; func_t f; if (!CheckSpawn) CheckSpawn = PR_FindFunc(progfuncs, "CheckSpawn", -2); @@ -2037,7 +2038,11 @@ int LoadEnts(progfuncs_t *progfuncs, char *file, float killonspawnflags) selfvar = (eval_t *)((int *)pr_globals + ED_FindGlobalOfs(progfuncs, "self")); selfvar->edict = EDICT_TO_PROG(progfuncs, ed); - f = PR_FindFunc(progfuncs, PR_StringToNative(progfuncs, var->string), PR_ANYBACK); + //DP_SV_SPAWNFUNC_PREFIX support + eclassname = PR_StringToNative(progfuncs, var->string); + f = PR_FindFunc(progfuncs, va("spawnfunc_%s", eclassname), PR_ANYBACK); + if (!f) + f = PR_FindFunc(progfuncs, eclassname, PR_ANYBACK); if (f) { if (CheckSpawn)