trackgen: skip invalid display lists
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8400 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 8a3d8523df0da51ed7b2383637d02902822e47ec Former-commit-id: a12fdd03f45c108dddfef265d5677eab73b80df6
This commit is contained in:
parent
86c6335ecc
commit
72ec12f765
1 changed files with 8 additions and 0 deletions
|
@ -3109,6 +3109,14 @@ static void SaveMainTrack(FILE *curFd, bool bump, bool raceline)
|
|||
if (aDispElt->nb != 0)
|
||||
{
|
||||
sprintf(buf, "%s%d", aDispElt->name, aDispElt->id);
|
||||
|
||||
// skip bad display lists
|
||||
if (aDispElt->nb > 0 && aDispElt->nb < 3)
|
||||
{
|
||||
GfLogWarning("Bug: Display list %s has %d vertices!\n", buf, aDispElt->nb);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bump)
|
||||
{
|
||||
saveObject(curFd, aDispElt->nb, aDispElt->start, aDispElt->texture->namebump, buf, aDispElt->surfType);
|
||||
|
|
Loading…
Reference in a new issue