mirror of
https://github.com/DarkPlacesEngine/dpmodel.git
synced 2025-02-23 11:30:52 +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)
|
||||
{
|
||||
unsigned char line[1024];
|
||||
int current = 0, i;
|
||||
int current = 0, i, found = 0;
|
||||
double org[3], normal[3];
|
||||
double d;
|
||||
int vbonenum;
|
||||
|
@ -635,11 +635,15 @@ int parsetriangles(void)
|
|||
break;
|
||||
if (current == 0)
|
||||
{
|
||||
for (i = 0;i < numshaders;i++)
|
||||
if (!strcmp(shaders[i], line))
|
||||
found = 0;
|
||||
for (i = 0;i < numshaders;i++) {
|
||||
if (!strcasecmp(shaders[i], line)) {
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
triangles[numtriangles].shadernum = i;
|
||||
if (i == numshaders)
|
||||
if (!found)
|
||||
{
|
||||
cleancopyname(shaders[i], line, MAX_NAME);
|
||||
numshaders++;
|
||||
|
|
Loading…
Reference in a new issue