Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10379 in orxonox.OLD for trunk/src/story_entities/game_world_data.cc


Ignore:
Timestamp:
Jan 26, 2007, 10:58:31 AM (19 years ago)
Author:
patrick
Message:

merged branche camera to trunk. resolved many conflicts as in the other projects too

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/game_world_data.cc

    r10317 r10379  
    3030#include "player.h"
    3131#include "camera.h"
     32#include "cameraman.h"
    3233#include "terrain.h"
    3334#include "skybox.h"
     
    7071  this->glmis = NULL;
    7172
    72   this->localCamera = NULL;
     73
    7374  this->localPlayer = NULL;
    7475  this->sky = NULL;
     
    9899
    99100  PNode::getNullParent();
    100   this->localCamera = new Camera();
    101   this->localCamera->setName ("GameWorld-Camera");
    102   State::setCamera(this->localCamera, this->localCamera->getTarget());
    103 
     101  Camera* localCamera = new Camera();
     102    localCamera->setName ("GameWorld-Camera");
     103  State::setCamera(localCamera, localCamera->getTarget());
     104  CameraMan* camMan = new CameraMan();
     105  State::setCameraman(camMan);
    104106  LightManager::getInstance();
    105107
     
    283285  State::setPlayer(NULL);
    284286  this->localPlayer = NULL;
    285   this->localCamera = NULL;
    286287  State::setCamera(NULL, NULL);
    287288  this->sky = NULL;
     
    333334  LoadParamXML(root, "GameRule", this, GameWorldData, loadGameRule);
    334335
    335   LoadParam(root, "clip-region", this->localCamera, Camera, setClipRegion);
     336  LoadParam(root, "clip-region", State::getCameraman(), CameraMan, setClipRegion);
    336337
    337338
     
    339340  //LoadParamXML(root, "PhysicsEngine", PhysicsEngine::getInstance(), PhysicsEngine, loadParams);
    340341
    341   if( this->sky != NULL)
    342     this->localCamera->addChild(this->sky);
    343   OrxSound::SoundEngine::getInstance()->setListener(this->localCamera);
     342
     343  OrxSound::SoundEngine::getInstance()->setListener(State::getCamera());
    344344
    345345  return ErrorMessage();
Note: See TracChangeset for help on using the changeset viewer.