Server dislike this map, but dont crash. Closes #12

This commit is contained in:
btd 2010-10-08 23:09:54 +04:00
parent 3e97ff2863
commit 9de4dad6ac
2 changed files with 6 additions and 3 deletions

View file

@ -15,7 +15,7 @@ class CSnapIDPool
{
enum
{
MAX_IDS = 16*1024,
MAX_IDS = 32*1024,
};
class CID

View file

@ -237,8 +237,11 @@ int CCollision::GetFTile(int x, int y)
int CCollision::Entity(int x, int y, bool Front)
{
/*if((0 < x || x >= m_Width) || (0 < y || y >= m_Height))
dbg_msg("CCollision::Entity","Something is VERY wrong please report this at github");*/
if((0 < x || x >= m_Width) || (0 < y || y >= m_Height))
{
dbg_msg("CCollision::Entity","Something is VERY wrong please report this at github");
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;
}