mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
vector: fix potential error in FOS, prep settings, config
This commit is contained in:
parent
65e12745d6
commit
9d687b9b3e
@ -15,8 +15,8 @@ _number = round (_number select _coordinate);
|
||||
_isNegative = _number < 0;
|
||||
_number = abs _number;
|
||||
|
||||
if (_number >= 10000) exitWith {
|
||||
[QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa))] // return
|
||||
if (_number > 9999) exitWith {
|
||||
[QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa))] // return
|
||||
};
|
||||
|
||||
private ["_digit0", "_digit1", "_digit2", "_digit3", "_digit4"];
|
||||
@ -236,4 +236,9 @@ switch (_coordinate) do {
|
||||
};
|
||||
};
|
||||
|
||||
// trap errors
|
||||
if ({typeName _x == "STRING"} count [_digit0, _digit1, _digit2, _digit3, _digit4] < 5) exitWith {
|
||||
[QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa))] // return
|
||||
};
|
||||
|
||||
[_digit0, _digit1, _digit2, _digit3, _digit4]
|
||||
|
@ -29,6 +29,19 @@ switch (_this select 0) do {
|
||||
GVAR(isKeyDownAzimuth) = true;
|
||||
[false] call FUNC(showP1);
|
||||
|
||||
// handle 5 times clicking
|
||||
if (diag_tickTime < GVAR(keyDownTimeAzimuth) + 0.5) then {
|
||||
GVAR(keyDownTabCountAzimuth) = (GETGVAR(keyDownTabCountAzimuth,0)) + 1;
|
||||
GVAR(keyDownTimeAzimuth) = diag_tickTime;
|
||||
} else {
|
||||
GVAR(keyDownTabCountAzimuth) = 1;
|
||||
};
|
||||
|
||||
// open config menu
|
||||
if (GVAR(keyDownTabCountAzimuth) == 5) exitWith {
|
||||
systemChat "0";
|
||||
};
|
||||
|
||||
if (diag_tickTime < GVAR(keyDownTimeAzimuth) + 0.5) exitWith {
|
||||
"azimuth+inclination" call _fnc_setPFH;
|
||||
};
|
||||
@ -66,6 +79,19 @@ switch (_this select 0) do {
|
||||
GVAR(isKeyDownDistance) = true;
|
||||
[false] call FUNC(showP1);
|
||||
|
||||
// handle 5 times clicking
|
||||
if (diag_tickTime < GVAR(keyDownTimeDistance) + 0.5) then {
|
||||
GVAR(keyDownTabCountDistance) = (GETGVAR(keyDownTabCountDistance,0)) + 1;
|
||||
GVAR(keyDownTimeDistance) = diag_tickTime;
|
||||
} else {
|
||||
GVAR(keyDownTabCountDistance) = 1;
|
||||
};
|
||||
|
||||
// open config menu
|
||||
if (GVAR(keyDownTabCountDistance) == 5) exitWith {
|
||||
systemChat "1";
|
||||
};
|
||||
|
||||
if (diag_tickTime < GVAR(keyDownTimeDistance) + 0.5) exitWith {
|
||||
"height+distance" call _fnc_setPFH;
|
||||
};
|
||||
|
@ -77,9 +77,14 @@ switch (_this select 0) do {
|
||||
|
||||
case ("azimuth+inclination"): {
|
||||
|
||||
private "_isReady";
|
||||
_isReady = diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.2;
|
||||
|
||||
[false] call FUNC(showCenter);
|
||||
|
||||
call FUNC(showAzimuthInclination);
|
||||
if (_isReady) then {
|
||||
call FUNC(showAzimuthInclination);
|
||||
};
|
||||
|
||||
if (!GVAR(isKeyDownAzimuth)) then {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user