mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-19 15:35:52 +00:00
Liquid: simplify code
This commit is contained in:
parent
ada37899aa
commit
9474324f75
@ -188,17 +188,17 @@ abstract class Liquid extends Transparent{
|
||||
|
||||
if($blockDecay >= 0){
|
||||
$realDecay = $blockDecay - ($decay - 8);
|
||||
$vX += ($x - $this->position->x) * $realDecay;
|
||||
$vY += ($y - $this->position->y) * $realDecay;
|
||||
$vZ += ($z - $this->position->z) * $realDecay;
|
||||
$vX += $dx * $realDecay;
|
||||
$vY += $dy * $realDecay;
|
||||
$vZ += $dz * $realDecay;
|
||||
}
|
||||
|
||||
continue;
|
||||
}else{
|
||||
$realDecay = $blockDecay - $decay;
|
||||
$vX += ($x - $this->position->x) * $realDecay;
|
||||
$vY += ($y - $this->position->y) * $realDecay;
|
||||
$vZ += ($z - $this->position->z) * $realDecay;
|
||||
$vX += $dx * $realDecay;
|
||||
$vY += $dy * $realDecay;
|
||||
$vZ += $dz * $realDecay;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user