diff --git a/src/engine/server/server.h b/src/engine/server/server.h index 8dea385da..91bec87e9 100644 --- a/src/engine/server/server.h +++ b/src/engine/server/server.h @@ -15,7 +15,7 @@ class CSnapIDPool { enum { - MAX_IDS = 16*1024, + MAX_IDS = 32*1024, }; class CID diff --git a/src/game/collision.cpp b/src/game/collision.cpp index 14473c990..b8c8a879e 100644 --- a/src/game/collision.cpp +++ b/src/game/collision.cpp @@ -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; }