summaryrefslogtreecommitdiffstats
path: root/src/control/Pickups.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-10-26 16:20:31 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-10-26 16:20:31 +0200
commit3dee880c2941417c9e5ec42297da65f27ab9c5ca (patch)
tree93f0daf6f0fdc04fb2898a202157d3d9ec078ffb /src/control/Pickups.cpp
parentscript 500-599 (diff)
parentFix hornPatternsArray (diff)
downloadre3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar
re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar.gz
re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar.bz2
re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar.lz
re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar.xz
re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.tar.zst
re3-3dee880c2941417c9e5ec42297da65f27ab9c5ca.zip
Diffstat (limited to 'src/control/Pickups.cpp')
-rw-r--r--src/control/Pickups.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index e095ec8e..91fd889c 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -47,6 +47,7 @@ uint8 aWeaponBlues[] = { 0, 0, 255, 0, 255, 255, 0, 128, 255, 0, 255, 0, 128, 25
float aWeaponScale[] = { 1.0f, 2.0f, 1.5f, 1.0f, 1.0f, 1.5f, 1.0f, 2.0f, 1.0f, 2.0f, 2.5f, 1.0f, 1.0f, 1.0f, 1.0f };
WRAPPER void CPacManPickups::Render(void) { EAXJMP(0x432F60); }
+WRAPPER void CPacManPickups::Update(void) { EAXJMP(0x432800); }
void
@@ -296,7 +297,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
m_pObject->UpdateRwFrame();
bool touched = false;
- for (int32 i = CPools::GetVehiclePool()->GetSize(); i > 0; i--) { // TODO: check if i > 0 is not a R* mistake
+ for (int32 i = CPools::GetVehiclePool()->GetSize()-1; i >= 0; i--) {
CVehicle *vehicle = CPools::GetVehiclePool()->GetSlot(i);
if (vehicle != nil && vehicle->IsSphereTouchingVehicle(m_pObject->GetPosition().x, m_pObject->GetPosition().y, m_pObject->GetPosition().z, 1.5f)) {
touched = true;
@@ -323,7 +324,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
if (CTimer::GetTimeInMilliseconds() > m_nTimer)
explode = true;
else {// added else here since vehicle lookup is useless
- for (int32 i = CPools::GetVehiclePool()->GetSize(); i > 0; i--) { // TODO: check if i > 0 is not a R* mistake
+ for (int32 i = CPools::GetVehiclePool()->GetSize()-1; i >= 0; i--) {
CVehicle *vehicle = CPools::GetVehiclePool()->GetSlot(i);
if (vehicle != nil && vehicle->IsSphereTouchingVehicle(m_pObject->GetPosition().x, m_pObject->GetPosition().y, m_pObject->GetPosition().z, 1.5f)) {
explode = true;