1
0
Fork 0

Support scenery reloading (needs simgear update).

TileMgr subsystem reinit: remove all scenery tiles from scenegraph and
clear cache (simgear update required).
"normal" sim resets: no TileMgr reset is needed (avoid reloading scenery).
This commit is contained in:
ThorstenB 2011-02-13 19:24:54 +01:00
parent 4a351fdd8b
commit 7bc9749d91
2 changed files with 4 additions and 2 deletions

View file

@ -1557,7 +1557,6 @@ void fgReInitSubsystems()
globals->get_viewmgr()->reinit(); globals->get_viewmgr()->reinit();
globals->get_subsystem("time")->reinit(); globals->get_subsystem("time")->reinit();
globals->get_subsystem("tile-manager")->reinit();
// setup state to end re-init // setup state to end re-init
fgSetBool("/sim/signals/reinit", false); fgSetBool("/sim/signals/reinit", false);

View file

@ -117,6 +117,9 @@ void FGTileMgr::init() {
void FGTileMgr::reinit() void FGTileMgr::reinit()
{ {
// remove all old scenery nodes from scenegraph and clear cache
osg::Group* group = globals->get_scenery()->get_terrain_branch();
group->removeChildren(0, group->getNumChildren());
tile_cache.init(); tile_cache.init();
state = Inited; state = Inited;