Merge branch 'master' of github.com:ddnet/ddnet

This commit is contained in:
def 2016-04-30 18:00:08 +02:00
commit df12171040

View file

@ -2,8 +2,8 @@
bool IsValidGameTile(int Index)
{
return (IsValidEntity(Index)
|| Index == TILE_AIR
return (
Index == TILE_AIR
|| (Index >= TILE_SOLID && Index <= TILE_NOLASER)
|| Index == TILE_THROUGH
|| Index == TILE_FREEZE
@ -15,13 +15,14 @@ bool IsValidGameTile(int Index)
|| (Index >= TILE_NPC_END && Index <= TILE_NPH_END)
|| (Index >= TILE_NPC_START && Index <= TILE_NPH_START)
|| (Index >= TILE_ENTITIES_OFF_1 && Index <= TILE_ENTITIES_OFF_2)
|| IsValidEntity(Index)
);
}
bool IsValidFrontTile(int Index)
{
return (IsValidEntity(Index)
|| Index == TILE_AIR
return (
Index == TILE_AIR
|| Index == TILE_DEATH
|| (Index >= TILE_NOLASER && Index <= TILE_THROUGH)
|| Index == TILE_FREEZE
@ -32,10 +33,17 @@ bool IsValidFrontTile(int Index)
|| (Index >= TILE_OLDLASER && Index <= TILE_UNLOCK_TEAM)
|| (Index >= TILE_NPC_END && Index <= TILE_NPH_END)
|| (Index >= TILE_NPC_START && Index <= TILE_NPH_START)
|| IsValidEntity(Index)
);
}
bool IsValidEntity(int Index)
{
return Index > ENTITY_OFFSET;
Index -= ENTITY_OFFSET;
return (
(Index >= ENTITY_SPAWN && Index <= ENTITY_LASER_O_FAST)
|| (Index >= ENTITY_PLASMAE && Index <= ENTITY_CRAZY_SHOTGUN)
|| (Index >= ENTITY_DRAGGER_WEAK && Index <= ENTITY_DRAGGER_STRONG_NW)
|| Index == ENTITY_DOOR
);
}