On Tue, Feb 8, 2011 at 9:27 PM, Torsten Dreyer <tors...@t3r.de> wrote: >> And that is because of the hardcoded default of 8 fuel tanks. Attached >> patch makes sure at least the existing tanks are covered by the >> properties. >> > Thanks for spotting this. I was naive enough to think no aircraft ever has > more then eight tanks. Now TankProperties are created for every configured > tank in /consumeables/fuel. > > This should keep the Concorde for a bit longer again.
But you have broken my patch! :) The code should specifically check for the number of "tank" subnodes (although overestimating the number is harmless). However, this doesn't work as intended: int n = rootNode->nChildren(); if( n == 0 ) n = rootNode->getIntValue( "numtanks", 8 ); Since if n is zero, that means no children whatsoever, so no "numtanks" either. Thus then it will always be 8, and can not be set via a "numtanks" property (because then n will be one). Also, Anders pointed out that more tanks may be needed even if they are not (yet) in the property tree, so ultimately the FDM should be consulted. -- Csaba/Jester ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel