Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2009, 9:06:19 AM (15 years ago)
Author:
rgrieder
Message:

Moved sound listener to the active camera and fixed the ambient distance trigger (now acts on cameras and we only have one in a Scene so far).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/orxonox/controllers/HumanController.cc

    r6159 r6191  
    3636#include "infos/PlayerInfo.h"
    3737#include "overlays/Map.h"
    38 #include "graphics/Camera.h"
    39 #include "sound/SoundManager.h"
    4038#include "Radar.h"
    4139#include "Scene.h"
     
    8381        if (GameMode::playsSound() && HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    8482        {
    85             // Update sound listener
    8683            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)
    9385                COUT(3) << "HumanController, Warning: Using a ControllableEntity without Camera" << std::endl;
    9486        }
Note: See TracChangeset for help on using the changeset viewer.