sendChat will use different queue to send messages to client, chat messages are now ordered

This commit is contained in:
GameHerobrine 2025-05-19 10:40:54 +03:00
parent 992b6143cd
commit 75a6b66d29
3 changed files with 60 additions and 16 deletions

View file

@ -146,7 +146,6 @@ class Entity extends Position
$this->name = "";
$this->gravity = 0.08;
$this->state = $this->data["State"] = $this->data["State"] ?? 0;
$this->tickCounter = 0;
$this->x = isset($this->data["x"]) ? (float) $this->data["x"] : 0;
$this->y = isset($this->data["y"]) ? (float) $this->data["y"] : 0;
$this->z = isset($this->data["z"]) ? (float) $this->data["z"] : 0;

View file

@ -41,14 +41,14 @@ class Painting extends Entity{
}
}
public $counter = 0;
public $scounter = 0;
public function update($now){
if($this->closed === true){
return false;
}
if(++$this->counter >= 100){
$this->counter = 0;
if(++$this->scounter >= 100){
$this->scounter = 0;
if(!$this->survives() && !$this->dead){ //maybe dont check entity collision?
$this->makeDead("nosurvive");
}