mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Grids): Crash fix (#22347)
This commit is contained in:
@@ -172,8 +172,8 @@ namespace Acore
|
||||
template<class RET_TYPE, int CENTER_VAL>
|
||||
inline RET_TYPE Compute(float x, float y, float size)
|
||||
{
|
||||
int gx = (int)(CENTER_VAL - x / size);
|
||||
int gy = (int)(CENTER_VAL - y / size);
|
||||
int gx = std::max<int>(0, (CENTER_VAL - x / size));
|
||||
int gy = std::max<int>(0, (CENTER_VAL - y / size));
|
||||
|
||||
return RET_TYPE(gx, gy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user