summaryrefslogtreecommitdiffstats
path: root/src/core/PlayerInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/PlayerInfo.cpp')
-rw-r--r--src/core/PlayerInfo.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp
index 09b3a499..3c01a176 100644
--- a/src/core/PlayerInfo.cpp
+++ b/src/core/PlayerInfo.cpp
@@ -140,20 +140,27 @@ CPlayerInfo::Clear(void)
m_nUpsideDownCounter = 0;
m_bInfiniteSprint = false;
m_bFastReload = false;
+ m_nMaxHealth = m_nMaxArmour = 100;
m_bGetOutOfJailFree = false;
m_bGetOutOfHospitalFree = false;
+ m_bDriveByAllowed = true;
m_nPreviousTimeRewardedForExplosion = 0;
m_nExplosionsSinceLastReward = 0;
+ m_nHavocLevel = 0;
+ m_fMediaAttention = 0;
+ m_nCurrentBustedAudio = 1;
+ m_nBustedAudioStatus = BUSTEDAUDIO_NONE;
}
void
-CPlayerInfo::BlowUpRCBuggy(void)
+CPlayerInfo::BlowUpRCBuggy(bool actually)
{
if (!m_pRemoteVehicle || m_pRemoteVehicle->bRemoveFromWorld)
return;
CRemote::TakeRemoteControlledCarFromPlayer();
- m_pRemoteVehicle->BlowUpCar(FindPlayerPed());
+ if (actually)
+ m_pRemoteVehicle->BlowUpCar(FindPlayerPed());
}
void
@@ -171,7 +178,6 @@ void
CPlayerInfo::MakePlayerSafe(bool toggle)
{
if (toggle) {
- CTheScripts::ResetCountdownToMakePlayerUnsafe();
m_pPed->m_pWanted->m_bIgnoredByEveryone = true;
CWorld::StopAllLawEnforcersInTheirTracks();
CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_PLAYERINFO);
@@ -192,7 +198,8 @@ CPlayerInfo::MakePlayerSafe(bool toggle)
CWorld::ExtinguishAllCarFiresInArea(GetPos(), 4000.0f);
CReplay::DisableReplays();
- } else if (!CGame::playingIntro && !CTheScripts::IsCountdownToMakePlayerUnsafeOn()) {
+ }
+ else {
m_pPed->m_pWanted->m_bIgnoredByEveryone = false;
CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_PLAYERINFO);
m_pPed->bBulletProof = false;
@@ -348,7 +355,7 @@ CPlayerInfo::Process(void)
bool startTaxiTimer = true;
if (m_bUnusedTaxiThing && m_pPed->bInVehicle) {
CVehicle *veh = m_pPed->m_pMyVehicle;
- if ((veh->GetModelIndex() == MI_TAXI || veh->GetModelIndex() == MI_CABBIE || veh->GetModelIndex() == MI_BORGNINE)
+ if (veh->IsTaxi()
&& veh->pDriver == m_pPed && veh->m_nNumPassengers != 0) {
for (uint32 timePassed = CTimer::GetTimeInMilliseconds() - m_nUnusedTaxiTimer; timePassed >= 1000; m_nUnusedTaxiTimer += 1000) {
timePassed -= 1000;