- Timestamp:
- Dec 2, 2009, 9:06:19 AM (15 years ago)
- Location:
- code/branches/presentation2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/data/levels/sound.oxw
r6119 r6191 22 22 <events> 23 23 <activity> 24 <DistanceTrigger position="300,100,0" distance=200 target="C ontrollableEntity">24 <DistanceTrigger position="300,100,0" distance=200 target="Camera"> 25 25 <attached> 26 26 <ParticleSpawner position="0,0,0" source="Orxonox/fire3" lifetime=0 loop=0 autostart=1 /> -
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.