movieman
Joined: 25 Nov 2004 Posts: 1018
|
Posted: Sat Jun 10, 2006 1:56 pm Post subject: Initialisation |
|
|
BTW, we should initalise all floating point values to zero or some other sensible value in the constructor for our classes. I've just been fixing a bunch of bugs where Orbiter explodes on saving the scenario because there's some random value in a double which makes the oapiWriteScenario_float() function crash.
Worst of all it leaves you with a corrupt scenario file that you can't load.
This often wasn't a problem before when we started up the scenarios with the buses powered, because the timestep code would load sane values into the variables. But now we start unpowered, those values don't get loaded and if you save then Orbiter blows away. |
|