Pre-allocate global config
This commit is contained in:
@@ -10,13 +10,11 @@
|
||||
let serverConfig = {};
|
||||
let databaseConfig = {};
|
||||
let emailConfig = {};
|
||||
let globalConfig = {};
|
||||
let gameConfig = {};
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadGlobalConfig() {
|
||||
return {
|
||||
let globalConfig = {
|
||||
accountPasswordHash: "SHA512",
|
||||
npcFarProximity: 100,
|
||||
npcMediumProximity: 40,
|
||||
@@ -67,8 +65,7 @@ function loadGlobalConfig() {
|
||||
geoIPCountryDatabaseFilePath: "geoip-country.mmdb",
|
||||
geoIPCityDatabaseFilePath: "geoip-city.mmdb",
|
||||
randomTipInterval: 600000,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -80,7 +77,6 @@ function loadGameConfig() {
|
||||
|
||||
function initConfigScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Config]: Initializing config script ...");
|
||||
globalConfig = loadGlobalConfig();
|
||||
gameConfig = loadGameConfig();
|
||||
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port, getMultiplayerMod());
|
||||
applyConfigToServer(serverConfig);
|
||||
|
||||
Reference in New Issue
Block a user