Player: removed an old hack for setFlying() feedback loop

this is no longer a concern, since we now check if the sent state matches the current state before doing anything, at multiple layers.
This commit is contained in:
Dylan K. Taylor 2021-12-29 18:41:11 +00:00
parent d94578a420
commit 5c994e4a24
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -1779,9 +1779,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
if($ev->isCancelled()){
return false;
}
//don't use setFlying() here, to avoid feedback loops - TODO: get rid of this hack
$this->flying = $fly;
$this->resetFallDistance();
$this->setFlying($fly);
return true;
}