diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-12-15 05:11:45 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-12-15 05:11:45 +0200 |
commit | 8f2abc675035f1c864308e77b78906d4f6bedd24 (patch) | |
tree | 16ea2aa95ac68dc75cc237749780200c110c457f /src/peds | |
parent | e970e5f2464cb782888264d0a07bae91c79afcf1 (diff) |
fix
Diffstat (limited to 'src/peds')
-rw-r--r-- | src/peds/CopPed.cpp | 2 | ||||
-rw-r--r-- | src/peds/Ped.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp index 5f5a80b1..9684794a 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()) - SetPedState(PED_ARRESTED); + suspect->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 d7abcf0c..d63a4d22 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -812,8 +812,7 @@ CPed::RestorePreviousState(void) SetWanderPath(m_nPedState == PED_FOLLOW_PATH ? m_nPathDir : CGeneral::GetRandomNumber() & 7); break; default: - PedState oldState = m_nLastPedState; - SetPedState(oldState); + SetPedState(m_nLastPedState); SetMoveState((eMoveState) m_nPrevMoveState); break; } @@ -1602,7 +1601,7 @@ CPed::ClearAll(void) return; SetPedState(PED_NONE); - m_nMoveState = PEDMOVE_NONE; + SetMoveState(PEDMOVE_NONE); m_pSeekTarget = nil; m_vecSeekPos = CVector(0.0f, 0.0f, 0.0f); m_fleeFromPos = CVector2D(0.0f, 0.0f); |