aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Movement/PathGenerator.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp
index 38a2e7a10c7..d6912bac7c8 100644
--- a/src/server/game/Movement/PathGenerator.cpp
+++ b/src/server/game/Movement/PathGenerator.cpp
@@ -270,8 +270,16 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
{
for (; pathStartIndex < _polyLength; ++pathStartIndex)
{
- // here to carch few bugs
- ASSERT(_pathPolyRefs[pathStartIndex] != INVALID_POLYREF);
+ // here to catch few bugs
+ if (_pathPolyRefs[pathStartIndex] == INVALID_POLYREF)
+ {
+ TC_LOG_ERROR("maps", "Invalid poly ref in BuildPolyPath. _polyLength: %u, pathStartIndex: %u,"
+ " startPos: %s, endPos: %s, mapid: %u",
+ _polyLength, pathStartIndex, startPos.toString().c_str(), endPos.toString().c_str(),
+ _sourceUnit->GetMapId());
+
+ break;
+ }
if (_pathPolyRefs[pathStartIndex] == startPoly)
{