diff --git a/source/blood/src/qav.cpp b/source/blood/src/qav.cpp index b7a533f34..80a73e282 100644 --- a/source/blood/src/qav.cpp +++ b/source/blood/src/qav.cpp @@ -94,7 +94,7 @@ void QAV::Play(int start, int end, int nCallback, void *pData) SOUNDINFO *pSound = &pFrame->sound; // by NoOne: handle Sound kill flags - if (pSound->sndFlags > 0 && pSound->sndFlags <= kFlagSoundKillAll) { + if (!VanillaMode() && pSound->sndFlags > 0 && pSound->sndFlags <= kFlagSoundKillAll) { for (int i = 0; i < nFrames; i++) { FRAMEINFO* pFrame2 = &frames[i]; SOUNDINFO* pSound2 = &pFrame2->sound; @@ -112,9 +112,14 @@ void QAV::Play(int start, int end, int nCallback, void *pData) } if (pSound->sound > 0) { - int sndRange = pSound->sndRange; - if (nSprite == -1) PlaySound(pSound->sound + Random((sndRange == 1) ? 2 : sndRange)); - else PlaySound3D(&sprite[nSprite], pSound->sound + Random((sndRange == 1) ? 2 : sndRange), 16+pSound->priority, 6); + int sound = pSound->sound; + + // by NoOne: add random rage sound feature + if (pSound->sndRange > 0 && !VanillaMode()) + sound += Random((pSound->sndRange == 1) ? 2 : pSound->sndRange); + + if (nSprite == -1) PlaySound(sound); + else PlaySound3D(&sprite[nSprite], sound, 16+pSound->priority, 6); } if (pFrame->nCallbackId > 0 && nCallback != -1) { diff --git a/source/blood/src/seq.cpp b/source/blood/src/seq.cpp index 353a77ed5..156fadb9b 100644 --- a/source/blood/src/seq.cpp +++ b/source/blood/src/seq.cpp @@ -287,11 +287,19 @@ void SEQINST::Update(ACTIVE *pActive) { UpdateSprite(pActive->xindex, &pSequence->frames[frameIndex]); - if (pSequence->frames[frameIndex].at6_1) - sfxPlay3DSound(&sprite[xsprite[pActive->xindex].reference], pSequence->ata + Random(pSequence->frames[frameIndex].soundRange), -1, 0); + if (pSequence->frames[frameIndex].at6_1) { + + int sound = pSequence->ata; + + // by NoOne: add random sound range feature + if (!VanillaMode() && pSequence->frames[frameIndex].soundRange > 0) + sound += Random(((pSequence->frames[frameIndex].soundRange == 1) ? 2 : pSequence->frames[frameIndex].soundRange)); + + sfxPlay3DSound(&sprite[xsprite[pActive->xindex].reference], sound, -1, 0); + } spritetype* pSprite = &sprite[xsprite[pActive->xindex].reference]; - if (pSequence->frames[frameIndex].surfaceSound && zvel[pSprite->xvel] == 0 && xvel[pSprite->xvel] != 0) { + if (!VanillaMode() && pSequence->frames[frameIndex].surfaceSound && zvel[pSprite->xvel] == 0 && xvel[pSprite->xvel] != 0) { // by NoOne: add surfaceSound trigger feature if (gUpperLink[pSprite->sectnum] >= 0) break; // don't play surface sound for stacked sectors