]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/AILocalTraffic.cxx
try to fix yet another crash bug (don't worry, there's one for anybody!)
[flightgear.git] / src / ATC / AILocalTraffic.cxx
index 997db2a94ad9fcfda86eb8f95a1b223298e69ded..15eb6a3d3c1c7ccfc25d0041ab44e96eb5fabb66 100644 (file)
@@ -17,7 +17,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 /*==========================================================
 
@@ -61,7 +61,6 @@ FGAILocalTraffic::FGAILocalTraffic() {
                                          globals->get_sim_time_sec() );
        *//*
        _model = model;
-       _model->ref();
        _aip.init(_model);
        */
        //SetModel(model);
@@ -125,7 +124,6 @@ FGAILocalTraffic::FGAILocalTraffic() {
 }
 
 FGAILocalTraffic::~FGAILocalTraffic() {
-       //_model->deRef();
 }
 
 void FGAILocalTraffic::GetAirportDetails(const string& id) {
@@ -1592,7 +1590,7 @@ void FGAILocalTraffic::DoGroundElev() {
 
         // FIXME: make shure the pos.lat/pos.lon values are in degrees ...
         double alt;
-        if (globals->get_scenery()->get_elevation_m(lat, lon, 20000.0, alt))
+        if (globals->get_scenery()->get_elevation_m(lat, lon, 20000.0, alt, 0))
           _aip.getSGLocation()->set_cur_elev_m(alt);
 }