forked from mirrors/kolyah35-minecraft-pe-0.6.1
FIX: crash while joining to large world server
This commit is contained in:
parent
b73f7f121d
commit
3ebed84cdb
4 changed files with 4 additions and 3 deletions
|
|
@ -1137,6 +1137,7 @@ bool Minecraft::supportNonTouchScreen() {
|
||||||
}
|
}
|
||||||
void Minecraft::init()
|
void Minecraft::init()
|
||||||
{
|
{
|
||||||
|
LevelChunk::ChunkBlockCount = LevelConstants::CHUNK_BLOCK_COUNT;
|
||||||
#ifndef STANDALONE_SERVER
|
#ifndef STANDALONE_SERVER
|
||||||
checkGlError("Init enter");
|
checkGlError("Init enter");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ void ClientSideNetworkHandler::handle(const RakNet::RakNetGUID& source, StartGam
|
||||||
LevelConstants::CHUNK_CACHE_WIDTH = packet->chunkCacheWidth;
|
LevelConstants::CHUNK_CACHE_WIDTH = packet->chunkCacheWidth;
|
||||||
LevelConstants::LEVEL_WIDTH = LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_WIDTH;
|
LevelConstants::LEVEL_WIDTH = LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_WIDTH;
|
||||||
LevelConstants::LEVEL_DEPTH = LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_DEPTH;
|
LevelConstants::LEVEL_DEPTH = LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_DEPTH;
|
||||||
|
LevelChunk::ChunkBlockCount = LevelConstants::CHUNK_BLOCK_COUNT;
|
||||||
}
|
}
|
||||||
NumRequestChunks = LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_CACHE_WIDTH;
|
NumRequestChunks = LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_CACHE_WIDTH;
|
||||||
requestNextChunkIndexList.resize(NumRequestChunks);
|
requestNextChunkIndexList.resize(NumRequestChunks);
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
/*static*/
|
/*static*/
|
||||||
bool LevelChunk::touchedSky = false;
|
bool LevelChunk::touchedSky = false;
|
||||||
const int LevelChunk::ChunkBlockCount = LevelConstants::CHUNK_BLOCK_COUNT;
|
int LevelChunk::ChunkBlockCount;
|
||||||
|
|
||||||
LevelChunk::LevelChunk( Level* level, int x, int z )
|
LevelChunk::LevelChunk( Level* level, int x, int z )
|
||||||
: level(level),
|
: level(level),
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ private:
|
||||||
void recalcHeight(int x, int yStart, int z);
|
void recalcHeight(int x, int yStart, int z);
|
||||||
public:
|
public:
|
||||||
static bool touchedSky;
|
static bool touchedSky;
|
||||||
static const int ChunkBlockCount;
|
static int ChunkBlockCount;
|
||||||
const int ChunkSize = ChunkBlockCount;
|
const int ChunkSize = ChunkBlockCount;
|
||||||
static const int UpdateMapBitShift = 4; // power of (LevelConstants::LEVEL_HEIGHT / 8) == 16
|
static const int UpdateMapBitShift = 4; // power of (LevelConstants::LEVEL_HEIGHT / 8) == 16
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue