Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6285


Ignore:
Timestamp:
Dec 9, 2009, 2:31:54 PM (14 years ago)
Author:
youngk
Message:

Launching sound of the Rocket plays normally now. Changed AL_MAX_DISTANCE to 10000.

Location:
code/branches/presentation2/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc

    r6276 r6285  
    9393        this->defSndWpnEngine_->setSource("sounds/Rocket_engine.ogg");
    9494        this->attach(defSndWpnEngine_);
     95
     96        this->defSndWpnLaunch_ = new WorldSound(this);
     97        this->defSndWpnLaunch_->setLooping(false);
     98        this->defSndWpnLaunch_->setSource("sounds/Rocket_launch.ogg");
     99        this->attach(defSndWpnLaunch_);
    95100    }
    96101
     
    111116                this->defSndWpnEngine_->stop();
    112117            }
     118            if(this->defSndWpnLaunch_->isPlaying())
     119            {
     120                this->defSndWpnLaunch_->stop();
     121            }
    113122            delete this->defSndWpnEngine_;
     123            delete this->defSndWpnLaunch_;
    114124        }
    115125    }
     
    133143
    134144        this->defSndWpnEngine_->play();
     145        this->defSndWpnLaunch_->play();
    135146    }
    136147
  • code/branches/presentation2/src/modules/weapons/projectiles/Rocket.h

    r6247 r6285  
    124124
    125125            WorldSound* defSndWpnEngine_;
    126             WorldSound* defSndWpnExplosion_;
     126            WorldSound* defSndWpnLaunch_;
    127127    };
    128128
  • code/branches/presentation2/src/modules/weapons/weaponmodes/RocketFire.cc

    r6276 r6285  
    5454
    5555        this->setMunitionName("RocketMunition");
    56         this->setDefaultSound("sounds/Rocket_launch.ogg");
     56        // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
    5757    }
    5858
  • code/branches/presentation2/src/orxonox/sound/BaseSound.cc

    r6271 r6285  
    6161            {
    6262                alSourcei(this->audioSource_, AL_REFERENCE_DISTANCE, 20);
    63                 alSourcei(this->audioSource_, AL_MAX_DISTANCE, 300);
     63                alSourcei(this->audioSource_, AL_MAX_DISTANCE, 10000);
    6464            }
    6565        }
Note: See TracChangeset for help on using the changeset viewer.