diff --git a/addons/ui_units/functions/fnc_onAltLoad.sqf b/addons/ui_units/functions/fnc_onAltLoad.sqf index bd388dd3c7..5b691d7c53 100644 --- a/addons/ui_units/functions/fnc_onAltLoad.sqf +++ b/addons/ui_units/functions/fnc_onAltLoad.sqf @@ -4,7 +4,7 @@ params ["_ctrl"]; private _alt = (ctrlParent _ctrl) ctrlCreate [QGVAR(alt), -1]; -private _units = (vehicle ACE_player) call FUNC(altUnits); +private _units = cameraOn call FUNC(altUnits); _units call FUNC(altInfo) params ["_unitText", "_ratio"]; ((ctrlParent _alt) displayCtrl 1005) ctrlSetText _unitText; @@ -28,7 +28,7 @@ private _settingEH = ["CBA_SettingChanged", { }; _ctrl ctrlSetFade 1; _ctrl ctrlCommit 0; - private _vehicle = vehicle ACE_player; + private _vehicle = cameraOn; private _rawAlt = ((getPosATL _vehicle) select 2) + (0 min (getTerrainHeightASL getPos _vehicle)); private _altValue = _rawAlt / GVAR(altRatio); if (_altValue < 10) then { diff --git a/addons/ui_units/functions/fnc_onSpeedLoad.sqf b/addons/ui_units/functions/fnc_onSpeedLoad.sqf index 95a148d7b3..f70592e8c0 100644 --- a/addons/ui_units/functions/fnc_onSpeedLoad.sqf +++ b/addons/ui_units/functions/fnc_onSpeedLoad.sqf @@ -4,7 +4,7 @@ params ["_ctrl"]; private _speed = (ctrlParent _ctrl) ctrlCreate [QGVAR(speed), -1]; -private _units = (vehicle ACE_player) call FUNC(speedUnits); +private _units = cameraOn call FUNC(speedUnits); _units call FUNC(speedInfo) params ["_unitText", "_ratio"]; ((ctrlParent _speed) displayCtrl 1004) ctrlSetText _unitText; @@ -28,5 +28,5 @@ private _settingEH = ["CBA_SettingChanged", { }; _ctrl ctrlSetFade 1; _ctrl ctrlCommit 0; - _speed ctrlSetText ((abs (speed vehicle ACE_player / GVAR(speedRatio))) toFixed 0); + _speed ctrlSetText ((abs (speed cameraOn / GVAR(speedRatio))) toFixed 0); }, 0, [_ctrl, _speed, _settingEH]] call CBA_fnc_addPerFrameHandler;