mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Fixed random timeout #11
This commit is contained in:
parent
0ed130e7fd
commit
3e54ceb8a3
5 changed files with 9 additions and 7 deletions
|
|
@ -298,7 +298,6 @@ class PocketMinecraftServer extends stdClass{
|
|||
$this->loadEvents();
|
||||
declare(ticks=15);
|
||||
register_tick_function(array($this, "tick"));
|
||||
$this->event("onTick", "tickerFunction", true);
|
||||
register_shutdown_function(array($this, "close"));
|
||||
console("[INFO] Server started!");
|
||||
$this->process();
|
||||
|
|
@ -309,6 +308,7 @@ class PocketMinecraftServer extends stdClass{
|
|||
if($this->lastTick <= ($time - 0.05)){
|
||||
$this->tickMeasure[] = $this->lastTick = $time;
|
||||
array_shift($this->tickMeasure);
|
||||
$this->tickerFunction($time);
|
||||
$this->trigger("onTick", $time);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue