mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Fixed speed limiter
This commit is contained in:
parent
9db1b741a7
commit
8515e7ff33
2 changed files with 4 additions and 2 deletions
|
|
@ -507,13 +507,14 @@ class Entity extends Position{
|
|||
}
|
||||
}
|
||||
|
||||
$this->lastUpdate = $now;
|
||||
|
||||
if($this->class !== ENTITY_PLAYER){
|
||||
$this->updateMovement();
|
||||
if($hasUpdate === true){
|
||||
$this->server->schedule(5, array($this, "update"));
|
||||
}
|
||||
}
|
||||
$this->lastUpdate = $now;
|
||||
}
|
||||
|
||||
public function updateMovement(){
|
||||
|
|
@ -548,6 +549,7 @@ class Entity extends Position{
|
|||
$this->updatePosition($this->x, $this->y, $this->z, $this->yaw, $this->pitch);
|
||||
}
|
||||
}
|
||||
$this->lastUpdate = $now;
|
||||
}
|
||||
|
||||
public function getDirection(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue