mirror of
https://github.com/DarkPlacesEngine/dpmodel.git
synced 2025-02-24 03:41:12 +00:00
Copying the shader name lowercases everything, but the comparison to found shaders is case sensitive.
There were a /LOT/ of identical shader entries. git-svn-id: svn://svn.icculus.org/twilight/trunk/dpmodel@3719 d7cf8633-e32d-0410-b094-e92efae38249
This commit is contained in:
parent
02e6ce7531
commit
af56444357
1 changed files with 8 additions and 4 deletions
12
dpmodel.c
12
dpmodel.c
|
@ -615,7 +615,7 @@ int initframes(void)
|
||||||
int parsetriangles(void)
|
int parsetriangles(void)
|
||||||
{
|
{
|
||||||
unsigned char line[1024];
|
unsigned char line[1024];
|
||||||
int current = 0, i;
|
int current = 0, i, found = 0;
|
||||||
double org[3], normal[3];
|
double org[3], normal[3];
|
||||||
double d;
|
double d;
|
||||||
int vbonenum;
|
int vbonenum;
|
||||||
|
@ -635,11 +635,15 @@ int parsetriangles(void)
|
||||||
break;
|
break;
|
||||||
if (current == 0)
|
if (current == 0)
|
||||||
{
|
{
|
||||||
for (i = 0;i < numshaders;i++)
|
found = 0;
|
||||||
if (!strcmp(shaders[i], line))
|
for (i = 0;i < numshaders;i++) {
|
||||||
|
if (!strcasecmp(shaders[i], line)) {
|
||||||
|
found = 1;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
triangles[numtriangles].shadernum = i;
|
triangles[numtriangles].shadernum = i;
|
||||||
if (i == numshaders)
|
if (!found)
|
||||||
{
|
{
|
||||||
cleancopyname(shaders[i], line, MAX_NAME);
|
cleancopyname(shaders[i], line, MAX_NAME);
|
||||||
numshaders++;
|
numshaders++;
|
||||||
|
|
Loading…
Reference in a new issue