texture slot spec fix
parent
d991a56ae2
commit
331b1945a0
|
@ -1694,6 +1694,8 @@ const struct slottex
|
|||
} slottexs[] =
|
||||
{
|
||||
{"0", TEX_DIFFUSE},
|
||||
{"1", TEX_UNKNOWN},
|
||||
|
||||
{"c", TEX_DIFFUSE},
|
||||
{"d", TEX_DECAL},
|
||||
{"n", TEX_NORMAL},
|
||||
|
@ -1717,7 +1719,7 @@ void texture(char *type, char *name, int *rot, int *xoffset, int *yoffset, float
|
|||
if(slots.length()>=0x10000) return;
|
||||
static int lastmatslot = -1;
|
||||
int tnum = findslottex(type), matslot = findmaterial(type);
|
||||
if(tnum<0) tnum = atoi(type) ? TEX_UNKNOWN : 0;
|
||||
if(tnum<0) tnum = TEX_UNKNOWN;
|
||||
if(tnum==TEX_DIFFUSE) lastmatslot = matslot;
|
||||
else if(lastmatslot>=0) matslot = lastmatslot;
|
||||
else if(slots.empty()) return;
|
||||
|
|
Loading…
Reference in New Issue