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/graphics/Camera.cc

    r5738 r5911  
    3838#include "core/CoreIncludes.h"
    3939#include "core/ConfigValueIncludes.h"
     40#include "core/GameMode.h"
    4041#include "Scene.h"
    4142#include "CameraManager.h"
     
    4950        RegisterObject(Camera);
    5051
     52        if (!GameMode::showsGraphics())
     53            ThrowException(AbortLoading, "Can't create Camera, no graphics.");
    5154        if (!this->getScene())
    5255            ThrowException(AbortLoading, "Can't create Camera, no scene.");
     
    117120    void Camera::requestFocus()
    118121    {
    119         CameraManager::getInstance().requestFocus(this);
     122        this->getScene()->getCameraManager()->requestFocus(this);
    120123    }
    121124
    122125    void Camera::releaseFocus()
    123126    {
    124         CameraManager::getInstance().releaseFocus(this);
     127        this->getScene()->getCameraManager()->releaseFocus(this);
    125128    }
    126129
     
    137140    {
    138141        this->bHasFocus_ = true;
    139         CameraManager::getInstance().useCamera(this->camera_);
     142        this->getScene()->getCameraManager()->useCamera(this->camera_);
    140143    }
    141144
Note: See TracChangeset for help on using the changeset viewer.