mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Move attribute net sync to NetworkSession
This commit is contained in:
@ -1322,13 +1322,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
|
||||
$this->lastUpdate = $currentTick;
|
||||
|
||||
//TODO: move this to network session ticking (this is specifically related to net sync)
|
||||
$dirtyAttributes = $this->attributeMap->needSend();
|
||||
$this->networkSession->syncAttributes($this, $dirtyAttributes);
|
||||
foreach($dirtyAttributes as $attribute){
|
||||
$attribute->markSynchronized();
|
||||
}
|
||||
|
||||
if(!$this->isAlive() and $this->spawned){
|
||||
$this->onDeathUpdate($tickDiff);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user