Fixed swimming and gliding for PlayerAuthInputPacket

This commit is contained in:
Dylan K. Taylor 2021-12-19 17:31:47 +00:00
parent d41f933e7b
commit 18e26d975b
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -201,7 +201,14 @@ class InGamePacketHandler extends PacketHandler{
if($sprinting !== null){
$this->player->toggleSprint($sprinting);
}
//TODO: swimming, gliding
$swimming = $this->resolveOnOffInputFlags($packet, PlayerAuthInputFlags::START_SWIMMING, PlayerAuthInputFlags::STOP_SWIMMING);
if($swimming !== null){
$this->player->toggleSwim($swimming);
}
$gliding = $this->resolveOnOffInputFlags($packet, PlayerAuthInputFlags::START_GLIDING, PlayerAuthInputFlags::STOP_GLIDING);
if($gliding !== null){
$this->player->toggleGlide($gliding);
}
//TODO: this packet has WAYYYYY more useful information that we're not using
$this->player->handleMovement($newPos);