From: ehofman Date: Wed, 8 Dec 2004 14:48:06 +0000 (+0000) Subject: Mathias Fröhlich: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=821436441499c1f8233aa3957b0143d8cf1f85f6;p=flightgear.git Mathias Fröhlich: I still work on getting the YASim models see the detailed environment especially the carrier. I have *forgotten* to initialize and to destruct the ground cache object! Oooopppss! --- diff --git a/src/FDM/groundcache.cxx b/src/FDM/groundcache.cxx index 683bb27d1..c6f5cf869 100644 --- a/src/FDM/groundcache.cxx +++ b/src/FDM/groundcache.cxx @@ -37,6 +37,22 @@ #include "flight.hxx" #include "groundcache.hxx" +FGGroundCache::FGGroundCache() +{ + sgdSetVec3(cache_center, 0.0, 0.0, 0.0); + ground_radius = 0.0; + cache_ref_time = 0.0; + wire_id = 0; + sgdSetVec3(reference_wgs84_point, 0.0, 0.0, 0.0); + reference_vehicle_radius = 0.0; + found_ground = false; +} + +FGGroundCache::~FGGroundCache() +{ + cache_root.removeAllKids(); +} + FGGroundCache::GroundProperty* FGGroundCache::extractGroundProperty( ssgLeaf* l ) { diff --git a/src/FDM/groundcache.hxx b/src/FDM/groundcache.hxx index be4293db5..9568129b4 100644 --- a/src/FDM/groundcache.hxx +++ b/src/FDM/groundcache.hxx @@ -30,6 +30,9 @@ class FGGroundCache { public: + FGGroundCache(); + ~FGGroundCache(); + ////////////////////////////////////////////////////////////////////////// // Ground handling routines //////////////////////////////////////////////////////////////////////////