diff options
Diffstat (limited to 'src/audio')
-rw-r--r-- | src/audio/sampman_miles.cpp | 4 | ||||
-rw-r--r-- | src/audio/sampman_oal.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index caf2917f..e0c7170c 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -1449,7 +1449,11 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment) for ( int32 i = 0; i < _TODOCONST(3); i++ ) { +#ifdef FIX_BUGS + slot = (nCurrentPedSlot - i - 1) % ARRAY_SIZE(nPedSlotSfx); +#else slot = nCurrentPedSlot - i - 1; +#endif if ( nComment == nPedSlotSfx[slot] ) return true; } diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index 64b763ec..7276a895 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -779,7 +779,11 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment) for ( int32 i = 0; i < _TODOCONST(3); i++ ) { +#ifdef FIX_BUGS + slot = (nCurrentPedSlot - i - 1) % ARRAY_SIZE(nPedSlotSfx); +#else slot = nCurrentPedSlot - i - 1; +#endif if ( nComment == nPedSlotSfx[slot] ) return true; } |