summaryrefslogtreecommitdiffstats
path: root/src/control/Pickups.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-01-18 20:19:30 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-01-18 20:19:30 +0100
commitc09297997e9878f06e6cd513e26cbbe50ae860fb (patch)
tree810b97cfd49a9c3b43a3a3f1803d2e04f9c87ce9 /src/control/Pickups.cpp
parentMerge branch 'lcs' into lcs-dev (diff)
downloadre3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar.gz
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar.bz2
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar.lz
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar.xz
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.tar.zst
re3-c09297997e9878f06e6cd513e26cbbe50ae860fb.zip
Diffstat (limited to '')
-rw-r--r--src/control/Pickups.cpp18
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;
+}