|
From: PlayeRom R. L. <rom...@pl...> - 2023-07-24 16:33:58
|
I'm not sure if that's possible, but it looks to me like _recalc_sl_temperature() is being called between _init() and copy() methods in the copy constructor. So when in _init() I set is_isa = false, then is _recalc_sl_temperature called with is_isa = false, then is called copy(env) method where is_isa is set to true, but it's too late. The reason for this is that when I remove is_isa = false; from the _init() method, and I only set it in a regular constructor, then _recalc_sl_temperature keeps the is_isa flag set correctly. W dniu 24.07.2023 o 15:15, James Turner pisze: > > >> On 22 Jul 2023, at 00:14, PlayeRom Roman Ludwicki >> <rom...@pl...> wrote: >> >> At first I thought it was enough to set is_isa = false; in the >> FGEnvironment::_init() method. But then, even though the setter set >> the is_isa flag to true, it was returned to false by the >> FGEnvironment copy constructor.From what I checked, the >> FGEnvironmentcopy constructor is run every frame of the animation.The >> normal FGEnvironment constructor only runs once, so I hope it won't >> be a big deal?Unless there is a better solution to initialize the >> is_isa flag? >> >> > > Initialising to false is correct, the copy constructor calls copy() > which you did implement correctly (copy the value of is_isa from > source object). There must be something else going wrong, since the > copied-in FGEnvironment should have the correct values, otherwise we > would always get a blank/default FGEnvironment every frame. > > I’ll apply the patch and do some debugging, unless you can find > anything yourself. > > Kind regards, > James > > > > _______________________________________________ > Flightgear-devel mailing list > Fli...@li... > https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- Pozdrawiam Roman Ludwicki |