mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
yeah, it's an icky global, but it's actually the right way to get at the
model header in the model loader.
This commit is contained in:
parent
f67f021713
commit
6dbdfc0464
1 changed files with 3 additions and 5 deletions
|
@ -291,21 +291,19 @@ void
|
|||
Mod_LoadExternalSkins (model_t *mod)
|
||||
{
|
||||
char filename[MAX_QPATH + 4];
|
||||
aliashdr_t *paliashdr;
|
||||
maliasskindesc_t *pskindesc;
|
||||
maliasskingroup_t *pskingroup;
|
||||
int i, j;
|
||||
|
||||
paliashdr = Cache_Get (&mod->cache);
|
||||
for (i = 0; i < paliashdr->mdl.numskins; i++) {
|
||||
for (i = 0; i < pheader->mdl.numskins; i++) {
|
||||
pskindesc = ((maliasskindesc_t *)
|
||||
((byte *) paliashdr + paliashdr->skindesc)) + i;
|
||||
((byte *) pheader + pheader->skindesc)) + i;
|
||||
if (pskindesc->type == ALIAS_SKIN_SINGLE) {
|
||||
snprintf (filename, sizeof (filename), "%s_%i.tga", mod->name, i);
|
||||
Mod_LoadExternalSkin (pskindesc, filename);
|
||||
} else {
|
||||
pskingroup = (maliasskingroup_t *)
|
||||
((byte *) paliashdr + pskindesc->skin);
|
||||
((byte *) pheader + pskindesc->skin);
|
||||
for (j = 0; j < pskingroup->numskins; j++) {
|
||||
snprintf (filename, sizeof (filename), "%s_%i_%i.tga", mod->name, i, j);
|
||||
Mod_LoadExternalSkin (pskingroup->skindescs + j, filename);
|
||||
|
|
Loading…
Reference in a new issue