From 191031d9941cf48d2f4271b865f89e9be2f7bd84 Mon Sep 17 00:00:00 2001 From: Brett Date: Sat, 8 Jun 2019 14:20:51 -0600 Subject: [PATCH] change ratio variable --- addons/units/functions/fnc_onAltLoad.sqf | 6 +++--- addons/units/functions/fnc_onSpeedLoad.sqf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/units/functions/fnc_onAltLoad.sqf b/addons/units/functions/fnc_onAltLoad.sqf index 85bd16aa6f..bce2b5010c 100644 --- a/addons/units/functions/fnc_onAltLoad.sqf +++ b/addons/units/functions/fnc_onAltLoad.sqf @@ -10,7 +10,7 @@ private _altInfo = [_units select 0] call FUNC(altInfo); systemChat "alt time"; ((ctrlParent _alt) displayCtrl 1005) ctrlSetText (_altInfo select 0); -GVAR(ratio) = _altInfo select 1; +GVAR(altRatio) = _altInfo select 1; private _settingEH = ["CBA_SettingChanged", { params ["_setting", "_value"]; @@ -18,7 +18,7 @@ private _settingEH = ["CBA_SettingChanged", { if (_setting isEqualTo _settingName) then { private _altInfo = [_value] call FUNC(altInfo); ((ctrlParent _alt) displayCtrl 1005) ctrlSetText (_altInfo select 0); - GVAR(ratio) = _altInfo select 1; + GVAR(altRatio) = _altInfo select 1; }; }, [_units select 1, _alt]] call CBA_fnc_addEventHandlerArgs; @@ -30,7 +30,7 @@ private _settingEH = ["CBA_SettingChanged", { }; _ctrl ctrlSetFade 1; _ctrl ctrlCommit 0; - private _altValue = (((getPosATL vehicle ace_player) select 2) / GVAR(ratio)); + private _altValue = (((getPosATL vehicle ace_player) select 2) / GVAR(altRatio)); if (_altValue < 10) then { _altValue = _altValue toFixed 1; } else { diff --git a/addons/units/functions/fnc_onSpeedLoad.sqf b/addons/units/functions/fnc_onSpeedLoad.sqf index a78e2ab8bd..6e9807a6f2 100644 --- a/addons/units/functions/fnc_onSpeedLoad.sqf +++ b/addons/units/functions/fnc_onSpeedLoad.sqf @@ -8,7 +8,7 @@ private _units = (vehicle ace_player) call FUNC(speedUnits); private _speedInfo = [_units select 0] call FUNC(speedInfo); ((ctrlParent _speed) displayCtrl 1004) ctrlSetText (_speedInfo select 0); -GVAR(ratio) = _speedInfo select 1; +GVAR(speedRatio) = _speedInfo select 1; private _settingEH = ["CBA_SettingChanged", { params ["_setting", "_value"]; @@ -17,7 +17,7 @@ private _settingEH = ["CBA_SettingChanged", { if (_setting isEqualTo _settingName) then { private _speedInfo = [_value] call FUNC(speedInfo); ((ctrlParent _speed) displayCtrl 1004) ctrlSetText (_speedInfo select 0); - GVAR(ratio) = _speedInfo select 1; + GVAR(speedRatio) = _speedInfo select 1; }; }, [_units select 1, _speed]] call CBA_fnc_addEventHandlerArgs; @@ -29,5 +29,5 @@ private _settingEH = ["CBA_SettingChanged", { }; _ctrl ctrlSetFade 1; _ctrl ctrlCommit 0; - _speed ctrlSetText str (round (speed vehicle ace_player / GVAR(ratio))); + _speed ctrlSetText str (round (speed vehicle ace_player / GVAR(speedRatio))); }, 0, [_ctrl, _speed, _settingEH]] call CBA_fnc_addPerFrameHandler;