small pathfind speedup: validate coords only with debug definition

svn-id: r26788
This commit is contained in:
Andrew Kurushin 2007-05-08 16:09:47 +00:00
parent 5c3f6721b8
commit 21412b821c

View File

@ -622,15 +622,19 @@ private:
(testPoint.y < 0) || (testPoint.y >= _yCellCount));
}
void setPathCell(const Point &testPoint, int8 value) {
#ifdef ACTOR_DEBUG
if (!validPathCellPoint(testPoint)) {
error("Actor::setPathCell wrong point");
}
#endif
_pathCell[testPoint.x + testPoint.y * _xCellCount] = value;
}
int8 getPathCell(const Point &testPoint) {
#ifdef ACTOR_DEBUG
if (!validPathCellPoint(testPoint)) {
error("Actor::getPathCell wrong point");
}
#endif
return _pathCell[testPoint.x + testPoint.y * _xCellCount];
}
bool scanPathLine(const Point &point1, const Point &point2);