diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-12-28 07:05:52 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-12-28 07:05:52 +0100 |
commit | af7ee903fb0a0ee53ea6784cf565b7e2bc016983 (patch) | |
tree | 4a13cc655ed39731a837be69791e507ad0cf51c6 /ProtoProxy | |
parent | cPickup now uses full cItem, instead of a pointer (diff) | |
download | cuberite-af7ee903fb0a0ee53ea6784cf565b7e2bc016983.tar cuberite-af7ee903fb0a0ee53ea6784cf565b7e2bc016983.tar.gz cuberite-af7ee903fb0a0ee53ea6784cf565b7e2bc016983.tar.bz2 cuberite-af7ee903fb0a0ee53ea6784cf565b7e2bc016983.tar.lz cuberite-af7ee903fb0a0ee53ea6784cf565b7e2bc016983.tar.xz cuberite-af7ee903fb0a0ee53ea6784cf565b7e2bc016983.tar.zst cuberite-af7ee903fb0a0ee53ea6784cf565b7e2bc016983.zip |
Diffstat (limited to 'ProtoProxy')
-rw-r--r-- | ProtoProxy/Connection.cpp | 17 | ||||
-rw-r--r-- | ProtoProxy/Connection.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/ProtoProxy/Connection.cpp b/ProtoProxy/Connection.cpp index 7aac27fd4..0f5963587 100644 --- a/ProtoProxy/Connection.cpp +++ b/ProtoProxy/Connection.cpp @@ -131,6 +131,7 @@ enum PACKET_ENTITY_TELEPORT = 0x22,
PACKET_ENTITY_HEAD_LOOK = 0x23,
PACKET_ENTITY_STATUS = 0x26,
+ PACKET_ATTACH_ENTITY = 0x27,
PACKET_ENTITY_METADATA = 0x28,
PACKET_ENTITY_EFFECT = 0x29,
PACKET_ENTITY_EFFECT_REMOVE = 0x2a,
@@ -587,6 +588,7 @@ bool cConnection::DecodeServersPackets(const char * a_Data, int a_Size) Log("Decoding server's packets, there are now %d bytes in the queue; next packet is 0x%x", m_ServerBuffer.GetReadableSpace(), PacketType);
switch (PacketType)
{
+ case PACKET_ATTACH_ENTITY: HANDLE_SERVER_READ(HandleServerAttachEntity); break;
case PACKET_BLOCK_ACTION: HANDLE_SERVER_READ(HandleServerBlockAction); break;
case PACKET_BLOCK_CHANGE: HANDLE_SERVER_READ(HandleServerBlockChange); break;
case PACKET_CHANGE_GAME_STATE: HANDLE_SERVER_READ(HandleServerChangeGameState); break;
@@ -1054,6 +1056,21 @@ bool cConnection::HandleClientWindowClose(void) +bool cConnection::HandleServerAttachEntity(void)
+{
+ HANDLE_SERVER_PACKET_READ(ReadBEInt, int, EntityID);
+ HANDLE_SERVER_PACKET_READ(ReadBEInt, int, VehicleID);
+ Log("Received a PACKET_ATTACH_ENTITY from the server:");
+ Log(" EntityID = %d (0x%x)", EntityID, EntityID);
+ Log(" VehicleID = %d (0x%x)", VehicleID, VehicleID);
+ COPY_TO_CLIENT();
+ return true;
+}
+
+
+
+
+
bool cConnection::HandleServerBlockAction(void)
{
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, BlockX);
diff --git a/ProtoProxy/Connection.h b/ProtoProxy/Connection.h index 54cc7ef71..b7c24d853 100644 --- a/ProtoProxy/Connection.h +++ b/ProtoProxy/Connection.h @@ -121,6 +121,7 @@ protected: bool HandleClientWindowClose(void);
// Packet handling, server-side:
+ bool HandleServerAttachEntity(void);
bool HandleServerBlockAction(void);
bool HandleServerBlockChange(void);
bool HandleServerChangeGameState(void);
|