diff --git a/src/API/ServerAPI.php b/src/API/ServerAPI.php index 7ea988476..1f07c6ee4 100644 --- a/src/API/ServerAPI.php +++ b/src/API/ServerAPI.php @@ -134,8 +134,12 @@ class ServerAPI{ )); $this->parseProperties(); + + //Load advanced properties define("DEBUG", $this->getProperty("debug", 1)); define("ADVANCED_CACHE", $this->getProperty("enable-advanced-cache", false)); + define("MAX_CHUNK_RATE", 20 / $this->getProperty("max-chunks-per-second", 8)); //Default rate ~512 kB/s + if($this->getProperty("port") !== false){ $this->setProperty("server-port", $this->getProperty("port")); $this->config->remove("port"); diff --git a/src/constants/GeneralConstants.php b/src/constants/GeneralConstants.php index 9febec891..b60b45aca 100644 --- a/src/constants/GeneralConstants.php +++ b/src/constants/GeneralConstants.php @@ -31,7 +31,6 @@ define("VIEWER", 3); //Players -define("MAX_CHUNK_RATE", 20 / arg("max-chunks-per-second", 4)); //Default rate ~256 kB/s define("PLAYER_MAX_QUEUE", 1024); define("PLAYER_SURVIVAL_SLOTS", 36);