|
From: James T. <ja...@fl...> - 2023-07-24 13:15:54
|
> 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 FGEnvironment copy 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 |