Added weather update interval module setting

This commit is contained in:
ulteq 2015-04-27 12:47:26 +02:00
parent 79ff3146b5
commit 1b5756d33c
4 changed files with 17 additions and 2 deletions

View File

@ -29,4 +29,10 @@ class ACE_Settings {
typeName = "BOOL";
value = 1;
};
class GVAR(serverUpdateInterval) {
displayName = "Update Interval";
description = "Defines the interval (seconds) between weather updates";
typeName = "SCALAR";
value = 60;
};
};

View File

@ -41,6 +41,12 @@ class CfgVehicles {
typeName = "BOOL";
defaultValue = 1;
};
class serverUpdateInterval {
displayName = "Update Interval";
description = "Defines the interval (seconds) between weather updates";
typeName = "NUMBER";
defaultValue = 60;
};
};
};
};

View File

@ -9,6 +9,4 @@ GVAR(rain_current_range) = -1+(random 2);
// Wind
call FUNC(initWind);
GVAR(serverUpdateInterval) = 60;
[FUNC(serverController), GVAR(serverUpdateInterval)] call cba_fnc_addPerFrameHandler;

View File

@ -32,3 +32,8 @@ if !(_activated) exitWith {};
[_logic, QGVAR(syncRain), "syncRain"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(syncWind), "syncWind"] call EFUNC(common,readSettingFromModule); // Wind, Gusts, Waves
[_logic, QGVAR(syncMisc), "syncMisc"] call EFUNC(common,readSettingFromModule); // Lightnings, Rainbow, Fog
// Server weather update interval
[_logic, QGVAR(serverUpdateInterval), "serverUpdateInterval"] call EFUNC(common,readSettingFromModule);
GVAR(serverUpdateInterval) = 1 max GVAR(serverUpdateInterval) min 600;