summaryrefslogtreecommitdiffstats
path: root/src/control/Pickups.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/control/Pickups.cpp')
-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 f6b1a9b9..f31d89b3 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -1739,4 +1739,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;
+}