]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
always look for spawnfunc_%s first when spawning an entity by classname (for Q3A...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 13 Jan 2008 10:12:30 +0000 (10:12 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 13 Jan 2008 10:12:30 +0000 (10:12 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7956 d7cf8633-e32d-0410-b094-e92efae38249

prvm_edict.c

index 38062060f598d0f630a16dc8785b73e0bcef5d2b..44895a1a236df304180a1e0fbc1561e98af63097 100644 (file)
@@ -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)
                        {