fixed ped comment

This commit is contained in:
Nikolay Korolev 2020-05-20 20:45:07 +03:00
parent 1b96e6c378
commit c0c8278c63
2 changed files with 8 additions and 0 deletions

View File

@ -1469,6 +1469,10 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
for ( int32 i = 0; i < _TODOCONST(3); i++ ) for ( int32 i = 0; i < _TODOCONST(3); i++ )
{ {
slot = nCurrentPedSlot - i - 1; slot = nCurrentPedSlot - i - 1;
#ifdef FIX_BUGS
if (slot < 0)
slot += ARRAY_SIZE(nPedSlotSfx);
#endif
if ( nComment == nPedSlotSfx[slot] ) if ( nComment == nPedSlotSfx[slot] )
return slot; return slot;
} }

View File

@ -800,6 +800,10 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
for (int32 i = 0; i < _TODOCONST(3); i++) for (int32 i = 0; i < _TODOCONST(3); i++)
{ {
slot = nCurrentPedSlot - i - 1; slot = nCurrentPedSlot - i - 1;
#ifdef FIX_BUGS
if (slot < 0)
slot += ARRAY_SIZE(nPedSlotSfx);
#endif
if (nComment == nPedSlotSfx[slot]) if (nComment == nPedSlotSfx[slot])
return slot; return slot;
} }