diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-09-23 17:56:42 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-09-23 17:56:42 +0200 |
commit | 45eddd63adaea3bbfa97bcb9559f1e95ddad2a42 (patch) | |
tree | 81f86442e8295ff44d6bdb71ed8f719fba3306aa /ProtoProxy | |
parent | Restored resource files from vc2010 into vc2008 (diff) | |
download | cuberite-45eddd63adaea3bbfa97bcb9559f1e95ddad2a42.tar cuberite-45eddd63adaea3bbfa97bcb9559f1e95ddad2a42.tar.gz cuberite-45eddd63adaea3bbfa97bcb9559f1e95ddad2a42.tar.bz2 cuberite-45eddd63adaea3bbfa97bcb9559f1e95ddad2a42.tar.lz cuberite-45eddd63adaea3bbfa97bcb9559f1e95ddad2a42.tar.xz cuberite-45eddd63adaea3bbfa97bcb9559f1e95ddad2a42.tar.zst cuberite-45eddd63adaea3bbfa97bcb9559f1e95ddad2a42.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 89045568a..219daa504 100644 --- a/ProtoProxy/Connection.cpp +++ b/ProtoProxy/Connection.cpp @@ -512,6 +512,7 @@ bool cConnection::DecodeClientsPackets(const char * a_Data, int a_Size) case PACKET_KEEPALIVE: HANDLE_CLIENT_READ(HandleClientKeepAlive); break;
case PACKET_LOCALE_AND_VIEW: HANDLE_CLIENT_READ(HandleClientLocaleAndView); break;
case PACKET_PING: HANDLE_CLIENT_READ(HandleClientPing); break;
+ case PACKET_PLAYER_ABILITIES: HANDLE_CLIENT_READ(HandleClientPlayerAbilities); break;
case PACKET_PLAYER_LOOK: HANDLE_CLIENT_READ(HandleClientPlayerLook); break;
case PACKET_PLAYER_ON_GROUND: HANDLE_CLIENT_READ(HandleClientPlayerOnGround); break;
case PACKET_PLAYER_POSITION: HANDLE_CLIENT_READ(HandleClientPlayerPosition); break;
@@ -838,6 +839,22 @@ bool cConnection::HandleClientPing(void) +bool cConnection::HandleClientPlayerAbilities(void)
+{
+ HANDLE_CLIENT_PACKET_READ(ReadChar, char, IsInvulnerable);
+ HANDLE_CLIENT_PACKET_READ(ReadChar, char, IsFlying);
+ HANDLE_CLIENT_PACKET_READ(ReadChar, char, CanFly);
+ HANDLE_CLIENT_PACKET_READ(ReadChar, char, IsInstaMine);
+ Log("Receives a PACKET_PLAYER_ABILITIES from the client:");
+ Log(" Flags = %d, %d, %d, %d", IsInvulnerable, IsFlying, CanFly, IsInstaMine);
+ COPY_TO_SERVER();
+ return true;
+}
+
+
+
+
+
bool cConnection::HandleClientPlayerLook(void)
{
HANDLE_CLIENT_PACKET_READ(ReadBEFloat, float, Yaw);
diff --git a/ProtoProxy/Connection.h b/ProtoProxy/Connection.h index 8fc665b4e..995e45deb 100644 --- a/ProtoProxy/Connection.h +++ b/ProtoProxy/Connection.h @@ -107,6 +107,7 @@ protected: bool HandleClientKeepAlive(void);
bool HandleClientLocaleAndView(void);
bool HandleClientPing(void);
+ bool HandleClientPlayerAbilities(void);
bool HandleClientPlayerLook(void);
bool HandleClientPlayerOnGround(void);
bool HandleClientPlayerPosition(void);
|