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

Method ContainsElementWithId

src/game/editor/mapitems/layer_switch.cpp:346–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346bool CLayerSwitch::ContainsElementWithId(int Id) const
347{
348 for(int y = 0; y < m_Height; ++y)
349 {
350 for(int x = 0; x < m_Width; ++x)
351 {
352 if(IsSwitchTileNumberUsed(m_pSwitchTile[y * m_Width + x].m_Type) && m_pSwitchTile[y * m_Width + x].m_Number == Id)
353 {
354 return true;
355 }
356 }
357 }
358
359 return false;
360}
361
362void CLayerSwitch::GetPos(int Number, int Offset, ivec2 &SwitchPos)
363{

Callers

nothing calls this directly

Calls 1

IsSwitchTileNumberUsedFunction · 0.85

Tested by

no test coverage detected