mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-15 04:28:20 +00:00
Fix incorrect rendering of menu and entities background maps
Load the map images for the menu and entities background maps before the respective map layers. Otherwise, the total number of images is `0` when loading the layers, which causes the images of tiles and quads layers to be considered invalid during the initialization, which results in the wrong tile/quad memory layout being used. Regression from #9213.
This commit is contained in:
parent
50d8dfeb6a
commit
1ceb7d0212
|
@ -80,9 +80,11 @@ void CBackground::LoadBackground()
|
||||||
|
|
||||||
if(m_Loaded)
|
if(m_Loaded)
|
||||||
{
|
{
|
||||||
CMapLayers::OnMapLoad();
|
|
||||||
if(NeedImageLoading)
|
if(NeedImageLoading)
|
||||||
|
{
|
||||||
m_pImages->LoadBackground(m_pLayers, m_pMap);
|
m_pImages->LoadBackground(m_pLayers, m_pMap);
|
||||||
|
}
|
||||||
|
CMapLayers::OnMapLoad();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,8 +256,8 @@ void CMenuBackground::LoadMenuBackground(bool HasDayHint, bool HasNightHint)
|
||||||
{
|
{
|
||||||
m_pLayers->Init(m_pMap, true);
|
m_pLayers->Init(m_pMap, true);
|
||||||
|
|
||||||
CMapLayers::OnMapLoad();
|
|
||||||
m_pImages->LoadBackground(m_pLayers, m_pMap);
|
m_pImages->LoadBackground(m_pLayers, m_pMap);
|
||||||
|
CMapLayers::OnMapLoad();
|
||||||
|
|
||||||
// look for custom positions
|
// look for custom positions
|
||||||
CMapItemLayerTilemap *pTLayer = m_pLayers->GameLayer();
|
CMapItemLayerTilemap *pTLayer = m_pLayers->GameLayer();
|
||||||
|
|
Loading…
Reference in a new issue