better(?) way to handle eid translation, local eid 0 is not used now, some additional fixes

This commit is contained in:
GameHerobrine 2025-06-29 03:12:24 +03:00
parent 62819f8b12
commit 21f8796e89
32 changed files with 345 additions and 56 deletions

View file

@ -24,5 +24,12 @@ class RespawnPacket extends RakNetDataPacket{
$this->putFloat($this->y);
$this->putFloat($this->z);
}
public function eidsToLocal(Player $p){
if(!$this->localEids){
$this->localEids = true;
$this->eid = $p->global2localEID[$this->eid] ?? false;
if($this->eid === false) return false;
}
return true;
}
}