diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 3b3c68b3f..d50e4f7ab 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -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); //////////////////////////////////////////////////////////////////// diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index 81effe1e5..95ecda99b 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -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();