Support for DP_SV_SPAWNFUNC_PREFIX in the .ent/bspent loader thingie. I'll add the extension name when I get around to fixing up and committing that chunk of code.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3044 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2008-10-13 09:25:51 +00:00
parent 0629d013b5
commit 99c6152b4e

View file

@ -2040,7 +2040,13 @@ int LoadEnts(progfuncs_t *progfuncs, char *file, float killonspawnflags)
//DP_SV_SPAWNFUNC_PREFIX support
eclassname = PR_StringToNative(progfuncs, var->string);
f = PR_FindFunc(progfuncs, va("spawnfunc_%s", eclassname), PR_ANYBACK);
#ifdef _WIN32
_snprintf(filename, sizeof(filename), "spawnfunc_%s", eclassname);
filename[sizeof(filename)-1] = 0;
#else
snprintf(filename, sizeof(filename), "spawnfunc_%s", eclassname);
#endif
f = PR_FindFunc(progfuncs, filename, PR_ANYBACK);
if (!f)
f = PR_FindFunc(progfuncs, eclassname, PR_ANYBACK);
if (f)