]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.c
spark showers on explosions, better sparks on bullet impacts
[xonotic/darkplaces.git] / model_shared.c
index ea85c5891d5f84cf6af494466701605c183f7aa2..80ca54b59dd8f59514bd54f620212352c0de55be 100644 (file)
@@ -153,7 +153,7 @@ model_t *Mod_LoadModel (model_t *mod, qboolean crash)
 {
        void    *d;
        unsigned *buf;
-       byte    stackbuf[1024];         // avoid dirtying the cache heap
+//     byte    stackbuf[1024];         // avoid dirtying the cache heap
 
        if (!mod->needload)
        {
@@ -167,8 +167,11 @@ model_t *Mod_LoadModel (model_t *mod, qboolean crash)
                        return mod;             // not cached at all
        }
 
+       Con_DPrintf("loading model %s\n", mod->name);
+
 // load the file
-       buf = (unsigned *)COM_LoadStackFile (mod->name, stackbuf, sizeof(stackbuf), false);
+       buf = (unsigned *)COM_LoadMallocFile (mod->name, false);
+//     buf = (unsigned *)COM_LoadStackFile (mod->name, stackbuf, sizeof(stackbuf), false);
        if (!buf)
        {
                if (crash)
@@ -202,6 +205,7 @@ model_t *Mod_LoadModel (model_t *mod, qboolean crash)
                Mod_LoadBrushModel (mod, buf);
                break;
        }
+       free(buf);
 
        return mod;
 }