mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
Micro optimization to movement update checking
No need to keep abs()ing this, because next time we have a movement update, motion < 0.00001 will be flattened to zero anyway.
This commit is contained in:
parent
d1852834de
commit
a7674c52e6
@ -1322,9 +1322,9 @@ abstract class Entity extends Location implements Metadatable{
|
||||
final public function hasMovementUpdate() : bool{
|
||||
return (
|
||||
$this->forceMovementUpdate or
|
||||
abs($this->motionX) > self::MOTION_THRESHOLD or
|
||||
abs($this->motionY) > self::MOTION_THRESHOLD or
|
||||
abs($this->motionZ) > self::MOTION_THRESHOLD or
|
||||
$this->motionX != 0 or
|
||||
$this->motionY != 0 or
|
||||
$this->motionZ != 0 or
|
||||
!$this->onGround
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user