summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-15 04:11:45 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-15 04:11:45 +0100
commit8f2abc675035f1c864308e77b78906d4f6bedd24 (patch)
tree16ea2aa95ac68dc75cc237749780200c110c457f /src/peds/Ped.cpp
parentUse SetMoveState (diff)
downloadre3-8f2abc675035f1c864308e77b78906d4f6bedd24.tar
re3-8f2abc675035f1c864308e77b78906d4f6bedd24.tar.gz
re3-8f2abc675035f1c864308e77b78906d4f6bedd24.tar.bz2
re3-8f2abc675035f1c864308e77b78906d4f6bedd24.tar.lz
re3-8f2abc675035f1c864308e77b78906d4f6bedd24.tar.xz
re3-8f2abc675035f1c864308e77b78906d4f6bedd24.tar.zst
re3-8f2abc675035f1c864308e77b78906d4f6bedd24.zip
Diffstat (limited to 'src/peds/Ped.cpp')
-rw-r--r--src/peds/Ped.cpp5
1 files changed, 2 insertions, 3 deletions
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);