summaryrefslogtreecommitdiffstats
path: root/src/Mobs/AggressiveMonster.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-01 13:47:48 +0200
committerMattes D <github@xoft.cz>2015-05-01 13:47:48 +0200
commitaa142757dbf34fca603799aaef2a4dc047b0bd14 (patch)
tree7caec55ca1792af1d0e3bcb7a8b44eeff65ac15f /src/Mobs/AggressiveMonster.cpp
parentMerge pull request #1924 from mc-server/BlockAreaCountNonAir (diff)
parentA* Pathfinding and better monster AI (diff)
downloadcuberite-aa142757dbf34fca603799aaef2a4dc047b0bd14.tar
cuberite-aa142757dbf34fca603799aaef2a4dc047b0bd14.tar.gz
cuberite-aa142757dbf34fca603799aaef2a4dc047b0bd14.tar.bz2
cuberite-aa142757dbf34fca603799aaef2a4dc047b0bd14.tar.lz
cuberite-aa142757dbf34fca603799aaef2a4dc047b0bd14.tar.xz
cuberite-aa142757dbf34fca603799aaef2a4dc047b0bd14.tar.zst
cuberite-aa142757dbf34fca603799aaef2a4dc047b0bd14.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/AggressiveMonster.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Mobs/AggressiveMonster.cpp b/src/Mobs/AggressiveMonster.cpp
index 526b39e39..d0fb79f6d 100644
--- a/src/Mobs/AggressiveMonster.cpp
+++ b/src/Mobs/AggressiveMonster.cpp
@@ -37,10 +37,7 @@ void cAggressiveMonster::InStateChasing(std::chrono::milliseconds a_Dt)
}
}
- if (!IsMovingToTargetPosition())
- {
- MoveToPosition(m_Target->GetPosition());
- }
+ MoveToPosition(m_Target->GetPosition());
}
}
@@ -100,7 +97,7 @@ void cAggressiveMonster::Attack(std::chrono::milliseconds a_Dt)
{
return;
}
-
+
// Setting this higher gives us more wiggle room for attackrate
m_AttackInterval = 0.0;
m_Target->TakeDamage(dtMobAttack, this, m_AttackDamage, 0);