texture slot spec fix

master
Lee Salzman 2013-03-06 05:09:24 +02:00
parent d991a56ae2
commit 331b1945a0
1 changed files with 3 additions and 1 deletions

View File

@ -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;