Add Checks. Koule XII loaded

This commit is contained in:
btd 2010-08-21 10:40:03 +04:00
parent 01dd26d750
commit 42f48a3b17

View file

@ -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;
}