From 260e8309ac57216fdba6b9a2c299097ef4fd4f2a Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 13 Jan 2008 10:12:30 +0000 Subject: [PATCH] always look for spawnfunc_%s first when spawning an entity by classname (for Q3A map compatibility - ammo_rockets is used as classname in Q3A and as field in Q1) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7956 d7cf8633-e32d-0410-b094-e92efae38249 --- prvm_edict.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/prvm_edict.c b/prvm_edict.c index 38062060..44895a1a 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -1227,6 +1227,7 @@ void PRVM_ED_LoadFromFile (const char *data) { prvm_edict_t *ent; int parsed, inhibited, spawned, died; + const char *funcname; mfunction_t *func; parsed = 0; @@ -1283,7 +1284,10 @@ void PRVM_ED_LoadFromFile (const char *data) } // look for the spawn function - func = PRVM_ED_FindFunction (PRVM_GetString(handle)); + funcname = PRVM_GetString(handle); + func = PRVM_ED_FindFunction (va("spawnfunc_%s", funcname)); + if(!func) + func = PRVM_ED_FindFunction (funcname); if (!func) { -- 2.39.2