Skip to content

Commit

Permalink
Use CLayer::IsEntitiesLayer function to avoid duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
Robyt3 committed Oct 24, 2024
1 parent 5a716ae commit a93cba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/editor/mapitems/layer_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void CLayerGroup::Render()

for(auto &pLayer : m_vpLayers)
{
if(pLayer->m_Visible && pLayer->m_Type == LAYERTYPE_TILES && pLayer != m_pMap->m_pGameLayer && pLayer != m_pMap->m_pFrontLayer && pLayer != m_pMap->m_pTeleLayer && pLayer != m_pMap->m_pSpeedupLayer && pLayer != m_pMap->m_pSwitchLayer && pLayer != m_pMap->m_pTuneLayer)
if(pLayer->m_Visible && pLayer->m_Type == LAYERTYPE_TILES && !pLayer->IsEntitiesLayer())
{
std::shared_ptr<CLayerTiles> pTiles = std::static_pointer_cast<CLayerTiles>(pLayer);
if(pTiles->m_Game || pTiles->m_Front || pTiles->m_Tele || pTiles->m_Speedup || pTiles->m_Tune || pTiles->m_Switch)
Expand Down

0 comments on commit a93cba1

Please sign in to comment.