MCPcopy Create free account
hub / github.com/cuberite/cuberite / CreateMap

Method CreateMap

src/MapManager.cpp:79–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78
79cMap * cMapManager::CreateMap(int a_CenterX, int a_CenterY, int a_Scale)
80{
81 cCSLock Lock(m_CS);
82
83 if (m_MapData.size() >= 65536)
84 {
85 LOGWARN("Could not craft map - Too many maps in use");
86 return NULL;
87 }
88
89 cMap Map(m_MapData.size(), a_CenterX, a_CenterY, m_World, a_Scale);
90
91 m_MapData.push_back(Map);
92
93 return &m_MapData[Map.GetID()];
94}
95
96
97

Callers 1

OnItemUseMethod · 0.80

Calls 3

LOGWARNFunction · 0.85
sizeMethod · 0.80
GetIDMethod · 0.80

Tested by

no test coverage detected