mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 03:51:37 +00:00
Move attribute net sync to NetworkSession
This commit is contained in:
@@ -958,6 +958,14 @@ class NetworkSession{
|
||||
|
||||
if($this->player !== null){
|
||||
$this->player->doChunkRequests();
|
||||
|
||||
$dirtyAttributes = $this->player->getAttributeMap()->needSend();
|
||||
$this->syncAttributes($this->player, $dirtyAttributes);
|
||||
foreach($dirtyAttributes as $attribute){
|
||||
//TODO: we might need to send these to other players in the future
|
||||
//if that happens, this will need to become more complex than a flag on the attribute itself
|
||||
$attribute->markSynchronized();
|
||||
}
|
||||
}
|
||||
|
||||
$this->flushSendBuffer();
|
||||
|
Reference in New Issue
Block a user