diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-25 10:24:59 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-25 10:24:59 +0200 |
commit | e0d5919b75799a8907ec3be763792301c71ec0fc (patch) | |
tree | 0a89e423fb068d667c6be10a06b99729f0baec9a /src/Mobs/Behaviors/BehaviorCoward.cpp | |
parent | Cow crash fix (diff) | |
download | cuberite-e0d5919b75799a8907ec3be763792301c71ec0fc.tar cuberite-e0d5919b75799a8907ec3be763792301c71ec0fc.tar.gz cuberite-e0d5919b75799a8907ec3be763792301c71ec0fc.tar.bz2 cuberite-e0d5919b75799a8907ec3be763792301c71ec0fc.tar.lz cuberite-e0d5919b75799a8907ec3be763792301c71ec0fc.tar.xz cuberite-e0d5919b75799a8907ec3be763792301c71ec0fc.tar.zst cuberite-e0d5919b75799a8907ec3be763792301c71ec0fc.zip |
Diffstat (limited to 'src/Mobs/Behaviors/BehaviorCoward.cpp')
-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; } |