diff --git a/src/Traffic/Schedule.cxx b/src/Traffic/Schedule.cxx index 8b193550b..e86cbcf24 100644 --- a/src/Traffic/Schedule.cxx +++ b/src/Traffic/Schedule.cxx @@ -497,6 +497,19 @@ double FGAISchedule::getSpeed() return speed; } +void FGAISchedule::setScore () +{ + if (runCount) { + score = ((double) hits / (double) runCount); + } else { + if (homePort == fgGetString("/sim/presets/airport-id")) { + score = 0.1; + } else { + score = 0.0; + } + } +} + bool compareSchedules(FGAISchedule*a, FGAISchedule*b) { return (*a) < (*b);