MCPcopy Create free account
hub / github.com/ddnet/ddnet / IsValidSwitchTile

Function IsValidSwitchTile

src/game/mapitems.cpp:97–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97bool IsValidSwitchTile(int Index)
98{
99 return (
100 Index == TILE_JUMP ||
101 Index == TILE_FREEZE ||
102 Index == TILE_DFREEZE ||
103 Index == TILE_DUNFREEZE ||
104 Index == TILE_LFREEZE ||
105 Index == TILE_LUNFREEZE ||
106 Index == TILE_HIT_ENABLE ||
107 Index == TILE_HIT_DISABLE ||
108 (Index >= TILE_SWITCHTIMEDOPEN && Index <= TILE_SWITCHCLOSE) ||
109 Index == TILE_ADD_TIME ||
110 Index == TILE_SUBTRACT_TIME ||
111 Index == TILE_ALLOW_TELE_GUN ||
112 Index == TILE_ALLOW_BLUE_TELE_GUN ||
113 (IsValidEntity(Index) && Index >= ENTITY_OFFSET + ENTITY_ARMOR_1));
114}
115
116bool IsSwitchTileFlagsUsed(int Index)
117{

Callers 7

IsValidTileFunction · 0.85
BrushGrabMethod · 0.85
IsEmptyMethod · 0.85
BrushDrawMethod · 0.85
FillSelectionMethod · 0.85
LoadMethod · 0.85

Calls 1

IsValidEntityFunction · 0.85

Tested by

no test coverage detected