From 09614b8f1f44da56067c1cc0d105c9e94482a382 Mon Sep 17 00:00:00 2001 From: Xeno Date: Sat, 11 Jul 2020 10:57:04 +0200 Subject: [PATCH] Small optimizations --- .../ar/fn_Client_Rappel_From_Heli.sqf | 18 ++++++++++-------- co30_Domination.Altis/client/fn_earplugs.sqf | 2 +- co30_Domination.Altis/client/fn_jail.sqf | 2 +- co30_Domination.Altis/client/fn_jumpover.sqf | 2 +- .../client/fn_keydown_dyng.sqf | 2 +- .../client/fn_keyup_dyng.sqf | 2 +- co30_Domination.Altis/client/fn_ropekeyb.sqf | 2 +- co30_Domination.Altis/client/fn_toggle3dm.sqf | 2 +- .../clientui/fn_draw3dstuff.sqf | 4 ++-- co30_Domination.Altis/mission.sqm | Bin 194899 -> 194899 bytes .../revive/fn_dragkeydown.sqf | 4 ++-- .../revive/fn_spectkeyeh.sqf | 6 +++--- 12 files changed, 24 insertions(+), 22 deletions(-) diff --git a/co30_Domination.Altis/ar/fn_Client_Rappel_From_Heli.sqf b/co30_Domination.Altis/ar/fn_Client_Rappel_From_Heli.sqf index 404ad7532..a58501b41 100644 --- a/co30_Domination.Altis/ar/fn_Client_Rappel_From_Heli.sqf +++ b/co30_Domination.Altis/ar/fn_Client_Rappel_From_Heli.sqf @@ -61,20 +61,22 @@ if (local _player) then { _player setVariable ["AR_RANDOM_DECEND_SPEED_ADJUSTMENT", 0]; _ropeKeyDownHandler = (findDisplay 46) displayAddEventHandler ["KeyDown", { - if (_this select 1 in (actionKeys "MoveBack")) then { + if ((_this # 1) in (actionKeys "MoveBack")) then { player setVariable ["AR_DECEND_PRESSED", true]; - }; - if (_this select 1 in (actionKeys "Turbo")) then { - player setVariable ["AR_FAST_DECEND_PRESSED", true]; + } else { + if ((_this # 1) in (actionKeys "Turbo")) then { + player setVariable ["AR_FAST_DECEND_PRESSED", true]; + }; }; }]; _ropeKeyUpHandler = (findDisplay 46) displayAddEventHandler ["KeyUp", { - if (_this select 1 in (actionKeys "MoveBack")) then { + if ((_this # 1) in (actionKeys "MoveBack")) then { player setVariable ["AR_DECEND_PRESSED", false]; - }; - if (_this select 1 in (actionKeys "Turbo")) then { - player setVariable ["AR_FAST_DECEND_PRESSED", false]; + } else { + if ((_this # 1) in (actionKeys "Turbo")) then { + player setVariable ["AR_FAST_DECEND_PRESSED", false]; + }; }; }]; } else { diff --git a/co30_Domination.Altis/client/fn_earplugs.sqf b/co30_Domination.Altis/client/fn_earplugs.sqf index d71106947..e9e3cb3f8 100644 --- a/co30_Domination.Altis/client/fn_earplugs.sqf +++ b/co30_Domination.Altis/client/fn_earplugs.sqf @@ -2,7 +2,7 @@ #define THIS_FILE "fn_earplugs.sqf" #include "..\x_setup.sqf" -if ((_this select 1) in actionKeys d_earplugs_userakey_str && {alive player && {!(player getVariable "xr_pluncon") && {!(player getVariable ["ace_isunconscious", false]) && {!(_this select 2) && {!(_this select 3) && {!(_this select 4)}}}}}}) then { +if ((_this # 1) in actionKeys d_earplugs_userakey_str && {alive player && {!(player getVariable "xr_pluncon") && {!(player getVariable ["ace_isunconscious", false]) && {!(_this # 2) && {!(_this # 3) && {!(_this # 4)}}}}}}) then { if (d_earplugs_fitted) then { d_earplugs_fitted = false; 2 fadeSound 1; diff --git a/co30_Domination.Altis/client/fn_jail.sqf b/co30_Domination.Altis/client/fn_jail.sqf index 910e36a11..5d75f572e 100644 --- a/co30_Domination.Altis/client/fn_jail.sqf +++ b/co30_Domination.Altis/client/fn_jail.sqf @@ -14,7 +14,7 @@ if (_enhmm) then { d_usactckey append (actionKeys format ["User%1", _i]); }; _keyeh = (findDisplay 46) displayAddEventHandler ["KeyDown", { - ((_this select 1) in d_usactckey) + ((_this # 1) in d_usactckey) }]; }; diff --git a/co30_Domination.Altis/client/fn_jumpover.sqf b/co30_Domination.Altis/client/fn_jumpover.sqf index 9910bac7a..9cf176353 100644 --- a/co30_Domination.Altis/client/fn_jumpover.sqf +++ b/co30_Domination.Altis/client/fn_jumpover.sqf @@ -2,7 +2,7 @@ #define THIS_FILE "fn_jumpover.sqf" #include "..\x_setup.sqf" -if ((_this select 1) in actionKeys "GetOver" && {alive player && {currentWeapon player == primaryWeapon player && {currentWeapon player != "" && {isNull objectParent player && {speed player > 11 && {stance player == "STAND" && {getFatigue player < 0.5 && {isTouchingGround (vehicle player) && {!(player getVariable ["xr_pluncon", false]) && {!(player getVariable ["ace_isunconscious", false]) && {!d_p_isju}}}}}}}}}}}) then { +if ((_this # 1) in actionKeys "GetOver" && {alive player && {currentWeapon player == primaryWeapon player && {currentWeapon player != "" && {isNull objectParent player && {speed player > 11 && {stance player == "STAND" && {getFatigue player < 0.5 && {isTouchingGround (vehicle player) && {!(player getVariable ["xr_pluncon", false]) && {!(player getVariable ["ace_isunconscious", false]) && {!d_p_isju}}}}}}}}}}}) then { d_p_isju = true; 0 spawn { scriptName "spawn jumpover"; diff --git a/co30_Domination.Altis/client/fn_keydown_dyng.sqf b/co30_Domination.Altis/client/fn_keydown_dyng.sqf index 325e7e017..5876f406f 100644 --- a/co30_Domination.Altis/client/fn_keydown_dyng.sqf +++ b/co30_Domination.Altis/client/fn_keydown_dyng.sqf @@ -5,7 +5,7 @@ __TRACE_1("","_this") -if ((_this select 1) in (actionKeys "TeamSwitch") && {!(_this select 2) && {!(_this select 3) && {!(_this select 4) && {alive player && {!(player getVariable "xr_pluncon") && {!(player getVariable ["ace_isunconscious", false])}}}}}}) then { +if ((_this # 1) in (actionKeys "TeamSwitch") && {!(_this # 2) && {!(_this # 3) && {!(_this # 4) && {alive player && {!(player getVariable "xr_pluncon") && {!(player getVariable ["ace_isunconscious", false])}}}}}}) then { [0, _this] call d_fnc_KeyDownCommandingMenu; true } else { diff --git a/co30_Domination.Altis/client/fn_keyup_dyng.sqf b/co30_Domination.Altis/client/fn_keyup_dyng.sqf index 84a24d6a3..a9d1de811 100644 --- a/co30_Domination.Altis/client/fn_keyup_dyng.sqf +++ b/co30_Domination.Altis/client/fn_keyup_dyng.sqf @@ -2,7 +2,7 @@ #define THIS_FILE "fn_keyup_dyng.sqf" #include "..\x_setup.sqf" -if ((_this select 1) in (actionKeys "TeamSwitch") && {!(_this select 2) && {!(_this select 3) && {!(_this select 4)}}}) then { +if ((_this # 1) in (actionKeys "TeamSwitch") && {!(_this # 2) && {!(_this # 3) && {!(_this # 4)}}}) then { [1, _this] call d_fnc_KeyDownCommandingMenu; true } else { diff --git a/co30_Domination.Altis/client/fn_ropekeyb.sqf b/co30_Domination.Altis/client/fn_ropekeyb.sqf index 5edc6ea6f..858c6238d 100644 --- a/co30_Domination.Altis/client/fn_ropekeyb.sqf +++ b/co30_Domination.Altis/client/fn_ropekeyb.sqf @@ -2,4 +2,4 @@ #define THIS_FILE "fn_ropekeyb.sqf" #include "..\x_setup.sqf" -((_this select 1) in actionKeys "HeliRopeAction" || {(_this select 1) in actionKeys "HeliSlingLoadManager" || {inputAction "HeliRopeAction" > 0 || {inputAction "HeliSlingLoadManager" > 0}}}) \ No newline at end of file +((_this # 1) in actionKeys "HeliRopeAction" || {(_this # 1) in actionKeys "HeliSlingLoadManager" || {inputAction "HeliRopeAction" > 0 || {inputAction "HeliSlingLoadManager" > 0}}}) \ No newline at end of file diff --git a/co30_Domination.Altis/client/fn_toggle3dm.sqf b/co30_Domination.Altis/client/fn_toggle3dm.sqf index 6489e28fc..24e8792ef 100644 --- a/co30_Domination.Altis/client/fn_toggle3dm.sqf +++ b/co30_Domination.Altis/client/fn_toggle3dm.sqf @@ -2,7 +2,7 @@ #define THIS_FILE "fn_toggle3dm.sqf" #include "..\x_setup.sqf" -if ((_this select 1) in actionKeys d_3dmarker_userakey_str && {alive player && {!(player getVariable "xr_pluncon") && {!(player getVariable ["ace_isunconscious", false]) && {!(_this select 2) && {!(_this select 3) && {!(_this select 4)}}}}}}) then { +if ((_this # 1) in actionKeys d_3dmarker_userakey_str && {alive player && {!(player getVariable "xr_pluncon") && {!(player getVariable ["ace_isunconscious", false]) && {!(_this # 2) && {!(_this # 3) && {!(_this # 4)}}}}}}) then { d_showallnearusermarkers = !d_showallnearusermarkers; if (d_showallnearusermarkers) then { "d_usermarkers" cutText ["

" + localize "STR_DOM_MISSIONSTRING_1946" + "", "PLAIN DOWN", -1, true, true]; diff --git a/co30_Domination.Altis/clientui/fn_draw3dstuff.sqf b/co30_Domination.Altis/clientui/fn_draw3dstuff.sqf index 004cceb8c..11f4a9498 100644 --- a/co30_Domination.Altis/clientui/fn_draw3dstuff.sqf +++ b/co30_Domination.Altis/clientui/fn_draw3dstuff.sqf @@ -34,7 +34,7 @@ private _d3d_locs4a = d_d3d_locs4a; } else { drawIcon3D [_tex, [0, 0, 1, 1 - (_distp / 200)], ASLToAGL ((getPosASL _obj) vectorAdd [0, 0, (_x # 2) + (_distp * 0.05)]), 1, 1, 0, format [_d3d_locs4a, round (_cwt - serverTime)], 1, 0.033 - (_distp / 9000), "RobotoCondensed"]; }; -} forEach (_d_3draw_ar select {alive (_x select 0) && {_pos_cam distance2D (_x select 0) < 250}}); +} forEach (_d_3draw_ar select {alive (_x # 0) && {_pos_cam distance2D (_x # 0) < 250}}); private _d_all_p_a_boxes = d_all_p_a_boxes; { @@ -49,7 +49,7 @@ private _d_all_p_a_boxes = d_all_p_a_boxes; } else { drawIcon3D ["#(argb,8,8,3)color(0,0,0,0)", _col, ASLToAGL ((getPosASL _box) vectorAdd [0, 0, 1.5 + (_distp * 0.05)]), 1, 1, 0, _txt, 1, 0.033 - (_distp / 9000), "RobotoCondensed"]; }; -} forEach (_d_all_p_a_boxes select {!isNull (_x select 0) && {_pos_cam distance2D (_x select 0) < 80}}); +} forEach (_d_all_p_a_boxes select {!isNull (_x # 0) && {_pos_cam distance2D (_x # 0) < 80}}); if (d_with_ai) then { private _d_allai_recruit_objs = d_allai_recruit_objs; diff --git a/co30_Domination.Altis/mission.sqm b/co30_Domination.Altis/mission.sqm index e237e7e63975625b4a0737dc13dc81eb286ec306..f88266ce09ddb4d3d7c5620e13d8e2b03c50734c 100644 GIT binary patch delta 24 gcmccoiTm;=?hQ3;jHjAw+1hK_7`NB5F