From d5d28057710e078db3e23441ce2a5d521c2839a2 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Thu, 27 Feb 2014 21:03:57 +0100 Subject: Core/MMAPs: Replace an assert with error log Replace an assert in PathGenerator::BuildPolyPath() about invalid poly reference with an error log. Fixes #11493 . --- src/server/game/Movement/PathGenerator.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3