summaryrefslogtreecommitdiffstats
path: root/src/control/Pickups.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-11-10 22:08:54 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-11-10 22:08:54 +0100
commit612a6dd06c9f6baa10c67c208cb4c98ca2e483f6 (patch)
tree54ac41114279176d357d421cee97ef8844d6dd53 /src/control/Pickups.cpp
parentCWorld done (diff)
parentMerge pull request #771 from theR4K/miamiDev (diff)
downloadre3-612a6dd06c9f6baa10c67c208cb4c98ca2e483f6.tar
re3-612a6dd06c9f6baa10c67c208cb4c98ca2e483f6.tar.gz
re3-612a6dd06c9f6baa10c67c208cb4c98ca2e483f6.tar.bz2
re3-612a6dd06c9f6baa10c67c208cb4c98ca2e483f6.tar.lz
re3-612a6dd06c9f6baa10c67c208cb4c98ca2e483f6.tar.xz
re3-612a6dd06c9f6baa10c67c208cb4c98ca2e483f6.tar.zst
re3-612a6dd06c9f6baa10c67c208cb4c98ca2e483f6.zip
Diffstat (limited to 'src/control/Pickups.cpp')
-rw-r--r--src/control/Pickups.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index acfb1fbb..c658fcb8 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -369,7 +369,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
if (weaponType < WEAPONTYPE_TOTALWEAPONS && CDarkel::FrenzyOnGoing()) {
isPickupTouched = false;
m_bWasControlMessageShown = false;
- } else if (weaponType != WEAPONTYPE_UNARMED) {
+ } else if (weaponType < WEAPONTYPE_TOTALWEAPONS && weaponType != WEAPONTYPE_UNARMED) {
uint32 slot = CWeaponInfo::GetWeaponInfo(weaponType)->m_nWeaponSlot;
eWeaponType plrWeaponSlot = FindPlayerPed()->GetWeapon(slot).m_eWeaponType;
if (plrWeaponSlot != weaponType) {
@@ -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;