Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2394 for code


Ignore:
Timestamp:
Dec 10, 2008, 6:02:42 PM (16 years ago)
Author:
FelixSchulthess
Message:

messing up planet so it will work in client mode

Location:
code/branches/lodfinal/src/orxonox/objects/worldentities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/lodfinal/src/orxonox/objects/worldentities/Planet.cc

    r2388 r2394  
    3737#include "CameraManager.h"
    3838#include "objects/Scene.h"
    39 #include "Camera.h"
    4039#include <math.h>
    4140
     
    7271        if(!this->isVisible())
    7372            return;
    74            
    75         Camera* activeCamera = CameraManager::getInstance().getActiveCamera();
     73       
     74        if(!activeCamera_) activeCamera_ = CameraManager::getInstance().getActiveCamera();
    7675        Real distance = this->getPosition().distance( activeCamera->getWorldPosition() );
    7776        COUT(2) << distance << std::endl;
  • code/branches/lodfinal/src/orxonox/objects/worldentities/Planet.h

    r2380 r2394  
    3535#include "tools/Mesh.h"
    3636#include "objects/Tickable.h"
     37#include "Camera.h"
    3738
    3839namespace orxonox
     
    109110            BillboardSet billboard_;
    110111            bool bCastShadows_;
     112                        Camera* activeCamera_;
    111113
    112114    };
Note: See TracChangeset for help on using the changeset viewer.