mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
cause the model to load into a calloced buffer rather than the hunk temp
region to avoid the data getting corrupted by cache shufflings. This /should/ fix the bad extents bug (Closes: #37)
This commit is contained in:
parent
00b798c5b6
commit
d7e7b7de7d
1 changed files with 2 additions and 3 deletions
|
@ -168,12 +168,10 @@ Mod_LoadModel (model_t *mod, qboolean crash)
|
|||
model_t *
|
||||
Mod_RealLoadModel (model_t *mod, qboolean crash, cache_allocator_t allocator)
|
||||
{
|
||||
byte stackbuf[1024]; // avoid dirtying the cache heap
|
||||
unsigned int *buf;
|
||||
|
||||
// load the file
|
||||
buf = (unsigned int *) COM_LoadStackFile (mod->name, stackbuf,
|
||||
sizeof (stackbuf));
|
||||
buf = (unsigned int *) COM_LoadFile (mod->name, 0);
|
||||
if (!buf) {
|
||||
if (crash)
|
||||
Sys_Error ("Mod_LoadModel: %s not found", mod->name);
|
||||
|
@ -228,6 +226,7 @@ Mod_RealLoadModel (model_t *mod, qboolean crash, cache_allocator_t allocator)
|
|||
Mod_LoadExternalTextures (mod);
|
||||
break;
|
||||
}
|
||||
free (buf);
|
||||
|
||||
return mod;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue