Pickups fix

This commit is contained in:
Sergeanur 2020-11-08 15:00:54 +02:00
parent 7ede8685ec
commit a2e0373d22
3 changed files with 9 additions and 4 deletions

View File

@ -7201,7 +7201,10 @@ cPedComments::Process()
AudioManager.m_sQueueSample.m_bRequireReflection = true;
AudioManager.m_sQueueSample.m_bIs2D = false;
#ifdef FIX_BUGS
AudioManager.m_sQueueSample.m_bIs2D = sampleIndex >= 8694 && sampleIndex < TOTAL_AUDIO_SAMPLES; // check if player sfx, TODO: enum
if (sampleIndex >= 8694 && sampleIndex < TOTAL_AUDIO_SAMPLES) { // check if player sfx, TODO: enum
AudioManager.m_sQueueSample.m_bIs2D = true;
AudioManager.m_sQueueSample.m_nOffset = 63;
}
#endif // FIX_BUGS
AudioManager.m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(AudioManager.m_sQueueSample.m_nSampleIndex) + AudioManager.RandomDisplacement(750);

View File

@ -508,7 +508,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
result = true;
Remove();
DMAudio.PlayFrontEndSound(SOUND_PICKUP_HIDDEN_PACKAGE, 0);
return true;
break;
case PICKUP_MONEY:
CWorld::Players[playerId].m_nMoney += m_nQuantity;
sprintf(gString, "$%d", m_nQuantity);
@ -518,12 +518,13 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
result = true;
Remove();
DMAudio.PlayFrontEndSound(SOUND_PICKUP_MONEY, 0);
return true;
player->Say(SOUND_PED_MUGGING);
break;
case PICKUP_ASSET_REVENUE:
CWorld::Players[CWorld::PlayerInFocus].m_nMoney += m_fRevenue;
m_fRevenue = 0.0f;
DMAudio.PlayFrontEndSound(SOUND_PICKUP_MONEY, 0);
return false;
break;
case PICKUP_PROPERTY_LOCKED:
if (!m_bWasControlMessageShown) {
m_bWasControlMessageShown = true;

View File

@ -1055,6 +1055,7 @@ CPlayerPed::FindWeaponLockOnTarget(void)
if (nextTarget)
nextTarget->RegisterReference((CEntity**)&m_pPointGunAt);
SetPointGunAt(nextTarget);
Say(SOUND_PED_AIMING);
return true;
}