summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-14 16:05:42 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-14 16:05:42 +0200
commit24875f34d0e0b21bc6ebd3ec2e184463d28d1522 (patch)
tree821cf46dd7aabd6af830462a36fac0e3ed062c5c /src/audio
parentfixed hanging boot (diff)
parentfixed hanging boot (diff)
downloadre3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar
re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar.gz
re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar.bz2
re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar.lz
re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar.xz
re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar.zst
re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.zip
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/sampman_miles.cpp4
-rw-r--r--src/audio/sampman_oal.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index caf2917f..a2a206a4 100644
--- a/src/audio/sampman_miles.cpp
+++ b/src/audio/sampman_miles.cpp
@@ -1450,6 +1450,10 @@ cSampleManager::IsPedCommentLoaded(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 true;
}
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index 64b763ec..30efd7f5 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -780,6 +780,10 @@ cSampleManager::IsPedCommentLoaded(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 true;
}