- a few minor bugfixes
This commit is contained in:
parent
0f195ca9e4
commit
c751c1a2cf
|
@ -126,8 +126,10 @@ void SoundRenderer::update() {
|
|||
if(runThreadSafe == true) {
|
||||
safeMutex.setMutex(&mutex);
|
||||
}
|
||||
if(soundPlayer) {
|
||||
soundPlayer->updateStreams();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ======================= Music ============================
|
||||
|
@ -142,9 +144,11 @@ void SoundRenderer::playMusic(StrSound *strSound) {
|
|||
safeMutex.setMutex(&mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
soundPlayer->play(strSound);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SoundRenderer::setMusicVolume(StrSound *strSound) {
|
||||
|
@ -160,6 +164,7 @@ void SoundRenderer::stopMusic(StrSound *strSound) {
|
|||
safeMutex.setMutex(&mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
soundPlayer->stop(strSound);
|
||||
if(strSound != NULL) {
|
||||
if(strSound->getNext() != NULL) {
|
||||
|
@ -167,6 +172,7 @@ void SoundRenderer::stopMusic(StrSound *strSound) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ======================= Fx ============================
|
||||
|
@ -191,10 +197,12 @@ void SoundRenderer::playFx(StaticSound *staticSound, Vec3f soundPos, Vec3f camPo
|
|||
safeMutex.setMutex(&mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
soundPlayer->play(staticSound);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SoundRenderer::playFx(StaticSound *staticSound) {
|
||||
|
@ -206,9 +214,11 @@ void SoundRenderer::playFx(StaticSound *staticSound) {
|
|||
safeMutex.setMutex(&mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
soundPlayer->play(staticSound);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ======================= Ambient ============================
|
||||
|
@ -222,9 +232,11 @@ void SoundRenderer::playAmbient(StrSound *strSound) {
|
|||
safeMutex.setMutex(&mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
soundPlayer->play(strSound, ambientFade);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SoundRenderer::stopAmbient(StrSound *strSound) {
|
||||
|
@ -234,8 +246,10 @@ void SoundRenderer::stopAmbient(StrSound *strSound) {
|
|||
safeMutex.setMutex(&mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
soundPlayer->stop(strSound, ambientFade);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ======================= Misc ============================
|
||||
|
@ -247,8 +261,10 @@ void SoundRenderer::stopAllSounds(int64 fadeOff) {
|
|||
safeMutex.setMutex(&mutex);
|
||||
}
|
||||
|
||||
if(soundPlayer) {
|
||||
soundPlayer->stopAllSounds(fadeOff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool SoundRenderer::isVolumeTurnedOff() const {
|
||||
|
|
|
@ -640,7 +640,7 @@ void UnitParticleSystem::initParticle(Particle *p, int particleIndex){
|
|||
// work out where we start for our shape (set speed and pos)
|
||||
switch(shape){
|
||||
case sSpherical:
|
||||
angle = random.randRange(0,360);
|
||||
angle = (float)random.randRange(0,360);
|
||||
// fall through
|
||||
case sConical:{
|
||||
Vec2f horiz = Vec2f(1,0).rotate(ang);
|
||||
|
|
Loading…
Reference in New Issue