final fixes, works over water now

This commit is contained in:
Brett 2019-07-13 18:55:33 -06:00 committed by Brett
parent 400103d1de
commit 35c82f2bce
3 changed files with 5 additions and 3 deletions

View File

@ -28,7 +28,9 @@ 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(altRatio)); private _vehicle = vehicle ACE_player;
private _rawAlt = ((getPosATL _vehicle) select 2) + (0 min (getTerrainHeightASL getPos _vehicle));
private _altValue = _rawAlt / GVAR(altRatio);
if (_altValue < 10) then { if (_altValue < 10) then {
_altValue = _altValue toFixed 1; _altValue = _altValue toFixed 1;
} else { } else {

View File

@ -28,5 +28,5 @@ private _settingEH = ["CBA_SettingChanged", {
}; };
_ctrl ctrlSetFade 1; _ctrl ctrlSetFade 1;
_ctrl ctrlCommit 0; _ctrl ctrlCommit 0;
_speed ctrlSetText ((speed vehicle ACE_player / GVAR(speedRatio)) toFixed 0); _speed ctrlSetText ((abs (speed vehicle ACE_player / GVAR(speedRatio))) toFixed 0);
}, 0, [_ctrl, _speed, _settingEH]] call CBA_fnc_addPerFrameHandler; }, 0, [_ctrl, _speed, _settingEH]] call CBA_fnc_addPerFrameHandler;

View File

@ -1 +1 @@
#include "\z\ace\addons\units\script_component.hpp" #include "\z\ace\addons\ui_units\script_component.hpp"