From d39c075eafe418a520684f4de327ccb42b486d94 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 10 Jan 2009 10:36:01 +0000 Subject: [PATCH] Fix warning. svn-id: r35799 --- engines/scumm/he/sound_he.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 9198698bc4b..3a8c90b7133 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -591,6 +591,8 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) char *sound; int codeOffs = -1; + priority = (soundID > _vm->_numSounds) ? 255 : *(ptr + 18); + byte *sbngPtr = findSoundTag(MKID_BE('SBNG'), ptr); if (sbngPtr != NULL) { codeOffs = sbngPtr - ptr + 8; @@ -618,7 +620,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) _vm->setHETimer(heChannel + 4); _heChannel[heChannel].sound = soundID; - _heChannel[heChannel].priority = (soundID > _vm->_numSounds) ? 255 : 128; + _heChannel[heChannel].priority = priority; _heChannel[heChannel].sbngBlock = (codeOffs != -1) ? 1 : 0; _heChannel[heChannel].codeOffs = codeOffs; memset(_heChannel[heChannel].soundVars, 0, sizeof(_heChannel[heChannel].soundVars));