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:
parent
b7fd77c403
commit
880a70837c
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue