From 5b953228b416ac894026fe9509a39a4e3b8850b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Wed, 20 May 2020 21:22:40 +0300 Subject: Pickup and audio fix --- src/audio/AudioLogic.cpp | 4 ++-- src/audio/sampman_miles.cpp | 4 ++++ src/audio/sampman_oal.cpp | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/audio') diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 9080a2dd..cc157389 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -3849,9 +3849,9 @@ cAudioManager::GetPedCommentSfx(CPed *ped, int32 sound) //if (ped->IsPlayer()) // return GetPlayerTalkSfx(sound); - // TODO: miami peds + // TODO(Miami): ped comments - return TOTAL_AUDIO_SAMPLES; + return NO_SAMPLE; } void diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index a2a206a4..ad2c512f 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -1469,6 +1469,10 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment) for ( int32 i = 0; i < _TODOCONST(3); i++ ) { slot = nCurrentPedSlot - i - 1; +#ifdef FIX_BUGS + if (slot < 0) + slot += ARRAY_SIZE(nPedSlotSfx); +#endif if ( nComment == nPedSlotSfx[slot] ) return slot; } diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index 30efd7f5..f16afbba 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -800,6 +800,10 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment) for (int32 i = 0; i < _TODOCONST(3); i++) { slot = nCurrentPedSlot - i - 1; +#ifdef FIX_BUGS + if (slot < 0) + slot += ARRAY_SIZE(nPedSlotSfx); +#endif if (nComment == nPedSlotSfx[slot]) return slot; } -- cgit v1.2.3