summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-13 11:40:55 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-13 11:40:55 +0200
commitdfce9595e9cd3cdd9043805de5dfd3b16abfc868 (patch)
tree460daedc7aba89aefdc1f53a06458b0d41e4b56c
parentAdded delayed ticking to Lua API (diff)
downloadcuberite-dfce9595e9cd3cdd9043805de5dfd3b16abfc868.tar
cuberite-dfce9595e9cd3cdd9043805de5dfd3b16abfc868.tar.gz
cuberite-dfce9595e9cd3cdd9043805de5dfd3b16abfc868.tar.bz2
cuberite-dfce9595e9cd3cdd9043805de5dfd3b16abfc868.tar.lz
cuberite-dfce9595e9cd3cdd9043805de5dfd3b16abfc868.tar.xz
cuberite-dfce9595e9cd3cdd9043805de5dfd3b16abfc868.tar.zst
cuberite-dfce9595e9cd3cdd9043805de5dfd3b16abfc868.zip
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 ec6886242..b0f63493b 100644
--- a/ProtoProxy/Connection.cpp
+++ b/ProtoProxy/Connection.cpp
@@ -114,6 +114,7 @@ enum
PACKET_BLOCK_PLACE = 0x0f,
PACKET_SLOT_SELECT = 0x10,
PACKET_ANIMATION = 0x12,
+ PACKET_ENTITY_ACTION = 0x13,
PACKET_SPAWN_PICKUP = 0x15,
PACKET_COLLECT_PICKUP = 0x16,
PACKET_SPAWN_OBJECT_VEHICLE = 0x17,
@@ -508,6 +509,7 @@ bool cConnection::DecodeClientsPackets(const char * a_Data, int a_Size)
case PACKET_CLIENT_STATUSES: HANDLE_CLIENT_READ(HandleClientClientStatuses); break;
case PACKET_CREATIVE_INVENTORY_ACTION: HANDLE_CLIENT_READ(HandleClientCreativeInventoryAction); break;
case PACKET_ENCRYPTION_KEY_RESPONSE: HANDLE_CLIENT_READ(HandleClientEncryptionKeyResponse); break;
+ case PACKET_ENTITY_ACTION: HANDLE_CLIENT_READ(HandleClientEntityAction); break;
case PACKET_HANDSHAKE: HANDLE_CLIENT_READ(HandleClientHandshake); break;
case PACKET_KEEPALIVE: HANDLE_CLIENT_READ(HandleClientKeepAlive); break;
case PACKET_LOCALE_AND_VIEW: HANDLE_CLIENT_READ(HandleClientLocaleAndView); break;
@@ -777,6 +779,21 @@ bool cConnection::HandleClientEncryptionKeyResponse(void)
+bool cConnection::HandleClientEntityAction(void)
+{
+ HANDLE_CLIENT_PACKET_READ(ReadBEInt, int, PlayerID);
+ HANDLE_CLIENT_PACKET_READ(ReadByte, Byte, ActionType);
+ Log("Received a PACKET_ENTITY_ACTION from the client:");
+ Log(" PlayerID = %d", PlayerID);
+ Log(" ActionType = %d", ActionType);
+ COPY_TO_SERVER();
+ return true;
+}
+
+
+
+
+
bool cConnection::HandleClientHandshake(void)
{
// Read the packet from the client:
diff --git a/ProtoProxy/Connection.h b/ProtoProxy/Connection.h
index cc132bca2..307076ed8 100644
--- a/ProtoProxy/Connection.h
+++ b/ProtoProxy/Connection.h
@@ -103,6 +103,7 @@ protected:
bool HandleClientClientStatuses(void);
bool HandleClientCreativeInventoryAction(void);
bool HandleClientEncryptionKeyResponse(void);
+ bool HandleClientEntityAction(void);
bool HandleClientHandshake(void);
bool HandleClientKeepAlive(void);
bool HandleClientLocaleAndView(void);