Fix incorrect packet ID for PlayerPositionAndLookPacket.
Fix: PlayerPositionAndLookPacket.apply() does not correctly restrict angles.
This commit is contained in:
1 parent
991f0b3da6
commit
2cf1d3cb03
1 file changed
+4
-4
@@ -343,8 +343,8 @@ class ChatMessagePacket(Packet):
|
|||||||
class PlayerPositionAndLookPacket(Packet):
|
class PlayerPositionAndLookPacket(Packet):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_id(context):
|
def get_id(context):
|
||||||
return 0x2F if context.protocol_version >= 318 else \
|
return 0x2E if context.protocol_version >= 318 else \
|
||||||
0x2E if context.protocol_version >= 107 else \
|
0x2F if context.protocol_version >= 107 else \
|
||||||
0x08
|
0x08
|
||||||
|
|
||||||
packet_name = "player position and look"
|
packet_name = "player position and look"
|
||||||
@@ -399,8 +399,8 @@ class PlayerPositionAndLookPacket(Packet):
|
|||||||
else:
|
else:
|
||||||
target.pitch = self.pitch
|
target.pitch = self.pitch
|
||||||
|
|
||||||
self.yaw %= 360
|
target.yaw %= 360
|
||||||
self.pitch %= 360
|
target.pitch %= 360
|
||||||
|
|
||||||
|
|
||||||
class DisconnectPacketPlayState(Packet):
|
class DisconnectPacketPlayState(Packet):
|
||||||
|
|||||||
Reference in new issue
Block a user