mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
This messed up movement
Revert "Removed unneeded vars - fixed logical condition (#29)" This reverts commit ef7a843fa3e0c0377ec0e8678da9f1b4e0484ddb.
This commit is contained in:
parent
bcc641a25a
commit
f3f853056a
@ -1356,12 +1356,16 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
|
||||
$this->move($dx, $dy, $dz);
|
||||
|
||||
$diffX = $this->x - $newPos->x;
|
||||
$diffY = $this->y - $newPos->y;
|
||||
$diffZ = $this->z - $newPos->z;
|
||||
|
||||
$yS = 0.5 + $this->ySize;
|
||||
if(-$yS <= $dy and $dy <= $yS){
|
||||
$dy = 0;
|
||||
if($diffY >= -$yS or $diffY <= $yS){
|
||||
$diffY = 0;
|
||||
}
|
||||
|
||||
$diff = ($dx ** 2 + $dy ** 2 + $dz ** 2) / ($tickDiff ** 2);
|
||||
$diff = ($diffX ** 2 + $diffY ** 2 + $diffZ ** 2) / ($tickDiff ** 2);
|
||||
|
||||
if($this->isSurvival()){
|
||||
if(!$revert and !$this->isSleeping()){
|
||||
|
Loading…
x
Reference in New Issue
Block a user