Split the name for signed and unsigned int writing in cProtocol.
Hopefully this fixes compilation problems with 64-bit debian ( http://forum.mc-server.org/showthread.php?tid=575 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@940 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
4f34704ce8
commit
6c186ff02a
@ -126,7 +126,7 @@ protected:
|
|||||||
SendData((const char *)&a_Value, 4);
|
SendData((const char *)&a_Value, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WriteInt(unsigned int a_Value)
|
void WriteUInt(unsigned int a_Value)
|
||||||
{
|
{
|
||||||
a_Value = htonl(a_Value);
|
a_Value = htonl(a_Value);
|
||||||
SendData((const char *)&a_Value, 4);
|
SendData((const char *)&a_Value, 4);
|
||||||
|
@ -167,12 +167,12 @@ void cProtocol125::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockV
|
|||||||
WriteInt (a_ChunkX);
|
WriteInt (a_ChunkX);
|
||||||
WriteInt (a_ChunkZ);
|
WriteInt (a_ChunkZ);
|
||||||
WriteShort((unsigned short)a_Changes.size());
|
WriteShort((unsigned short)a_Changes.size());
|
||||||
WriteInt (sizeof(int) * a_Changes.size());
|
WriteUInt (sizeof(int) * a_Changes.size());
|
||||||
for (sSetBlockVector::const_iterator itr = a_Changes.begin(), end = a_Changes.end(); itr != end; ++itr)
|
for (sSetBlockVector::const_iterator itr = a_Changes.begin(), end = a_Changes.end(); itr != end; ++itr)
|
||||||
{
|
{
|
||||||
unsigned int Coords = itr->y | (itr->z << 8) | (itr->x << 12);
|
unsigned int Coords = itr->y | (itr->z << 8) | (itr->x << 12);
|
||||||
unsigned int Blocks = itr->BlockMeta | (itr->BlockType << 4);
|
unsigned int Blocks = itr->BlockMeta | (itr->BlockType << 4);
|
||||||
WriteInt(Coords << 16 | Blocks);
|
WriteUInt(Coords << 16 | Blocks);
|
||||||
}
|
}
|
||||||
Flush();
|
Flush();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user