Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 18, 2007, 9:27:34 AM (17 years ago)
Author:
rennerc
Message:

AdmWeapon sound, ActionboxEnemy weapons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/weapons/bsp_weapon.cc

    r10711 r10712  
    2222#include "environments/bsp_entity.h"
    2323#include "loading/fast_factory.h"
     24#include "sound_engine.h"
    2425
    2526ObjectListDefinition(BspWeapon);
     
    4142BspWeapon::~BspWeapon ()
    4243{
    43           // will be deleted
     44  if ( soundSource_shoot.isPlaying() )
     45    soundSource_shoot.stop();
    4446}
    4547
     
    125127        this->aimingSystem->setParent( this );
    126128        this->aimingSystem->toList(list);
     129       
     130        this->soundSource_shoot.setSourceNode(this);
     131        this->soundBuffer_shoot = OrxSound::ResourceSoundBuffer("sounds/explosions/doulette.wav");
    127132       
    128133}
     
    130135void BspWeapon::shoot()
    131136{
    132         //gunFirExpl.explode(gunFire1,Vector(2,2,2));
    133         //gunFirExpl.explode(gunFire2,Vector(2,2,2));
    134 
     137
     138  soundSource_shoot.play( soundBuffer_shoot, OrxSound::SoundEngine::getInstance()->getEffectsVolume(), 0.5);
     139 
    135140for ( std::list<MuzzleFlash*>::iterator it = gunFire.begin(); it!=gunFire.end(); it++)
    136141{
Note: See TracChangeset for help on using the changeset viewer.