mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10705] Simplify CellArea calculation
This commit is contained in:
parent
7032423d6f
commit
b825c33cdf
5 changed files with 35 additions and 71 deletions
|
|
@ -121,6 +121,13 @@ struct MANGOS_DLL_DECL CoordPair
|
|||
y_coord = LIMIT - 1;
|
||||
}
|
||||
|
||||
CoordPair& normalize()
|
||||
{
|
||||
x_coord = std::min(x_coord, LIMIT);
|
||||
y_coord = std::min(y_coord, LIMIT);
|
||||
return *this;
|
||||
}
|
||||
|
||||
uint32 x_coord;
|
||||
uint32 y_coord;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue