summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs')
-rw-r--r--src/Mobs/Monster.cpp12
-rw-r--r--src/Mobs/Monster.h1
-rw-r--r--src/Mobs/SnowGolem.cpp2
3 files changed, 14 insertions, 1 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index b49a8661d..86ff522d8 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -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)
diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h
index 1dd302cdc..714feddb9 100644
--- a/src/Mobs/Monster.h
+++ b/src/Mobs/Monster.h
@@ -91,6 +91,7 @@ public:
virtual void KilledBy(cEntity * a_Killer) override;
virtual void MoveToPosition(const Vector3f & a_Position);
+ virtual void MoveToPosition(const Vector3d & a_Position); // tolua_export
virtual bool ReachedDestination(void);
// tolua_begin
diff --git a/src/Mobs/SnowGolem.cpp b/src/Mobs/SnowGolem.cpp
index 06021cca5..c60103055 100644
--- a/src/Mobs/SnowGolem.cpp
+++ b/src/Mobs/SnowGolem.cpp
@@ -29,7 +29,7 @@ void cSnowGolem::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cSnowGolem::Tick(float a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
- if (IsBiomeNoDownfall((EMCSBiome) m_World->GetBiomeAt((int) floor(GetPosX()), (int) floor(GetPosZ())) ))
+ if (IsBiomeNoDownfall(m_World->GetBiomeAt((int) floor(GetPosX()), (int) floor(GetPosZ())) ))
{
TakeDamage(*this);
}