mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-11 20:11:18 +03:00
* Fix bad ordering in the PlaceBlockPacket.
This commit is contained in:
@@ -211,8 +211,6 @@ void ServerSideNetworkHandler::handle(const RakNet::RakNetGUID& guid, MovePlayer
|
||||
|
||||
void ServerSideNetworkHandler::handle(const RakNet::RakNetGUID& guid, PlaceBlockPacket* packet)
|
||||
{
|
||||
puts_ignorable("PlaceBlockPacket");
|
||||
|
||||
Mob* pMob = (Mob*)m_pLevel->getEntity(packet->m_playerID);
|
||||
if (!pMob)
|
||||
return;
|
||||
@@ -223,6 +221,8 @@ void ServerSideNetworkHandler::handle(const RakNet::RakNetGUID& guid, PlaceBlock
|
||||
int y = packet->m_y;
|
||||
int z = packet->m_z;
|
||||
|
||||
printf_ignorable("PlaceBlockPacket: %d", tile);
|
||||
|
||||
if (!m_pLevel->mayPlace(tile, x, y, z, true))
|
||||
return;
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ void PlaceBlockPacket::write(RakNet::BitStream* bs)
|
||||
bs->Write(m_x);
|
||||
bs->Write(m_z);
|
||||
bs->Write(m_y);
|
||||
bs->Write(m_tile);
|
||||
bs->Write(m_face);
|
||||
bs->Write(m_tile);
|
||||
}
|
||||
|
||||
void PlaceBlockPacket::read(RakNet::BitStream* bs)
|
||||
@@ -30,6 +30,6 @@ void PlaceBlockPacket::read(RakNet::BitStream* bs)
|
||||
bs->Read(m_x);
|
||||
bs->Read(m_z);
|
||||
bs->Read(m_y);
|
||||
bs->Read(m_tile);
|
||||
bs->Read(m_face);
|
||||
bs->Read(m_tile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user