mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-16 16:34:05 +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);
|
$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;
|
$yS = 0.5 + $this->ySize;
|
||||||
if($diffY >= -$yS or $diffY <= $yS){
|
if(-$yS <= $dy and $dy <= $yS){
|
||||||
$diffY = 0;
|
$dy = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$diff = ($diffX ** 2 + $diffY ** 2 + $diffZ ** 2) / ($tickDiff ** 2);
|
$diff = ($dx ** 2 + $dy ** 2 + $dz ** 2) / ($tickDiff ** 2);
|
||||||
|
|
||||||
if($this->isSurvival()){
|
if($this->isSurvival()){
|
||||||
if(!$revert and !$this->isSleeping()){
|
if(!$revert and !$this->isSleeping()){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user