mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 08:27:39 +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)
|
Mod_LoadExternalSkins (model_t *mod)
|
||||||
{
|
{
|
||||||
char filename[MAX_QPATH + 4];
|
char filename[MAX_QPATH + 4];
|
||||||
aliashdr_t *paliashdr;
|
|
||||||
maliasskindesc_t *pskindesc;
|
maliasskindesc_t *pskindesc;
|
||||||
maliasskingroup_t *pskingroup;
|
maliasskingroup_t *pskingroup;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
paliashdr = Cache_Get (&mod->cache);
|
for (i = 0; i < pheader->mdl.numskins; i++) {
|
||||||
for (i = 0; i < paliashdr->mdl.numskins; i++) {
|
|
||||||
pskindesc = ((maliasskindesc_t *)
|
pskindesc = ((maliasskindesc_t *)
|
||||||
((byte *) paliashdr + paliashdr->skindesc)) + i;
|
((byte *) pheader + pheader->skindesc)) + i;
|
||||||
if (pskindesc->type == ALIAS_SKIN_SINGLE) {
|
if (pskindesc->type == ALIAS_SKIN_SINGLE) {
|
||||||
snprintf (filename, sizeof (filename), "%s_%i.tga", mod->name, i);
|
snprintf (filename, sizeof (filename), "%s_%i.tga", mod->name, i);
|
||||||
Mod_LoadExternalSkin (pskindesc, filename);
|
Mod_LoadExternalSkin (pskindesc, filename);
|
||||||
} else {
|
} else {
|
||||||
pskingroup = (maliasskingroup_t *)
|
pskingroup = (maliasskingroup_t *)
|
||||||
((byte *) paliashdr + pskindesc->skin);
|
((byte *) pheader + pskindesc->skin);
|
||||||
for (j = 0; j < pskingroup->numskins; j++) {
|
for (j = 0; j < pskingroup->numskins; j++) {
|
||||||
snprintf (filename, sizeof (filename), "%s_%i_%i.tga", mod->name, i, j);
|
snprintf (filename, sizeof (filename), "%s_%i_%i.tga", mod->name, i, j);
|
||||||
Mod_LoadExternalSkin (pskingroup->skindescs + j, filename);
|
Mod_LoadExternalSkin (pskingroup->skindescs + j, filename);
|
||||||
|
|
Loading…
Reference in a new issue