Skip to content

Commit ea7a4ab

Browse files
authored
Merge pull request ddnet#9235 from Robyt3/Editor-Map-MakeVersion-Cleanup
Remove obsolete and broken `MakeVersion` function for map items
2 parents 0573d7d + 887dab1 commit ea7a4ab

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/game/editor/mapitems/map_io.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@
1515
#include "image.h"
1616
#include "sound.h"
1717

18-
template<typename T>
19-
static int MakeVersion(int i, const T &v)
20-
{
21-
return (i << 16) + sizeof(T);
22-
}
23-
2418
// compatibility with old sound layers
2519
struct CSoundSource_DEPRECATED
2620
{
@@ -853,15 +847,6 @@ bool CEditorMap::Load(const char *pFileName, int StorageType, const std::functio
853847
void *pData = DataFile.GetData(pTilemapItem->m_Data);
854848
unsigned int Size = DataFile.GetDataSize(pTilemapItem->m_Data);
855849
pTiles->ExtractTiles(pTilemapItem->m_Version, (CTile *)pData, Size);
856-
857-
if(pTiles->m_Game && pTilemapItem->m_Version == MakeVersion(1, *pTilemapItem))
858-
{
859-
for(int i = 0; i < pTiles->m_Width * pTiles->m_Height; i++)
860-
{
861-
if(pTiles->m_pTiles[i].m_Index)
862-
pTiles->m_pTiles[i].m_Index += ENTITY_OFFSET;
863-
}
864-
}
865850
DataFile.UnloadData(pTilemapItem->m_Data);
866851
}
867852
}

0 commit comments

Comments
 (0)