diff options
-rw-r--r-- | src/Mobs/Behaviors/BehaviorCoward.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Mobs/Behaviors/BehaviorCoward.cpp b/src/Mobs/Behaviors/BehaviorCoward.cpp index c3afec67a..852a12e6c 100644 --- a/src/Mobs/Behaviors/BehaviorCoward.cpp +++ b/src/Mobs/Behaviors/BehaviorCoward.cpp @@ -41,19 +41,16 @@ bool cBehaviorCoward::ControlStarting(std::chrono::milliseconds a_Dt, cChunk & a { UNUSED(a_Dt); UNUSED(a_Chunk); - m_Parent->SetSpeed(m_Parent->GetSpeed() * 2); + m_Parent->SetRelativeWalkSpeed(m_Parent->GetRelativeWalkSpeed() * 2); return true; } - - - bool cBehaviorCoward::ControlEnding(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { UNUSED(a_Dt); UNUSED(a_Chunk); - m_Parent->SetSpeed(m_Parent->GetSpeed() / 2); + m_Parent->SetRelativeWalkSpeed(m_Parent->GetRelativeWalkSpeed() / 2); return true; } |