From 599ad97b65139ad450e6f89e39b787c881f76672 Mon Sep 17 00:00:00 2001 From: wiseoldman95 Date: Sun, 3 May 2015 09:45:27 +0300 Subject: PathFinder - Crash fix, chunks in parameters are now references --- src/Mobs/Monster.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Mobs/Monster.cpp') diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 9b9bec51e..bce8467ba 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -131,12 +131,12 @@ void cMonster::TickPathFinding(cChunk & a_Chunk) // Can someone explain why are these two NOT THE SAME??? // m_Path = new cPath(GetWorld(), GetPosition(), m_FinalDestination, 30); - m_Path = new cPath(&a_Chunk, Vector3d(floor(position.x), floor(position.y), floor(position.z)), Vector3d(floor(Dest.x), floor(Dest.y), floor(Dest.z)), 20); + m_Path = new cPath(a_Chunk, Vector3d(floor(position.x), floor(position.y), floor(position.z)), Vector3d(floor(Dest.x), floor(Dest.y), floor(Dest.z)), 20); m_IsFollowingPath = false; } - m_PathStatus = m_Path->Step(&a_Chunk); + m_PathStatus = m_Path->Step(a_Chunk); switch (m_PathStatus) { -- cgit v1.2.3