mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Grid: Fix crashes when closing up to the edge of a map.
Closes #5085
This commit is contained in:
@@ -215,7 +215,8 @@ namespace Trinity
|
||||
|
||||
inline bool IsValidMapCoord(float c)
|
||||
{
|
||||
return finite(c) && (std::fabs(c) <= MAP_HALFSIZE - 0.5f);
|
||||
//! Since we visit grids in circles, we cannot allow players to relocate to grids on the edge of a map - thus the use of CENTER_GRID_OFFSET
|
||||
return finite(c) && (std::fabs(c) <= MAP_HALFSIZE - CENTER_GRID_OFFSET - 0.5f);
|
||||
}
|
||||
|
||||
inline bool IsValidMapCoord(float x, float y)
|
||||
|
||||
Reference in New Issue
Block a user