1
0

Chunks are successfully streamed to clients (in a bad a slow way, but whatever)

Fixed respawn packet for 1.2.2

git-svn-id: http://mc-server.googlecode.com/svn/trunk@350 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
faketruth
2012-03-01 18:56:56 +00:00
parent d24c07a550
commit a2f6ab93b6
4 changed files with 49 additions and 5 deletions

View File

@@ -36,15 +36,23 @@ cPacket_MapChunk::cPacket_MapChunk(cChunk * a_Chunk)
m_UnusedInt = 0;
for( int i = 0; i < 16; ++i )
{
m_BitMap1 |= (1 << i);
}
unsigned int DataSize = 16 * (4096 + 2048 + 2048 + 2048);
char* AllData = new char[ DataSize ];
memset( AllData, 0, DataSize );
unsigned int iterator = 0;
for( int i = 0; i < 8; ++i ) // Old world is only 8 high
{
m_BitMap1 |= (1 << i);
for( int y = 0; y < 16; ++y ) for( int z = 0; z < 16; ++z ) for( int x = 0; x < 16; ++x )
{
AllData[iterator] = a_Chunk->GetBlock( x, y+i*16, z );
++iterator;
}
//iterator+=2048*2; // Ignore light and stuff
}
uLongf CompressedSize = compressBound( DataSize );
char * CompressedBlockData = new char[CompressedSize];