summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ProtoProxy/Connection.cpp17
-rw-r--r--ProtoProxy/Connection.h1
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);