summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r--src/Mobs/Monster.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 283ef36e6..be901ac61 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -69,20 +69,20 @@ cMonster::cMonster(const AString & a_ConfigName, eType a_MobType, const AString
: super(etMonster, a_Width, a_Height)
, m_EMState(IDLE)
, m_EMPersonality(AGGRESSIVE)
- , m_SightDistance(25)
, m_Target(NULL)
- , m_AttackRate(3)
- , m_IdleInterval(0)
, m_bMovingToDestination(false)
+ , m_LastGroundHeight(POSY_TOINT)
+ , m_IdleInterval(0)
, m_DestroyTimer(0)
, m_MobType(a_MobType)
, m_SoundHurt(a_SoundHurt)
, m_SoundDeath(a_SoundDeath)
+ , m_AttackRate(3)
, m_AttackDamage(1)
, m_AttackRange(2)
, m_AttackInterval(0)
+ , m_SightDistance(25)
, m_BurnsInDaylight(false)
- , m_LastGroundHeight(POSY_TOINT)
{
if (!a_ConfigName.empty())
{
@@ -191,6 +191,18 @@ void cMonster::MoveToPosition(const Vector3f & a_Position)
+
+void cMonster::MoveToPosition(const Vector3d & a_Position)
+{
+ FinishPathFinding();
+
+ m_FinalDestination = a_Position;
+ m_bMovingToDestination = true;
+ TickPathFinding();
+}
+
+
+
bool cMonster::IsCoordinateInTraversedList(Vector3i a_Coords)
{
for (std::vector<Vector3i>::const_iterator itr = m_TraversedCoordinates.begin(); itr != m_TraversedCoordinates.end(); ++itr)