Indicate these models want to use their own terrein handling code, until they switch...
[fg:toms-fgdata.git] / Aircraft / P-38-Lightning / Systems / terrain.nas
1 # Do terrain modelling ourselves.
2 setprop("sim/fdm/surface/override-level", 1);
3
4 terrain_under = func {
5
6 var lat = getprop("/position/latitude-deg");
7 var lon = getprop("/position/longitude-deg");
8 var info = geodinfo(lat, lon);
9
10     if (info != nil) {
11     if (info[1] != nil)
12         setprop("/environment/terrain",info[1].solid);
13        #print("and it is ", info[1].solid ? "solid ground" : "covered by water");
14        #debug.dump(geodinfo(lat, lon));
15     }else {
16     setprop("/environment/terrain",1);
17     }
18 settimer (terrain_under, 0.1);
19 }
20
21
22 terrain_under();
23