|
From: <Wol...@t-...> - 2001-06-19 19:55:27
|
I debugged a bit more regarding the FDM-gets-wrong-terrain-height bug. You will remember the problem was that in current_elev_ssg there was no hit between a ray and the terrain. Originally I thought the ray would be off, but then I saw that the terrain is completely empty (its a branch without kids). As a test, before=20 hit_list.Intersect( terrain, orig, dir ); I added: //int FGTileMgr:: BAmIn_current_elev_ssg=3DTRUE; update(-121.92, 37.357); update(-121.92, 37.357); update(-121.92, 37.357); update(-121.92, 37.357); BAmIn_current_elev_ssg=3DFALSE; Also add=20 int BAmIn_current_elev_ssg =3DFALSE; at the beginning of the file and don't call current_elev_ssg in update when BAmIn_current_elev_ssg is set. I also commented out the=20 if ( !counter_hack )=20 This leads to a hit in the intersection!! I would guess that jsb then runs, since it gets the real height of the scenery. Of course my code is completely temporary; For example I hardcoded lat, lon of KSJC. The only reason for the code is to find the reason for the bug. I hope this helps more knowledgable people than me forward. Obviously, the problem is with the code for the threaded loading, although I don't use threads. But it seems even then tiles that are loaded into a queue and then at an possibly other time taken out of that. Obviously, not one tile has been attached to the variable "terrain" when the intersection test between the ray and the terrain is done. Bye bye, Wolfram |