Fix a bug that could put the same airport object in the final .stg file twice,
doesn't affect rendering, but could affect render performance.
This commit is contained in:
parent
650bbd7e51
commit
fd8f816ee1
1 changed files with 16 additions and 12 deletions
|
@ -1004,9 +1004,12 @@ static void do_custom_objects( const TGConstruct& c ) {
|
|||
} else {
|
||||
while ( ! in.eof() ) {
|
||||
in.getline(line, 2048);
|
||||
cout << "line = " << line << endl;
|
||||
|
||||
sscanf( line, "%s %s", token, name );
|
||||
int result = sscanf( line, "%s %s", token, name );
|
||||
cout << "scanf scanned " << result << " tokens" << endl;
|
||||
|
||||
if ( result > 0 ) {
|
||||
cout << "token = " << token << " name = " << name << endl;
|
||||
|
||||
if ( strcmp( token, "OBJECT" ) == 0 ) {
|
||||
|
@ -1027,6 +1030,7 @@ static void do_custom_objects( const TGConstruct& c ) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue