mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Add Checks. Koule XII loaded
This commit is contained in:
parent
01dd26d750
commit
42f48a3b17
|
@ -183,6 +183,8 @@ int CCollision::GetTile(int x, int y)
|
|||
}
|
||||
int CCollision::Entity(int x, int y, bool Front)
|
||||
{
|
||||
if(0 < x || x >= m_Width) return 0;
|
||||
if(0 < y || y >= m_Height) return 0;
|
||||
int Index = Front?m_pFront[y*m_Width+x].m_Index:m_pTiles[y*m_Width+x].m_Index;
|
||||
return Index-ENTITY_OFFSET;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue