diff --git a/polymer/eduke32/build/src/mdsprite.c b/polymer/eduke32/build/src/mdsprite.c index 6c61be762..eb9811da2 100644 --- a/polymer/eduke32/build/src/mdsprite.c +++ b/polymer/eduke32/build/src/mdsprite.c @@ -821,17 +821,16 @@ int32_t mdloadskin(md2model_t *m, int32_t number, int32_t pal, int32_t surf) if (*texidx) return *texidx; - // possibly fetch an already loaded multitexture :_) - if (pal >= (MAXPALOOKUPS - RESERVEDPALS)) - for (i=0; iskinmap; skzero; skzero = skzero->next) - if (!Bstrcasecmp(skzero->fn, sk->fn) && skzero->texid[hicfxmask(pal)]) - { - int32_t f = hicfxmask(pal); + // possibly fetch an already loaded texture + for (i=0; iskinmap; skzero; skzero = skzero->next) + if (!Bstrcasecmp(skzero->fn, sk->fn) && skzero->texid[hicfxmask(pal)]) + { + int32_t f = hicfxmask(pal); - sk->texid[f] = skzero->texid[f]; - return sk->texid[f]; - } + sk->texid[f] = skzero->texid[f]; + return sk->texid[f]; + } *texidx = 0; diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index dbbe9c134..a6fdec45f 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -363,8 +363,8 @@ pthtyp *gltexcache(int32_t dapicnum, int32_t dapalnum, int32_t dameth) pth = (pthtyp *)Bcalloc(1,sizeof(pthtyp)); if (!pth) return NULL; - // possibly fetch an already loaded multitexture :_) - if (dapalnum >= (MAXPALOOKUPS - RESERVEDPALS)) + // possibly fetch an already loaded texture + if (si->filename) // false if skybox; we can probably ignore that for now for (i = (GLTEXCACHEADSIZ - 1); i >= 0; i--) for (pth2=gltexcachead[i]; pth2; pth2=pth2->next) {