Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
@@ -65,7 +65,7 @@ MultiPlayerChunkCache::MultiPlayerChunkCache(Level *level)
|
||||
{
|
||||
if( y >= 3 )
|
||||
{
|
||||
static_cast<WaterLevelChunk *>(waterChunk)->setLevelChunkBrightness(LightLayer::Sky,x,y,z,15);
|
||||
((WaterLevelChunk *)waterChunk)->setLevelChunkBrightness(LightLayer::Sky,x,y,z,15);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,18 +77,18 @@ MultiPlayerChunkCache::MultiPlayerChunkCache(Level *level)
|
||||
{
|
||||
if( y >= ( level->getSeaLevel() - 1 ) )
|
||||
{
|
||||
static_cast<WaterLevelChunk *>(waterChunk)->setLevelChunkBrightness(LightLayer::Sky,x,y,z,15);
|
||||
((WaterLevelChunk *)waterChunk)->setLevelChunkBrightness(LightLayer::Sky,x,y,z,15);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<WaterLevelChunk *>(waterChunk)->setLevelChunkBrightness(LightLayer::Sky,x,y,z,2);
|
||||
((WaterLevelChunk *)waterChunk)->setLevelChunkBrightness(LightLayer::Sky,x,y,z,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
waterChunk = nullptr;
|
||||
waterChunk = NULL;
|
||||
}
|
||||
|
||||
this->level = level;
|
||||
@@ -132,7 +132,7 @@ bool MultiPlayerChunkCache::reallyHasChunk(int x, int z)
|
||||
int idx = ix * XZSIZE + iz;
|
||||
|
||||
LevelChunk *chunk = cache[idx];
|
||||
if( chunk == nullptr )
|
||||
if( chunk == NULL )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ LevelChunk *MultiPlayerChunkCache::create(int x, int z)
|
||||
LevelChunk *chunk = cache[idx];
|
||||
LevelChunk *lastChunk = chunk;
|
||||
|
||||
if( chunk == nullptr )
|
||||
if( chunk == NULL )
|
||||
{
|
||||
EnterCriticalSection(&m_csLoadCreate);
|
||||
|
||||
@@ -174,7 +174,7 @@ LevelChunk *MultiPlayerChunkCache::create(int x, int z)
|
||||
if( g_NetworkManager.IsHost() ) // force here to disable sharing of data
|
||||
{
|
||||
// 4J-JEV: We are about to use shared data, abort if the server is stopped and the data is deleted.
|
||||
if (MinecraftServer::getInstance()->serverHalted()) return nullptr;
|
||||
if (MinecraftServer::getInstance()->serverHalted()) return NULL;
|
||||
|
||||
// If we're the host, then don't create the chunk, share data from the server's copy
|
||||
#ifdef _LARGE_WORLDS
|
||||
@@ -248,7 +248,7 @@ LevelChunk *MultiPlayerChunkCache::getChunk(int x, int z)
|
||||
int idx = ix * XZSIZE + iz;
|
||||
|
||||
LevelChunk *chunk = cache[idx];
|
||||
if( chunk == nullptr )
|
||||
if( chunk == NULL )
|
||||
{
|
||||
return emptyChunk;
|
||||
}
|
||||
@@ -279,12 +279,12 @@ void MultiPlayerChunkCache::postProcess(ChunkSource *parent, int x, int z)
|
||||
|
||||
vector<Biome::MobSpawnerData *> *MultiPlayerChunkCache::getMobsAt(MobCategory *mobCategory, int x, int y, int z)
|
||||
{
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TilePos *MultiPlayerChunkCache::findNearestMapFeature(Level *level, const wstring &featureName, int x, int y, int z)
|
||||
{
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void MultiPlayerChunkCache::recreateLogicStructuresForChunk(int chunkX, int chunkZ)
|
||||
@@ -294,7 +294,7 @@ void MultiPlayerChunkCache::recreateLogicStructuresForChunk(int chunkX, int chun
|
||||
wstring MultiPlayerChunkCache::gatherStats()
|
||||
{
|
||||
EnterCriticalSection(&m_csLoadCreate);
|
||||
int size = static_cast<int>(loadedChunkList.size());
|
||||
int size = (int)loadedChunkList.size();
|
||||
LeaveCriticalSection(&m_csLoadCreate);
|
||||
return L"MultiplayerChunkCache: " + std::to_wstring(size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user