mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
this is messed up
This commit is contained in:
parent
9feef5638e
commit
3db7db558f
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue