From 8e0b132f43b0ac952255bf85b0d1e22e3879d694 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 14 May 2020 14:03:56 +0300 Subject: it works differently --- src/audio/sampman_oal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/audio/sampman_oal.cpp') diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index 7276a895..30efd7f5 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -779,10 +779,10 @@ 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; +#ifdef FIX_BUGS + if (slot < 0) + slot += ARRAY_SIZE(nPedSlotSfx); #endif if ( nComment == nPedSlotSfx[slot] ) return true; -- cgit v1.2.3