Fixed most movement-check false-positives (finally!)

Removed ySize hack, fixes ladders, fixed original autojump and dropdown issues. These were due to a tiny, tiny tiny margin for error when decoding network floats (usually less than 0.000001, but enough to cause issues. Added Binary floating-point decode accuracy option to combat this. Network Vector3s are now rounded to 4 decimal places.
This commit is contained in:
Dylan K. Taylor
2017-01-14 14:21:28 +00:00
parent e4aa3d72fe
commit 8ea03524ff
3 changed files with 21 additions and 16 deletions

View File

@ -1387,11 +1387,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$diffY = $this->y - $newPos->y;
$diffZ = $this->z - $newPos->z;
$yS = 0.5 + $this->ySize;
if($diffY >= -$yS or $diffY <= $yS){
$diffY = 0;
}
$diff = ($diffX ** 2 + $diffY ** 2 + $diffZ ** 2) / ($tickDiff ** 2);
if($this->isSurvival()){