summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Vehicle.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-16 22:06:33 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-16 22:06:33 +0200
commitb587d835e8d31c1e61b3eadbced099326c156644 (patch)
tree816f2c3f5a435a18a233de931518bca257a12a31 /src/vehicles/Vehicle.cpp
parentgangs, script and replay fixes (diff)
downloadre3-b587d835e8d31c1e61b3eadbced099326c156644.tar
re3-b587d835e8d31c1e61b3eadbced099326c156644.tar.gz
re3-b587d835e8d31c1e61b3eadbced099326c156644.tar.bz2
re3-b587d835e8d31c1e61b3eadbced099326c156644.tar.lz
re3-b587d835e8d31c1e61b3eadbced099326c156644.tar.xz
re3-b587d835e8d31c1e61b3eadbced099326c156644.tar.zst
re3-b587d835e8d31c1e61b3eadbced099326c156644.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Vehicle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index e457f964..df8c71b0 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -1080,14 +1080,14 @@ CVehicle::SetDriver(CPed *driver)
if(bFreebies && driver == FindPlayerPed()){
if(GetModelIndex() == MI_AMBULAN)
- FindPlayerPed()->m_fHealth = Min(FindPlayerPed()->m_fHealth + 20.0f, 100.0f);
+ FindPlayerPed()->m_fHealth = Min(FindPlayerPed()->m_fHealth + 20.0f, CWorld::Players[0].m_nMaxHealth);
else if(GetModelIndex() == MI_TAXI)
CWorld::Players[CWorld::PlayerInFocus].m_nMoney += 25;
else if (GetModelIndex() == MI_POLICE) {
CStreaming::RequestModel(WEAPONTYPE_SHOTGUN, STREAMFLAGS_DONT_REMOVE);
driver->GiveWeapon(WEAPONTYPE_SHOTGUN, 5);
} else if (GetModelIndex() == MI_ENFORCER)
- driver->m_fArmour = Max(driver->m_fArmour, 100.0f);
+ driver->m_fArmour = Max(driver->m_fArmour, CWorld::Players[0].m_nMaxArmour);
else if(GetModelIndex() == MI_CABBIE || GetModelIndex() == MI_ZEBRA) // TODO(MIAMI): check zebra
CWorld::Players[CWorld::PlayerInFocus].m_nMoney += 25;
bFreebies = false;