diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-18 20:20:44 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-18 20:20:44 +0100 |
commit | 4f36a1fb770653f26dd4fb3f89a6596015fbb4af (patch) | |
tree | acefb8b0fb1d2ffbf2136e643d327a54a6b27a01 /src/control/Pickups.cpp | |
parent | Merge remote-tracking branch 'upstream/lcs' into lcs (diff) | |
download | re3-4f36a1fb770653f26dd4fb3f89a6596015fbb4af.tar re3-4f36a1fb770653f26dd4fb3f89a6596015fbb4af.tar.gz re3-4f36a1fb770653f26dd4fb3f89a6596015fbb4af.tar.bz2 re3-4f36a1fb770653f26dd4fb3f89a6596015fbb4af.tar.lz re3-4f36a1fb770653f26dd4fb3f89a6596015fbb4af.tar.xz re3-4f36a1fb770653f26dd4fb3f89a6596015fbb4af.tar.zst re3-4f36a1fb770653f26dd4fb3f89a6596015fbb4af.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/Pickups.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index 5186a8d2..8f589ad3 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -1675,4 +1675,20 @@ CPed::CreateDeadPedPickupCoors(float *x, float *y, float *z) *y = GetPosition().y; *z = GetPosition().z + 0.4f; #undef NUMBER_OF_ATTEMPTS -}
\ No newline at end of file +} + +float CPickups::GetValue(int index) +{ + int i = GetActualPickupIndex(index); + if (i == -1) + return 0.0f; + return aPickUps[i].m_fRevenue; +} + +void CPickups::SetValue(int index, float value) +{ + int i = GetActualPickupIndex(index); + if (i == -1) + return; + aPickUps[i].m_fRevenue = value; +} |