summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-15 02:25:05 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-15 02:25:05 +0100
commitab3e258f19808641dde8940622d1fadb33ed18cb (patch)
tree0df30be50812691b8915e8c0653f12dd38886f6f /src
parentFix language initialization call order (diff)
downloadre3-ab3e258f19808641dde8940622d1fadb33ed18cb.tar
re3-ab3e258f19808641dde8940622d1fadb33ed18cb.tar.gz
re3-ab3e258f19808641dde8940622d1fadb33ed18cb.tar.bz2
re3-ab3e258f19808641dde8940622d1fadb33ed18cb.tar.lz
re3-ab3e258f19808641dde8940622d1fadb33ed18cb.tar.xz
re3-ab3e258f19808641dde8940622d1fadb33ed18cb.tar.zst
re3-ab3e258f19808641dde8940622d1fadb33ed18cb.zip
Diffstat (limited to 'src')
-rw-r--r--src/control/Phones.cpp6
-rw-r--r--src/control/Script5.cpp2
-rw-r--r--src/peds/CivilianPed.cpp2
-rw-r--r--src/peds/CopPed.cpp2
-rw-r--r--src/peds/Ped.cpp2
-rw-r--r--src/peds/PedAI.cpp6
6 files changed, 10 insertions, 10 deletions
diff --git a/src/control/Phones.cpp b/src/control/Phones.cpp
index edbfe6c2..cc80360d 100644
--- a/src/control/Phones.cpp
+++ b/src/control/Phones.cpp
@@ -58,7 +58,7 @@ CPhoneInfo::Update(void)
} else {
CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_PHONE);
if (player->m_nPedState == PED_MAKE_CALL)
- player->m_nPedState = PED_IDLE;
+ player->SetPedState(PED_IDLE);
}
}
bool notInCar;
@@ -105,7 +105,7 @@ CPhoneInfo::Update(void)
player->m_fRotationCur = angleToFace;
player->m_fRotationDest = angleToFace;
player->SetHeading(angleToFace);
- player->m_nPedState = PED_MAKE_CALL;
+ player->SetPedState(PED_MAKE_CALL);
CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_PHONE);
TheCamera.SetWideScreenOn();
playerInfo->MakePlayerSafe(true);
@@ -333,7 +333,7 @@ PhonePutDownCB(CAnimBlendAssociation *assoc, void *arg)
ped->bUpdateAnimHeading = true;
if (ped->m_nPedState == PED_MAKE_CALL)
- ped->m_nPedState = PED_IDLE;
+ ped->SetPedState(PED_IDLE);
}
void
diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp
index 1f47c9b9..3fa416f8 100644
--- a/src/control/Script5.cpp
+++ b/src/control/Script5.cpp
@@ -2125,7 +2125,7 @@ void CTheScripts::CleanUpThisPed(CPed* pPed)
if (pPed->m_nPedState == PED_FOLLOW_PATH && state != PED_FOLLOW_PATH)
pPed->ClearFollowPath();
- pPed->m_nPedState = state;
+ pPed->SetPedState(state);
pPed->SetMoveState(ms);
}
--CPopulation::ms_nTotalMissionPeds;
diff --git a/src/peds/CivilianPed.cpp b/src/peds/CivilianPed.cpp
index a024b77a..079024f6 100644
--- a/src/peds/CivilianPed.cpp
+++ b/src/peds/CivilianPed.cpp
@@ -314,7 +314,7 @@ CCivilianPed::ProcessControl(void)
for (int j = 0; j < m_numNearPeds; ++j) {
CPed *nearPed = m_nearPeds[j];
if (nearPed->m_nPedType == m_nPedType && nearPed->m_nPedState == PED_WANDER_PATH) {
- nearPed->m_nPedState = PED_UNKNOWN;
+ nearPed->SetPedState(PED_UNKNOWN);
}
}
}
diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp
index 33b44d3e..5f5a80b1 100644
--- a/src/peds/CopPed.cpp
+++ b/src/peds/CopPed.cpp
@@ -249,7 +249,7 @@ CCopPed::ArrestPlayer(void)
CPed *suspect = (CPed*)m_pSeekTarget;
if (suspect) {
if (suspect->CanSetPedState())
- suspect->m_nPedState = PED_ARRESTED;
+ SetPedState(PED_ARRESTED);
if (suspect->bInVehicle && m_pMyVehicle && suspect->m_pMyVehicle == m_pMyVehicle) {
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 3c1fc552..1bf31a58 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -7070,7 +7070,7 @@ CPed::SetEvasiveDive(CPhysical *reason, uint8 onlyRandomJump)
ClearLookFlag();
ClearAimFlag();
SetStoredState();
- m_nPedState = PED_DIVE_AWAY;
+ SetPedState(PED_DIVE_AWAY);
animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_EV_DIVE, 8.0f);
animAssoc->SetFinishCallback(PedEvadeCB, this);
}
diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp
index ecd11098..88d0a091 100644
--- a/src/peds/PedAI.cpp
+++ b/src/peds/PedAI.cpp
@@ -5290,7 +5290,7 @@ CPed::SetEnterTrain(CVehicle *train, uint32 unused)
m_pMyVehicle = train;
m_pMyVehicle->RegisterReference((CEntity **) &m_pMyVehicle);
- m_nPedState = PED_ENTER_TRAIN;
+ SetPedState(PED_ENTER_TRAIN);
m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_TRAIN_GETIN, 4.0f);
m_pVehicleAnim->SetFinishCallback(PedSetInTrainCB, this);
bUsesCollision = false;
@@ -5364,7 +5364,7 @@ CPed::SetExitTrain(CVehicle* train)
CVector exitPos;
GetNearestTrainPedPosition(train, exitPos);
*/
- m_nPedState = PED_EXIT_TRAIN;
+ SetPedState(PED_EXIT_TRAIN);
m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_TRAIN_GETOUT, 4.0f);
m_pVehicleAnim->SetFinishCallback(PedSetOutTrainCB, this);
bUsesCollision = false;
@@ -5390,7 +5390,7 @@ CPed::PedSetOutTrainCB(CAnimBlendAssociation *animAssoc, void *arg)
ped->bUsesCollision = true;
ped->m_pVehicleAnim = nil;
ped->bInVehicle = false;
- ped->m_nPedState = PED_IDLE;
+ ped->SetPedState(PED_IDLE);
ped->RestorePreviousObjective();
ped->SetMoveState(PEDMOVE_STILL);