mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Player: increase max distance between movements to allow high levels of speed to work correctly
speed 255 may allow the player to move as much as 14.8 blocks per tick when sprinting.
This commit is contained in:
parent
14c1a9550d
commit
f5b4d64668
@ -1231,7 +1231,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
|
||||
$revert = false;
|
||||
|
||||
if($distanceSquared > 100){
|
||||
if($distanceSquared > 225){ //15 blocks
|
||||
//TODO: this is probably too big if we process every movement
|
||||
/* !!! BEWARE YE WHO ENTER HERE !!!
|
||||
*
|
||||
@ -1243,7 +1243,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
* If you must tamper with this code, be aware that this can cause very nasty results. Do not waste our time
|
||||
* asking for help if you suffer the consequences of messing with this.
|
||||
*/
|
||||
$this->logger->debug("Moved too fast, reverting movement");
|
||||
$this->logger->debug("Moved too fast (" . sqrt($distanceSquared) . " blocks in 1 movement), reverting movement");
|
||||
$this->logger->debug("Old position: " . $oldPos->asVector3() . ", new position: " . $newPos);
|
||||
$revert = true;
|
||||
}elseif(!$this->getWorld()->isInLoadedTerrain($newPos)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user