Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2006, 3:57:04 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the Weather effects back here

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/space_ships/helicopter.cc

    r7337 r7810  
    2525
    2626#include "util/loading/factory.h"
     27#include "util/loading/resource_manager.h"
     28
    2729#include "key_mapper.h"
    2830#include "event_handler.h"
     
    4951{
    5052  this->setPlayer(NULL);
     53
     54  if (this->chopperBuffer != NULL)
     55    ResourceManager::getInstance()->unload(this->chopperBuffer);
    5156}
    5257
     
    96101  this->getWeaponManager().changeWeaponConfig(1);
    97102  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
     103
     104  //load sound
     105  if (this->chopperBuffer != NULL)
     106    ResourceManager::getInstance()->unload(this->chopperBuffer);
     107  this->chopperBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/chopper.wav", WAV);
     108
    98109}
    99110
     
    205216  State::getCameraNode()->setParentSoft(this->getWeaponManager().getFixedTarget());
    206217  State::getCameraTargetNode()->setParentSoft(this->getWeaponManager().getFixedTarget());
     218
     219  this->soundSource.loop(this->chopperBuffer);
     220  // PRINTF(0)( "Playing ChopperSound\n" );
    207221}
    208222
     
    211225  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
    212226  this->detachCamera();
    213 
     227  this->soundSource.stop();
    214228}
    215229
Note: See TracChangeset for help on using the changeset viewer.