1
0
Fork 0

Merge branch 'master' of git://gitorious.org/fg/fgdata

This commit is contained in:
BARANGER Emmanuel 2011-01-14 15:12:40 +01:00
commit f13dbaf558

View file

@ -283,6 +283,27 @@ var request = func {
} }
var request_random = func {
var tanker = values(Tanker.active);
if (size(tanker))
return tanker[0].identify();
var type = props.globals.getNode("systems/refuel", 1).getChildren("type");
if (!size(type))
return;
type = type[rand() * size(type)].getValue();
var (aiid, callsign, tacanid) =_= identity.get();
var hdg = rand() * 360;
var course = rand() * 360;
var dist = 6000 + rand() * 4000;
var alt = int(10 + rand() * 15) * 1000; # FL100--FL250
alt = skip_cloud_layer(alt * FT2M);
var coord = geo.aircraft_position().apply_course_distance(course, dist).set_alt(alt);
Tanker.new(aiid, callsign, tacanid, type, 250, hdg, coord);
}
var report = func { var report = func {
var tanker = values(Tanker.active); var tanker = values(Tanker.active);
if (size(tanker)) if (size(tanker))