mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-11-16 07:15:24 +01:00
Fix incorrect packet ID for PlayerPositionAndLookPacket.
Fix: PlayerPositionAndLookPacket.apply() does not correctly restrict angles.
This commit is contained in:
parent
991f0b3da6
commit
2cf1d3cb03
@ -343,8 +343,8 @@ class ChatMessagePacket(Packet):
|
||||
class PlayerPositionAndLookPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x2F if context.protocol_version >= 318 else \
|
||||
0x2E if context.protocol_version >= 107 else \
|
||||
return 0x2E if context.protocol_version >= 318 else \
|
||||
0x2F if context.protocol_version >= 107 else \
|
||||
0x08
|
||||
|
||||
packet_name = "player position and look"
|
||||
@ -399,8 +399,8 @@ class PlayerPositionAndLookPacket(Packet):
|
||||
else:
|
||||
target.pitch = self.pitch
|
||||
|
||||
self.yaw %= 360
|
||||
self.pitch %= 360
|
||||
target.yaw %= 360
|
||||
target.pitch %= 360
|
||||
|
||||
|
||||
class DisconnectPacketPlayState(Packet):
|
||||
|
Loading…
Reference in New Issue
Block a user