mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
change ratio variable
This commit is contained in:
parent
3f868ac94b
commit
191031d994
@ -10,7 +10,7 @@ private _altInfo = [_units select 0] call FUNC(altInfo);
|
|||||||
systemChat "alt time";
|
systemChat "alt time";
|
||||||
|
|
||||||
((ctrlParent _alt) displayCtrl 1005) ctrlSetText (_altInfo select 0);
|
((ctrlParent _alt) displayCtrl 1005) ctrlSetText (_altInfo select 0);
|
||||||
GVAR(ratio) = _altInfo select 1;
|
GVAR(altRatio) = _altInfo select 1;
|
||||||
|
|
||||||
private _settingEH = ["CBA_SettingChanged", {
|
private _settingEH = ["CBA_SettingChanged", {
|
||||||
params ["_setting", "_value"];
|
params ["_setting", "_value"];
|
||||||
@ -18,7 +18,7 @@ private _settingEH = ["CBA_SettingChanged", {
|
|||||||
if (_setting isEqualTo _settingName) then {
|
if (_setting isEqualTo _settingName) then {
|
||||||
private _altInfo = [_value] call FUNC(altInfo);
|
private _altInfo = [_value] call FUNC(altInfo);
|
||||||
((ctrlParent _alt) displayCtrl 1005) ctrlSetText (_altInfo select 0);
|
((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;
|
}, [_units select 1, _alt]] call CBA_fnc_addEventHandlerArgs;
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ private _settingEH = ["CBA_SettingChanged", {
|
|||||||
};
|
};
|
||||||
_ctrl ctrlSetFade 1;
|
_ctrl ctrlSetFade 1;
|
||||||
_ctrl ctrlCommit 0;
|
_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 {
|
if (_altValue < 10) then {
|
||||||
_altValue = _altValue toFixed 1;
|
_altValue = _altValue toFixed 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -8,7 +8,7 @@ private _units = (vehicle ace_player) call FUNC(speedUnits);
|
|||||||
private _speedInfo = [_units select 0] call FUNC(speedInfo);
|
private _speedInfo = [_units select 0] call FUNC(speedInfo);
|
||||||
|
|
||||||
((ctrlParent _speed) displayCtrl 1004) ctrlSetText (_speedInfo select 0);
|
((ctrlParent _speed) displayCtrl 1004) ctrlSetText (_speedInfo select 0);
|
||||||
GVAR(ratio) = _speedInfo select 1;
|
GVAR(speedRatio) = _speedInfo select 1;
|
||||||
|
|
||||||
private _settingEH = ["CBA_SettingChanged", {
|
private _settingEH = ["CBA_SettingChanged", {
|
||||||
params ["_setting", "_value"];
|
params ["_setting", "_value"];
|
||||||
@ -17,7 +17,7 @@ private _settingEH = ["CBA_SettingChanged", {
|
|||||||
if (_setting isEqualTo _settingName) then {
|
if (_setting isEqualTo _settingName) then {
|
||||||
private _speedInfo = [_value] call FUNC(speedInfo);
|
private _speedInfo = [_value] call FUNC(speedInfo);
|
||||||
((ctrlParent _speed) displayCtrl 1004) ctrlSetText (_speedInfo select 0);
|
((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;
|
}, [_units select 1, _speed]] call CBA_fnc_addEventHandlerArgs;
|
||||||
|
|
||||||
@ -29,5 +29,5 @@ private _settingEH = ["CBA_SettingChanged", {
|
|||||||
};
|
};
|
||||||
_ctrl ctrlSetFade 1;
|
_ctrl ctrlSetFade 1;
|
||||||
_ctrl ctrlCommit 0;
|
_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;
|
}, 0, [_ctrl, _speed, _settingEH]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
Loading…
Reference in New Issue
Block a user