diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-02-27 21:03:57 +0100 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-02-27 21:03:57 +0100 |
commit | d5d28057710e078db3e23441ce2a5d521c2839a2 (patch) | |
tree | 1d199a61c6f3e826d8e85e587d6b3308566d2afc | |
parent | dd2746c8dbc95e6803a69b13365f790eb9de52bc (diff) |
Core/MMAPs: Replace an assert with error log
Replace an assert in PathGenerator::BuildPolyPath() about invalid poly reference with an error log.
Fixes #11493 .
-rw-r--r-- | src/server/game/Movement/PathGenerator.cpp | 12 |
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) { |