mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Better time ticking and sync (#2)
* Remove unnecessary SetTimePacket spam This is handled automatically client-side, as long as it is calculated correctly server side there is no issue (unless the server hits a spot of bad lag) * Better client/server time sync when lagging
This commit is contained in:
parent
5f26c21b9f
commit
e9f2bf0085
@ -156,8 +156,6 @@ class Level implements ChunkManager, Metadatable{
|
||||
|
||||
private $cacheChunks = false;
|
||||
|
||||
private $sendTimeTicker = 0;
|
||||
|
||||
/** @var Server */
|
||||
private $server;
|
||||
|
||||
@ -612,7 +610,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
if($this->stopTime === true){
|
||||
return;
|
||||
}else{
|
||||
$this->time += 1;
|
||||
$this->time += $this->tickRate;
|
||||
}
|
||||
}
|
||||
|
||||
@ -641,11 +639,6 @@ class Level implements ChunkManager, Metadatable{
|
||||
|
||||
$this->checkTime();
|
||||
|
||||
if(++$this->sendTimeTicker === 200){
|
||||
$this->sendTime();
|
||||
$this->sendTimeTicker = 0;
|
||||
}
|
||||
|
||||
$this->unloadChunks();
|
||||
|
||||
//Do block updates
|
||||
|
Loading…
x
Reference in New Issue
Block a user