mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #3052
3052: Fix virtual call in Constructor r=def- a=Jupeyy Co-authored-by: Jupeyy <jupjopjap@gmail.com>
This commit is contained in:
commit
80ee8ff823
|
@ -17,8 +17,6 @@ CBackground::CBackground(int MapType, bool OnlineOnly) :
|
|||
m_pBackgroundLayers = m_pLayers;
|
||||
m_pImages = new CMapImages;
|
||||
m_pBackgroundImages = m_pImages;
|
||||
m_pBackgroundMap = CreateBGMap();
|
||||
m_pMap = m_pBackgroundMap;
|
||||
m_Loaded = false;
|
||||
m_aMapName[0] = '\0';
|
||||
m_LastLoad = 0;
|
||||
|
@ -37,6 +35,9 @@ CBackgroundEngineMap *CBackground::CreateBGMap()
|
|||
|
||||
void CBackground::OnInit()
|
||||
{
|
||||
m_pBackgroundMap = CreateBGMap();
|
||||
m_pMap = m_pBackgroundMap;
|
||||
|
||||
m_pImages->m_pClient = GameClient();
|
||||
Kernel()->RegisterInterface(m_pBackgroundMap);
|
||||
if(g_Config.m_ClBackgroundEntities[0] != '\0' && str_comp(g_Config.m_ClBackgroundEntities, CURRENT_MAP))
|
||||
|
|
|
@ -36,6 +36,9 @@ CBackgroundEngineMap *CMenuBackground::CreateBGMap()
|
|||
|
||||
void CMenuBackground::OnInit()
|
||||
{
|
||||
m_pBackgroundMap = CreateBGMap();
|
||||
m_pMap = m_pBackgroundMap;
|
||||
|
||||
m_IsInit = true;
|
||||
|
||||
m_pImages->m_pClient = GameClient();
|
||||
|
|
Loading…
Reference in a new issue