mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Scopes - Stop changing CBA setting value directly (#9954)
Update XEH_postInit.sqf
This commit is contained in:
parent
dda6b9d2dc
commit
7480ae377d
@ -19,11 +19,13 @@ GVAR(canAdjustWindage) = [false, false, false];
|
||||
GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
|
||||
|
||||
["CBA_settingsInitialized", {
|
||||
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
if (GVAR(deduceBarometricPressureFromTerrainAltitude)) then {
|
||||
GVAR(zeroReferenceBarometricPressure) = 1013.25 * (1 - (0.0065 * EGVAR(common,mapAltitude)) / 288.15) ^ 5.255754495;
|
||||
// Overwrite setting if automatic pressure deduction is wanted
|
||||
if (isServer && GVAR(deduceBarometricPressureFromTerrainAltitude)) then {
|
||||
private _referencePressure = 1013.25 * (1 - (0.0065 * EGVAR(common,mapAltitude)) / 288.15) ^ 5.255754495;
|
||||
|
||||
[QGVAR(zeroReferenceBarometricPressure), _referencePressure, 2, "server"] call CBA_settings_fnc_set;
|
||||
};
|
||||
|
||||
// Check inventory when it changes
|
||||
@ -47,5 +49,4 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
|
||||
// Register fire event handler
|
||||
["ace_firedPlayer", LINKFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerNonLocal", LINKFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user