1
0
Fork 0

move the "interpolator" subsystem into the INIT group (same as "nasal"),

because nasal's f_interpolate() may be called in Nasal at times when the
GENERAL subsystem group is being deconstructed; access it by addressing
the group directly, as using globals->get_subsystem() does then not
work any more then; yeah, it's all for a rare border case ...  :-)
This commit is contained in:
mfranz 2007-05-01 18:06:48 +00:00
parent ac0f49a929
commit 1f07903cd6
2 changed files with 5 additions and 3 deletions

View file

@ -1579,9 +1579,10 @@ bool fgInitSubsystems() {
globals->get_event_mgr()->setRealtimeProperty(fgGetNode("/sim/time/delta-realtime-sec", true));
////////////////////////////////////////////////////////////////////
// Initialize the property interpolator subsystem
// Initialize the property interpolator subsystem. Put into the INIT
// group because the "nasal" subsystem may need it at GENERAL take-down.
////////////////////////////////////////////////////////////////////
globals->add_subsystem("interpolator", new SGInterpolator);
globals->add_subsystem("interpolator", new SGInterpolator, SGSubsystemMgr::INIT);
////////////////////////////////////////////////////////////////////

View file

@ -306,7 +306,8 @@ static naRef f_interpolate(naContext c, naRef me, int argc, naRef* args)
deltas[i] = naNumValue(naVec_get(curve, 2*i+1)).num;
}
((SGInterpolator*)globals->get_subsystem("interpolator"))
((SGInterpolator*)globals->get_subsystem_mgr()
->get_group(SGSubsystemMgr::INIT)->get_subsystem("interpolator"))
->interpolate(node, nPoints, values, deltas);
return naNil();