Changeset 6191 for code/branches/presentation2/src/orxonox
- Timestamp:
- Dec 2, 2009, 9:06:19 AM (15 years ago)
- Location:
- code/branches/presentation2/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/controllers/HumanController.cc
r6159 r6191 36 36 #include "infos/PlayerInfo.h" 37 37 #include "overlays/Map.h" 38 #include "graphics/Camera.h"39 #include "sound/SoundManager.h"40 38 #include "Radar.h" 41 39 #include "Scene.h" … … 83 81 if (GameMode::playsSound() && HumanController::localController_s && HumanController::localController_s->controllableEntity_) 84 82 { 85 // Update sound listener86 83 Camera* camera = HumanController::localController_s->controllableEntity_->getCamera(); 87 if (camera) 88 { 89 SoundManager::getInstance().setListenerPosition(camera->getWorldPosition()); 90 SoundManager::getInstance().setListenerOrientation(camera->getWorldOrientation()); 91 } 92 else 84 if (!camera) 93 85 COUT(3) << "HumanController, Warning: Using a ControllableEntity without Camera" << std::endl; 94 86 } -
code/branches/presentation2/src/orxonox/graphics/Camera.cc
r6170 r6191 42 42 #include "Scene.h" 43 43 #include "CameraManager.h" 44 #include "sound/SoundManager.h" 44 45 45 46 namespace orxonox … … 131 132 this->cameraNode_->setOrientation(Quaternion::Slerp(coeff, this->cameraNode_->_getDerivedOrientation(), this->getWorldOrientation(), true)); 132 133 } 134 135 // Update sound listener transformation 136 if (GameMode::playsSound() && this->bHasFocus_) 137 { 138 SoundManager::getInstance().setListenerPosition(this->getWorldPosition()); 139 SoundManager::getInstance().setListenerOrientation(this->getWorldOrientation()); 140 } 133 141 } 134 142
Note: See TracChangeset
for help on using the changeset viewer.