|
@@ -479,11 +479,12 @@ CPathsInfo::~CPathsInfo()
|
|
|
delete [] nodes;
|
|
|
}
|
|
|
|
|
|
-const CGPathNode * CPathsInfo::getPathInfo( int3 tile ) const
|
|
|
+const CGPathNode * CPathsInfo::getPathInfo(const int3& tile) const
|
|
|
{
|
|
|
boost::unique_lock<boost::mutex> pathLock(pathMx);
|
|
|
|
|
|
- if(tile.x >= sizes.x || tile.y >= sizes.y || tile.z >= sizes.z)
|
|
|
+ if(tile.x >= sizes.x || tile.y >= sizes.y || tile.z >= sizes.z
|
|
|
+ || tile.x < 0 || tile.y < 0 || tile.z < 0)
|
|
|
return nullptr;
|
|
|
return &nodes[tile.x][tile.y][tile.z];
|
|
|
}
|