summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman_oal.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-20 19:45:07 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-20 19:45:07 +0200
commitc0c8278c635258fc72636db0bbf59d7c99c4ba61 (patch)
treeb4df9ad8f815c30cf127124204419f42cdd75bf6 /src/audio/sampman_oal.cpp
parentfixed script bug (diff)
downloadre3-c0c8278c635258fc72636db0bbf59d7c99c4ba61.tar
re3-c0c8278c635258fc72636db0bbf59d7c99c4ba61.tar.gz
re3-c0c8278c635258fc72636db0bbf59d7c99c4ba61.tar.bz2
re3-c0c8278c635258fc72636db0bbf59d7c99c4ba61.tar.lz
re3-c0c8278c635258fc72636db0bbf59d7c99c4ba61.tar.xz
re3-c0c8278c635258fc72636db0bbf59d7c99c4ba61.tar.zst
re3-c0c8278c635258fc72636db0bbf59d7c99c4ba61.zip
Diffstat (limited to '')
-rw-r--r--src/audio/sampman_oal.cpp4
1 files changed, 4 insertions, 0 deletions
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;
}