Merge pull request #414 from hackgrid/fix-sound-mapping

translation mapping for all sounds (fix #405)
This commit is contained in:
lambertjamesd 2023-11-11 11:38:36 -07:00 committed by GitHub
commit 438e45895a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,7 +198,6 @@ void cutsceneRunnerStartStep(struct CutsceneRunner* runner) {
break;
case CutsceneStepTypeQueueSound:
{
step->queueSound.soundId = mapLocaleSound(step->queueSound.soundId);
cutsceneQueueSoundInChannel(step->queueSound.soundId, step->queueSound.volume * (1.0f / 255.0f), step->queueSound.channel, step->queueSound.subtitleId);
break;
}
@ -709,6 +708,8 @@ void cutsceneSerializeRead(struct Serializer* serializer) {
}
void cutsceneQueueSoundInChannel(int soundId, float volume, int channel, int subtitleId) {
soundId = mapLocaleSound(soundId);
if (!gCutsceneSoundQueues[channel] && !soundPlayerIsPlaying(gCutsceneCurrentSound[channel]) && channel == CH_GLADOS) {
cutsceneQueueSound(soundsIntercom[0], volume, channel, subtitleId);
}
@ -725,4 +726,4 @@ int cutsceneIsSoundQueued(){
}
}
return soundQueued;
}
}