mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-29 06:39:51 +00:00
InGamePacketHandler: fix function ordering
This commit is contained in:
parent
33421258b6
commit
853ecd2408
@ -166,6 +166,12 @@ class InGamePacketHandler extends PacketHandler{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function handleMovePlayer(MovePlayerPacket $packet) : bool{
|
||||||
|
//The client sends this every time it lands on the ground, even when using PlayerAuthInputPacket.
|
||||||
|
//Silence the debug spam that this causes.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private function resolveOnOffInputFlags(PlayerAuthInputPacket $packet, int $startFlag, int $stopFlag) : ?bool{
|
private function resolveOnOffInputFlags(PlayerAuthInputPacket $packet, int $startFlag, int $stopFlag) : ?bool{
|
||||||
$enabled = $packet->hasFlag($startFlag);
|
$enabled = $packet->hasFlag($startFlag);
|
||||||
if($enabled !== $packet->hasFlag($stopFlag)){
|
if($enabled !== $packet->hasFlag($stopFlag)){
|
||||||
@ -175,12 +181,6 @@ class InGamePacketHandler extends PacketHandler{
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleMovePlayer(MovePlayerPacket $packet) : bool{
|
|
||||||
//The client sends this every time it lands on the ground, even when using PlayerAuthInputPacket.
|
|
||||||
//Silence the debug spam that this causes.
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function handlePlayerAuthInput(PlayerAuthInputPacket $packet) : bool{
|
public function handlePlayerAuthInput(PlayerAuthInputPacket $packet) : bool{
|
||||||
$rawPos = $packet->getPosition();
|
$rawPos = $packet->getPosition();
|
||||||
foreach([$rawPos->x, $rawPos->y, $rawPos->z, $packet->getYaw(), $packet->getHeadYaw(), $packet->getPitch()] as $float){
|
foreach([$rawPos->x, $rawPos->y, $rawPos->z, $packet->getYaw(), $packet->getHeadYaw(), $packet->getPitch()] as $float){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user