mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
Fixed some bad defaults, improved spawning
This commit is contained in:
parent
ef00103fec
commit
6fc7ee2775
@ -67,11 +67,11 @@ class MemoryManager{
|
||||
$this->continuousTrigger = (bool) $this->server->getProperty("memory.continuous-trigger", true);
|
||||
$this->continuousTriggerRate = (int) $this->server->getProperty("memory.continuous-trigger-rate", 30);
|
||||
|
||||
$this->garbageCollectionPeriod = (int) $this->server->getProperty("memory.garbage-collection.period", 12000);
|
||||
$this->garbageCollectionPeriod = (int) $this->server->getProperty("memory.garbage-collection.period", 36000);
|
||||
$this->garbageCollectionTrigger = (bool) $this->server->getProperty("memory.garbage-collection.low-memory-trigger", true);
|
||||
$this->garbageCollectionAsync = (bool) $this->server->getProperty("memory.garbage-collection.collect-async-worker", true);
|
||||
|
||||
$this->chunkLimit = (int) $this->server->getProperty("memory.max-chunks.trigger-limit", 12000);
|
||||
$this->chunkLimit = (int) $this->server->getProperty("memory.max-chunks.trigger-limit", 96);
|
||||
$this->chunkCollect = (bool) $this->server->getProperty("memory.max-chunks.trigger-chunk-collect", true);
|
||||
$this->chunkTrigger = (bool) $this->server->getProperty("memory.max-chunks.low-memory-trigger", true);
|
||||
|
||||
|
@ -648,7 +648,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$this->level->requestChunk($X, $Z, $this, LevelProvider::ORDER_ZXY);
|
||||
}
|
||||
|
||||
if($this->chunkLoadCount >= $this->spawnThreshold and $this->spawned === false){
|
||||
if($this->chunkLoadCount >= $this->spawnThreshold and $this->spawned === false and $this->teleportPosition === null){
|
||||
$this->spawned = true;
|
||||
|
||||
$this->sendSettings();
|
||||
@ -1608,6 +1608,8 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$this->dataPacket($pk->setChannel(Network::CHANNEL_PRIORITY));
|
||||
}
|
||||
|
||||
$this->teleportPosition = $this->getPosition();
|
||||
|
||||
$this->orderChunks();
|
||||
$this->sendNextChunk();
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user