mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Refactor entity bounds check
This commit is contained in:
parent
02086e4023
commit
ab73cc718f
|
@ -1030,7 +1030,7 @@ int CCollision::GetFTile(int x, int y) const
|
|||
|
||||
int CCollision::Entity(int x, int y, int Layer) const
|
||||
{
|
||||
if((0 > x || x >= m_Width) || (0 > y || y >= m_Height))
|
||||
if(x < 0 || x >= m_Width || y < 0 || y >= m_Height)
|
||||
{
|
||||
const char *pName;
|
||||
switch(Layer)
|
||||
|
|
Loading…
Reference in a new issue