X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=model_shared.c;h=80ca54b59dd8f59514bd54f620212352c0de55be;hb=22a0b07d1f738b7f5640faad26baed659cc73188;hp=ea85c5891d5f84cf6af494466701605c183f7aa2;hpb=cc63b89849022ef37ef113a7dc9489c2e846bd1b;p=xonotic%2Fdarkplaces.git diff --git a/model_shared.c b/model_shared.c index ea85c589..80ca54b5 100644 --- a/model_shared.c +++ b/model_shared.c @@ -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; }