mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[model] Fix alias skin group loading
Although the skin pointer was being advanced after recording the information in for the batch array, it was being reset the next time around the loop (due to a mistranslation of the previous code). This fixes the segfault while loading (gl, glsl, vulkan) or rendering (sw) the sphere model from Rogue.
This commit is contained in:
parent
8b425a2740
commit
f97fb90d90
1 changed files with 1 additions and 2 deletions
|
@ -113,7 +113,6 @@ Mod_LoadAllSkins (mod_alias_ctx_t *alias_ctx, int numskins,
|
|||
|
||||
for (gnum = 0; gnum < groupskins; gnum++) {
|
||||
paliasskingroup->skindescs[gnum].type = ALIAS_SKIN_SINGLE;
|
||||
skin = (byte *) (pskintype + 1);
|
||||
mod_alias_skin_t askin = {
|
||||
.skin_num = snum,
|
||||
.group_num = gnum,
|
||||
|
@ -263,7 +262,7 @@ Mod_LoadAliasModel (model_t *mod, void *buffer, cache_allocator_t allocator)
|
|||
mod->name, version, ALIAS_VERSION_MDL);
|
||||
|
||||
// allocate space for a working header, plus all the data except the
|
||||
// frames, skin and group info
|
||||
// frame data, skin and group info
|
||||
size = field_offset (aliashdr_t, frames[LittleLong (pinmodel->numframes)]);
|
||||
header = Hunk_AllocName (0, size, mod->name);
|
||||
memset (header, 0, size);
|
||||
|
|
Loading…
Reference in a new issue