summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorAttacker.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-09-02 17:15:22 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2017-09-02 17:15:22 +0200
commit17c5d4e0c9532ac8381f098dc3629b3066e720ec (patch)
tree0da08711b16e4babf636b6c9dc7ee1e42db33410 /src/Mobs/Behaviors/BehaviorAttacker.cpp
parentImplemented creepers using Behaviors (diff)
downloadcuberite-17c5d4e0c9532ac8381f098dc3629b3066e720ec.tar
cuberite-17c5d4e0c9532ac8381f098dc3629b3066e720ec.tar.gz
cuberite-17c5d4e0c9532ac8381f098dc3629b3066e720ec.tar.bz2
cuberite-17c5d4e0c9532ac8381f098dc3629b3066e720ec.tar.lz
cuberite-17c5d4e0c9532ac8381f098dc3629b3066e720ec.tar.xz
cuberite-17c5d4e0c9532ac8381f098dc3629b3066e720ec.tar.zst
cuberite-17c5d4e0c9532ac8381f098dc3629b3066e720ec.zip
Diffstat (limited to 'src/Mobs/Behaviors/BehaviorAttacker.cpp')
-rw-r--r--src/Mobs/Behaviors/BehaviorAttacker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Mobs/Behaviors/BehaviorAttacker.cpp b/src/Mobs/Behaviors/BehaviorAttacker.cpp
index 0b6ce16f3..50ce8f6ad 100644
--- a/src/Mobs/Behaviors/BehaviorAttacker.cpp
+++ b/src/Mobs/Behaviors/BehaviorAttacker.cpp
@@ -101,7 +101,6 @@ void cBehaviorAttacker::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
if (TargetIsInStrikeRadius() && TargetIsInLineOfSight())
{
- m_Parent->StopMovingToPosition();
StrikeIfReady();
}
else
@@ -209,6 +208,7 @@ void cBehaviorAttacker::Strike()
m_IsStriking = true;
m_StrikeTickCnt = 0;
m_Parent->PinBehavior(this);
+ m_Parent->StopMovingToPosition();
}