1
0
Fork 0
forked from fte/fteqw

DP_SV_SPAWNFUNC_PREFIX support

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3036 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2008-10-05 02:51:41 +00:00
parent b7fd77c403
commit 880a70837c

View file

@ -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)