summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-08-25 10:24:59 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2017-08-25 10:24:59 +0200
commite0d5919b75799a8907ec3be763792301c71ec0fc (patch)
tree0a89e423fb068d667c6be10a06b99729f0baec9a
parentCow crash fix (diff)
downloadcuberite-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
-rw-r--r--src/Mobs/Behaviors/BehaviorCoward.cpp7
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;
}