Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2007, 3:46:05 PM (18 years ago)
Author:
gfilip
Message:

the skybox problem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/camera/src/story_entities/game_world_data.cc

    r9869 r10259  
    7070  this->glmis = NULL;
    7171
    72   this->localCamera = NULL;
     72
    7373  this->localPlayer = NULL;
    7474  this->sky = NULL;
     
    9898
    9999  PNode::getNullParent();
    100   this->localCamera = new Camera();
    101   this->localCamera->setName ("GameWorld-Camera");
    102   State::setCamera(this->localCamera, this->localCamera->getTarget());
     100  Camera* localCamera = new Camera();
     101  localCamera->setName ("GameWorld-Camera");
     102  State::setCamera(localCamera, localCamera->getTarget());
    103103
    104104  LightManager::getInstance();
     
    232232  State::setPlayer(this->localPlayer);
    233233
    234   Playable* playable;
    235234  if (!Playable::objectList().empty())
    236235  {
     
    284283  State::setPlayer(NULL);
    285284  this->localPlayer = NULL;
    286   this->localCamera = NULL;
    287285  State::setCamera(NULL, NULL);
    288286  this->sky = NULL;
     
    334332  LoadParamXML(root, "GameRule", this, GameWorldData, loadGameRule);
    335333
    336   LoadParam(root, "clip-region", this->localCamera, Camera, setClipRegion);
     334  LoadParam(root, "clip-region", State::getCamera(), Camera, setClipRegion);
    337335
    338336
     
    340338  //LoadParamXML(root, "PhysicsEngine", PhysicsEngine::getInstance(), PhysicsEngine, loadParams);
    341339
    342   if( this->sky != NULL)
    343     this->localCamera->addChild(this->sky);
    344   OrxSound::SoundEngine::getInstance()->setListener(this->localCamera);
     340
     341  OrxSound::SoundEngine::getInstance()->setListener(State::getCamera());
    345342
    346343  return ErrorMessage();
Note: See TracChangeset for help on using the changeset viewer.