1
0
Fork 0

Animated jetways: Remove obsolete use-custom-scenery-data property

This commit is contained in:
Ryan M 2013-02-04 15:42:08 -08:00 committed by James Turner
parent 658b1fe6ce
commit 9b19d5e20e

View file

@ -373,8 +373,6 @@ var Jetway =
var model_file = "";
var model_dir = "";
var airline_file = "";
if (props.globals.getNode("/sim/paths/use-custom-scenery-data", 1).getBoolValue())
{
# search in scenery directories
foreach (var scenery_path; scenery)
{
@ -387,7 +385,6 @@ var Jetway =
if (io.stat(airline_file) != nil) props.copy(io.read_properties(airline_file), model_tree);
break;
}
}
if (model_tree == nil)
{
model_dir = root ~ "/Models/Airport/Jetway";
@ -715,8 +712,12 @@ var toggle_jetway_from_model = func(model)
var load_airport_jetways = func(airport)
{
if (isin(loaded_airports, airport)) return;
var tree = props.globals.getNode("/sim/paths/use-custom-scenery-data", 1).getBoolValue() ? io.read_airport_properties(airport, "jetways") : (io.stat(root ~ "/AI/Airports/" ~ airport ~ "/jetways.xml") == nil ? nil : io.read_properties(root ~ "/AI/Airports/" ~ airport ~ "/jetways.xml"));
var tree = io.read_airport_properties(airport, "jetways");
if (tree == nil)
{
tree = io.read_properties(root ~ "/AI/Airports/" ~ airport ~ "/jetways.xml");
if (tree == nil) return;
}
append(loaded_airports, airport);
print_debug("Loading jetways for airport " ~ airport);
var nodes = tree.getChildren("jetway");