summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman_oal.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-20 22:54:22 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-20 22:54:22 +0200
commit510261cb058d00bc0388ad58a33b173e5b1536ac (patch)
tree2aa795fe25f5d3bc4fa22d93f7a966838e50b3b5 /src/audio/sampman_oal.cpp
parentscript revision (diff)
parentPickup and audio fix (diff)
downloadre3-510261cb058d00bc0388ad58a33b173e5b1536ac.tar
re3-510261cb058d00bc0388ad58a33b173e5b1536ac.tar.gz
re3-510261cb058d00bc0388ad58a33b173e5b1536ac.tar.bz2
re3-510261cb058d00bc0388ad58a33b173e5b1536ac.tar.lz
re3-510261cb058d00bc0388ad58a33b173e5b1536ac.tar.xz
re3-510261cb058d00bc0388ad58a33b173e5b1536ac.tar.zst
re3-510261cb058d00bc0388ad58a33b173e5b1536ac.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;
}