mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
Fixed rendering of maps like Hardcore_02
Since the game layers are allowed only once, there is not way for this to run twice
This commit is contained in:
parent
7e6f6465b7
commit
7e19f1bca3
|
@ -40,13 +40,6 @@ void CLayers::Init(class IKernel *pKernel)
|
||||||
{
|
{
|
||||||
CMapItemLayerTilemap *pTilemap = reinterpret_cast<CMapItemLayerTilemap *>(pLayer);
|
CMapItemLayerTilemap *pTilemap = reinterpret_cast<CMapItemLayerTilemap *>(pLayer);
|
||||||
|
|
||||||
if(pTilemap->m_Version <= 2)
|
|
||||||
{
|
|
||||||
pTilemap->m_Switch = *((int*)(pTilemap) + 18);
|
|
||||||
pTilemap->m_Front = *((int*)(pTilemap) + 17);
|
|
||||||
pTilemap->m_Speedup = *((int*)(pTilemap) + 16);
|
|
||||||
pTilemap->m_Tele = *((int*)(pTilemap) + 15);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pTilemap->m_Flags&TILESLAYERFLAG_GAME)
|
if(pTilemap->m_Flags&TILESLAYERFLAG_GAME)
|
||||||
{
|
{
|
||||||
|
@ -71,13 +64,37 @@ void CLayers::Init(class IKernel *pKernel)
|
||||||
//break;
|
//break;
|
||||||
}
|
}
|
||||||
if(pTilemap->m_Flags&TILESLAYERFLAG_TELE)
|
if(pTilemap->m_Flags&TILESLAYERFLAG_TELE)
|
||||||
|
{
|
||||||
|
if(pTilemap->m_Version <= 2)
|
||||||
|
{
|
||||||
|
pTilemap->m_Tele = *((int*)(pTilemap) + 15);
|
||||||
|
}
|
||||||
m_pTeleLayer = pTilemap;
|
m_pTeleLayer = pTilemap;
|
||||||
|
}
|
||||||
if(pTilemap->m_Flags&TILESLAYERFLAG_SPEEDUP)
|
if(pTilemap->m_Flags&TILESLAYERFLAG_SPEEDUP)
|
||||||
|
{
|
||||||
|
if(pTilemap->m_Version <= 2)
|
||||||
|
{
|
||||||
|
pTilemap->m_Speedup = *((int*)(pTilemap) + 16);
|
||||||
|
}
|
||||||
m_pSpeedupLayer = pTilemap;
|
m_pSpeedupLayer = pTilemap;
|
||||||
|
}
|
||||||
if(pTilemap->m_Flags&TILESLAYERFLAG_FRONT)
|
if(pTilemap->m_Flags&TILESLAYERFLAG_FRONT)
|
||||||
|
{
|
||||||
|
if(pTilemap->m_Version <= 2)
|
||||||
|
{
|
||||||
|
pTilemap->m_Front = *((int*)(pTilemap) + 17);
|
||||||
|
}
|
||||||
m_pFrontLayer = pTilemap;
|
m_pFrontLayer = pTilemap;
|
||||||
|
}
|
||||||
if(pTilemap->m_Flags&TILESLAYERFLAG_SWITCH)
|
if(pTilemap->m_Flags&TILESLAYERFLAG_SWITCH)
|
||||||
|
{
|
||||||
|
if(pTilemap->m_Version <= 2)
|
||||||
|
{
|
||||||
|
pTilemap->m_Switch = *((int*)(pTilemap) + 18);
|
||||||
|
}
|
||||||
m_pSwitchLayer = pTilemap;
|
m_pSwitchLayer = pTilemap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue