1
0
Fork 0

fix for FIndAirport to handle heliports

This commit is contained in:
PSadrozinski 2011-10-20 18:17:41 -04:00 committed by Christian Schmitt
parent 16ff1e89cc
commit 881c4e131b

View file

@ -25,6 +25,7 @@ bool Parser::IsAirportDefinition( char* line, string icao )
{ {
case LAND_AIRPORT_CODE: case LAND_AIRPORT_CODE:
case SEA_AIRPORT_CODE: case SEA_AIRPORT_CODE:
case HELIPORT_CODE:
airport = new Airport( code, line ); airport = new Airport( code, line );
if ( airport->GetIcao() == icao ) if ( airport->GetIcao() == icao )
{ {
@ -32,7 +33,6 @@ bool Parser::IsAirportDefinition( char* line, string icao )
} }
break; break;
case HELIPORT_CODE:
case LAND_RUNWAY_CODE: case LAND_RUNWAY_CODE:
case WATER_RUNWAY_CODE: case WATER_RUNWAY_CODE:
case HELIPAD_CODE: case HELIPAD_CODE:
@ -623,8 +623,16 @@ int Parser::ParseLine(char* line)
} }
break; break;
case HELIPORT_CODE: case HELIPORT_CODE:
SetState( STATE_PARSE_SIMPLE ); if (cur_state == STATE_NONE)
SG_LOG(SG_GENERAL, SG_DEBUG, "Parsing heliport: " << line); {
SetState( STATE_PARSE_SIMPLE );
SG_LOG(SG_GENERAL, SG_DEBUG, "Parsing heliport: " << line);
cur_airport = new Airport( code, line );
}
else
{
SetState( STATE_DONE );
}
break; break;
case LAND_RUNWAY_CODE: case LAND_RUNWAY_CODE: