Reset: remove commands
This commit is contained in:
parent
069a098909
commit
0751556aab
4 changed files with 31 additions and 15 deletions
|
@ -181,6 +181,9 @@ FGAIManager::shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
ai_list.clear();
|
ai_list.clear();
|
||||||
|
|
||||||
|
globals->get_commands()->removeCommand("load-scenario");
|
||||||
|
globals->get_commands()->removeCommand("unload-scenario");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -238,9 +238,16 @@ FGRouteMgr::~FGRouteMgr()
|
||||||
_plan->removeDelegate(this);
|
_plan->removeDelegate(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//SGCommandMgr* cmdMgr = SGCommandMgr::instance();
|
SGCommandMgr* cmdMgr = SGCommandMgr::instance();
|
||||||
//cmdMgr->removeCommand("define-user-waypoint");
|
cmdMgr->removeCommand("define-user-waypoint");
|
||||||
|
cmdMgr->removeCommand("delete-user-waypoint");
|
||||||
|
cmdMgr->removeCommand("load-flightplan");
|
||||||
|
cmdMgr->removeCommand("save-flightplan");
|
||||||
|
cmdMgr->removeCommand("activate-flightplan");
|
||||||
|
cmdMgr->removeCommand("clear-flightplan");
|
||||||
|
cmdMgr->removeCommand("set-active-waypt");
|
||||||
|
cmdMgr->removeCommand("insert-waypt");
|
||||||
|
cmdMgr->removeCommand("delete-waypt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,10 @@ FGClouds::FGClouds() :
|
||||||
|
|
||||||
FGClouds::~FGClouds()
|
FGClouds::~FGClouds()
|
||||||
{
|
{
|
||||||
|
globals->get_commands()->removeCommand("add-cloud");
|
||||||
|
globals->get_commands()->removeCommand("del-cloud");
|
||||||
|
globals->get_commands()->removeCommand("move-cloud");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int FGClouds::get_update_event(void) const {
|
int FGClouds::get_update_event(void) const {
|
||||||
|
|
|
@ -232,30 +232,32 @@ BasicRealWxController::BasicRealWxController( SGPropertyNode_ptr rootNode, Metar
|
||||||
_wasEnabled(false),
|
_wasEnabled(false),
|
||||||
_requester(metarRequester)
|
_requester(metarRequester)
|
||||||
{
|
{
|
||||||
// at least instantiate MetarProperties for /environment/metar
|
|
||||||
_metarProperties.push_back( new LiveMetarProperties(
|
|
||||||
fgGetNode( rootNode->getStringValue("metar", "/environment/metar"), true ),
|
|
||||||
metarRequester,
|
|
||||||
getMetarMaxAgeMin()));
|
|
||||||
|
|
||||||
BOOST_FOREACH( SGPropertyNode_ptr n, rootNode->getChildren("metar") ) {
|
|
||||||
SGPropertyNode_ptr metarNode = fgGetNode( n->getStringValue(), true );
|
|
||||||
addMetarAtPath(metarNode->getPath(), "");
|
|
||||||
}
|
|
||||||
|
|
||||||
SGCommandMgr::instance()->addCommand("request-metar", commandRequestMetar);
|
SGCommandMgr::instance()->addCommand("request-metar", commandRequestMetar);
|
||||||
SGCommandMgr::instance()->addCommand("clear-metar", commandClearMetar);
|
SGCommandMgr::instance()->addCommand("clear-metar", commandClearMetar);
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicRealWxController::~BasicRealWxController()
|
BasicRealWxController::~BasicRealWxController()
|
||||||
{
|
{
|
||||||
//SGCommandMgr::instance()->removeCommand("request-metar");
|
SGCommandMgr::instance()->removeCommand("request-metar");
|
||||||
|
SGCommandMgr::instance()->removeCommand("clear-metar");
|
||||||
}
|
}
|
||||||
|
|
||||||
void BasicRealWxController::init()
|
void BasicRealWxController::init()
|
||||||
{
|
{
|
||||||
_wasEnabled = false;
|
_wasEnabled = false;
|
||||||
|
|
||||||
|
// at least instantiate MetarProperties for /environment/metar
|
||||||
|
SGPropertyNode_ptr metarNode = fgGetNode( _rootNode->getStringValue("metar", "/environment/metar"), true );
|
||||||
|
_metarProperties.push_back( new LiveMetarProperties(metarNode,
|
||||||
|
_requester,
|
||||||
|
getMetarMaxAgeMin()));
|
||||||
|
|
||||||
|
BOOST_FOREACH( SGPropertyNode_ptr n, _rootNode->getChildren("metar") ) {
|
||||||
|
SGPropertyNode_ptr metarNode = fgGetNode( n->getStringValue(), true );
|
||||||
|
addMetarAtPath(metarNode->getPath(), "");
|
||||||
|
}
|
||||||
|
|
||||||
checkNearbyMetar();
|
checkNearbyMetar();
|
||||||
update(0); // fetch data ASAP
|
update(0); // fetch data ASAP
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue