Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 8, 2009, 10:56:29 PM (15 years ago)
Author:
rgrieder
Message:

Fixed CameraManager issue with the fallback scene by assigning each Scene a CameraManager directly.
Use this→getScene()→getCameraManager() to get the camera manager.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/Scene.cc

    r5839 r5911  
    4545#include "tools/BulletConversions.h"
    4646#include "Radar.h"
     47#include "CameraManager.h"
    4748#include "worldentities/WorldEntity.h"
    4849
     
    6566
    6667            this->radar_ = new Radar();
     68            this->cameraManager_ = new CameraManager(this);
    6769        }
    6870        else
     
    7375
    7476            this->radar_ = 0;
     77            this->cameraManager_ = 0;
    7578        }
    7679
     
    9497        {
    9598            if (GameMode::showsGraphics())
     99            {
     100                // Check whether we're still using this scene manager for the GUI
     101                if (GUIManager::getInstance().getCamera() && GUIManager::getInstance().getCamera()->getSceneManager() == this->sceneManager_)
     102                    GUIManager::getInstance().setCamera(NULL);
    96103                Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
     104            }
    97105            else
    98106                delete this->sceneManager_;
     
    100108            if (this->radar_)
    101109                this->radar_->destroy();
     110
     111            if (this->cameraManager_)
     112                this->cameraManager_->destroy();
    102113
    103114            this->setPhysicalWorld(false);
Note: See TracChangeset for help on using the changeset viewer.