This commit is contained in:
Duncan Frost 2014-06-23 21:12:00 +01:00
parent cbdffd193c
commit ee4d8238d2
1 changed files with 6 additions and 4 deletions

View File

@ -228,7 +228,7 @@ static void climate_update_thunder_sound()
if (_thunderStereoEcho) {
// Play thunder on right side
_thunderStereoEcho = 0;
climate_play_thunder(1, _thunderSoundId == SOUND_THUNDER_1 ? SOUND_THUNDER_2 : SOUND_THUNDER_1, _thunderVolume, 10000);
climate_play_thunder(1, _thunderSoundId, _thunderVolume, 10000);
} else if (_thunderTimer != 0) {
climate_update_lightning();
climate_update_thunder();
@ -283,9 +283,11 @@ static void climate_update_thunder()
_thunderStereoEcho = 1;
}
} else {
_thunderSoundId = (randomNumber & 0x20000) ? SOUND_THUNDER_1 : SOUND_THUNDER_2;
int pan = (((randomNumber >> 18) & 0xFF) - 128) * 16;
climate_play_thunder(0, _thunderSoundId, 0, pan);
if (_thunderStatus[0] == THUNDER_STATUS_NULL){
_thunderSoundId = (randomNumber & 0x20000) ? SOUND_THUNDER_1 : SOUND_THUNDER_2;
int pan = (((randomNumber >> 18) & 0xFF) - 128) * 16;
climate_play_thunder(0, _thunderSoundId, 0, pan);
}
}
}