mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Removed unneeded vars - fixed logical condition (#29)
This commit is contained in:
parent
43842691fe
commit
ef7a843fa3
@ -1356,16 +1356,12 @@ 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($diffY >= -$yS or $diffY <= $yS){
|
||||
$diffY = 0;
|
||||
if(-$yS <= $dy and $dy <= $yS){
|
||||
$dy = 0;
|
||||
}
|
||||
|
||||
$diff = ($diffX ** 2 + $diffY ** 2 + $diffZ ** 2) / ($tickDiff ** 2);
|
||||
$diff = ($dx ** 2 + $dy ** 2 + $dz ** 2) / ($tickDiff ** 2);
|
||||
|
||||
if($this->isSurvival()){
|
||||
if(!$revert and !$this->isSleeping()){
|
||||
|
Loading…
x
Reference in New Issue
Block a user