summaryrefslogtreecommitdiffstats
path: root/src/peds/EmergencyPed.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-15 04:11:02 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-15 04:11:02 +0100
commitf76dfaee82c0573518d247f7d5666151ccfed765 (patch)
treee2a4357d5b50c4648fb1ee88963ec1d95c67e357 /src/peds/EmergencyPed.cpp
parentMerge pull request #882 from GTAmodding/ShFil119-patch-1 (diff)
downloadre3-f76dfaee82c0573518d247f7d5666151ccfed765.tar
re3-f76dfaee82c0573518d247f7d5666151ccfed765.tar.gz
re3-f76dfaee82c0573518d247f7d5666151ccfed765.tar.bz2
re3-f76dfaee82c0573518d247f7d5666151ccfed765.tar.lz
re3-f76dfaee82c0573518d247f7d5666151ccfed765.tar.xz
re3-f76dfaee82c0573518d247f7d5666151ccfed765.tar.zst
re3-f76dfaee82c0573518d247f7d5666151ccfed765.zip
Diffstat (limited to 'src/peds/EmergencyPed.cpp')
-rw-r--r--src/peds/EmergencyPed.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/peds/EmergencyPed.cpp b/src/peds/EmergencyPed.cpp
index 8d6999c3..65aa97ef 100644
--- a/src/peds/EmergencyPed.cpp
+++ b/src/peds/EmergencyPed.cpp
@@ -100,7 +100,7 @@ CEmergencyPed::FiremanAI(void)
case EMERGENCY_PED_READY:
nearestFire = gFireManager.FindNearestFire(GetPosition(), &fireDist);
if (nearestFire) {
- m_nPedState = PED_NONE;
+ SetPedState(PED_NONE);
SetSeek(nearestFire->m_vecPos, 1.0f);
SetMoveState(PEDMOVE_RUN);
m_nEmergencyPedState = EMERGENCY_PED_DETERMINE_NEXT_STATE;
@@ -114,7 +114,7 @@ CEmergencyPed::FiremanAI(void)
case EMERGENCY_PED_DETERMINE_NEXT_STATE:
nearestFire = gFireManager.FindNearestFire(GetPosition(), &fireDist);
if (nearestFire && nearestFire != m_pAttendedFire) {
- m_nPedState = PED_NONE;
+ SetPedState(PED_NONE);
SetSeek(nearestFire->m_vecPos, 1.0f);
SetMoveState(PEDMOVE_RUN);
#ifdef FIX_BUGS
@@ -160,7 +160,7 @@ CEmergencyPed::FiremanAI(void)
#endif
--m_pAttendedFire->m_nFiremenPuttingOut;
- m_nPedState = PED_NONE;
+ SetPedState(PED_NONE);
SetWanderPath(CGeneral::GetRandomNumber() & 7);
m_pAttendedFire = nil;
m_nEmergencyPedState = EMERGENCY_PED_READY;
@@ -307,7 +307,7 @@ CEmergencyPed::MedicAI(void)
} else {
m_pRevivedPed->m_bloodyFootprintCountOrDeathTime = CTimer::GetTimeInMilliseconds();
SetMoveState(PEDMOVE_STILL);
- m_nPedState = PED_CPR;
+ SetPedState(PED_CPR);
m_nLastPedState = PED_CPR;
SetLookFlag(m_pRevivedPed, 0);
SetLookTimer(500);
@@ -366,12 +366,12 @@ CEmergencyPed::MedicAI(void)
break;
}
m_nEmergencyPedState = EMERGENCY_PED_STOP_CPR;
- m_nPedState = PED_NONE;
+ SetPedState(PED_NONE);
SetMoveState(PEDMOVE_WALK);
m_pVehicleAnim = nil;
if (!m_pRevivedPed->bBodyPartJustCameOff) {
m_pRevivedPed->m_fHealth = 100.0f;
- m_pRevivedPed->m_nPedState = PED_NONE;
+ m_pRevivedPed->SetPedState(PED_NONE);
m_pRevivedPed->m_nLastPedState = PED_WANDER_PATH;
m_pRevivedPed->SetGetUp();
m_pRevivedPed->bUsesCollision = true;
@@ -400,7 +400,7 @@ CEmergencyPed::MedicAI(void)
break;
case EMERGENCY_PED_STOP:
m_bStartedToCPR = false;
- m_nPedState = PED_NONE;
+ SetPedState(PED_NONE);
if (m_pAttendedAccident) {
m_pAttendedAccident->m_pVictim = nil;
--m_pAttendedAccident->m_nMedicsAttending;