this is messed up

This commit is contained in:
GreYFoXGTi 2010-11-04 21:33:03 +02:00
parent 9feef5638e
commit 3db7db558f

View file

@ -236,6 +236,11 @@ int CCollision::GetTile(int x, int y)
{
int nx = clamp(x/32, 0, m_Width-1);
int ny = clamp(y/32, 0, m_Height-1);
if(!m_pTiles || ny < 0 || nx < 0)
{
//dbg_msg("Collision","Something is terribly wrong, !m_pTiles %d, ny %d, ny %d", !m_pTiles, ny, ny);
return 0;
}
/*dbg_msg("GetTile","m_Index %d",m_pTiles[ny*m_Width+nx].m_Index);//Remove */
if(m_pTiles[ny*m_Width+nx].m_Index == COLFLAG_SOLID
|| m_pTiles[ny*m_Width+nx].m_Index == (COLFLAG_SOLID|COLFLAG_NOHOOK)