From c1045e426606462c317e7234f5f419898dcad274 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 10 Dec 2017 18:29:38 +0000 Subject: [PATCH] Update vanilla zeus functions (#5888) * Cleanup zeus module * Update zeus BI functions * Restore accidentally removed setting check --- addons/zeus/functions/fnc_bi_moduleMine.sqf | 4 +- .../functions/fnc_bi_moduleProjectile.sqf | 45 +++++++++---------- .../functions/fnc_bi_moduleRemoteControl.sqf | 5 ++- .../functions/fnc_getModuleDestination.sqf | 7 ++- .../functions/fnc_handleZeusUnitAssigned.sqf | 24 +++++----- .../functions/fnc_moduleAddOrRemoveFRIES.sqf | 4 +- .../functions/fnc_moduleAddSpareTrack.sqf | 4 +- .../functions/fnc_moduleAddSpareWheel.sqf | 4 +- addons/zeus/functions/fnc_moduleCaptive.sqf | 4 +- .../functions/fnc_moduleConfigurePylons.sqf | 4 +- .../functions/fnc_moduleGlobalSetSkill.sqf | 4 +- addons/zeus/functions/fnc_moduleGroupSide.sqf | 2 +- .../functions/fnc_moduleLoadIntoCargo.sqf | 4 +- .../zeus/functions/fnc_moduleSearchNearby.sqf | 4 +- addons/zeus/functions/fnc_moduleSetMedic.sqf | 4 +- .../fnc_moduleSetMedicalFacility.sqf | 4 +- .../functions/fnc_moduleSetMedicalVehicle.sqf | 4 +- addons/zeus/functions/fnc_moduleSurrender.sqf | 4 +- .../zeus/functions/fnc_moduleUnconscious.sqf | 4 +- .../zeus/functions/fnc_moduleZeusSettings.sqf | 4 +- .../functions/fnc_ui_attributePosition.sqf | 2 +- addons/zeus/functions/fnc_ui_groupSide.sqf | 2 +- .../functions/fnc_ui_toggleFlashlight.sqf | 13 +----- addons/zeus/functions/fnc_ui_toggleNvg.sqf | 7 +-- 24 files changed, 74 insertions(+), 93 deletions(-) diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 434130ffe6..1c85706d09 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -22,7 +22,7 @@ params ["_logic", "_units", "_activated"]; if (_activated) then { - _explosive = gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "explosive"); + _explosive = gettext (configfile >> "cfgvehicles" >> typeof _logic >> "explosive"); if (_explosive != "") then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; @@ -44,7 +44,7 @@ if (_activated) then { //--- Show hint to curator who placed the object [[["Curator","PlaceMines"],nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",_logic] call bis_fnc_mp; - waitUntil {sleep 0.1; isnull _explosive || isnull _logic || !alive _logic}; + waituntil {sleep 0.1; isnull _explosive || isnull _logic || !alive _logic}; if (isnull _logic) then {deletevehicle _explosive;} else {_explosive setdamage 1;}; deletevehicle _logic; }; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index eaad90c6d6..3d974c126c 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -20,33 +20,30 @@ #include "script_component.hpp" -_fnc_scriptNameParentTemp = if !(isNil '_fnc_scriptName') then {_fnc_scriptName} else {'BIS_fnc_moduleProjectile'}; -private _fnc_scriptNameParent = _fnc_scriptNameParentTemp; -_fnc_scriptNameParentTemp = nil; - -private _fnc_scriptName = 'BIS_fnc_moduleProjectile'; -scriptname _fnc_scriptName; - -params ["_logic", "_units", "_activated"]; +_logic = _this select 0; +_units = _this select 1; +_activated = _this select 2; if ({local _x} count (objectcurators _logic) > 0) then { //--- Reveal the circle to curators _logic hideobject false; _logic setpos position _logic; }; -if !(isserver) exitWith {}; +if !(isserver) exitwith {}; if (_activated) then { - _ammo = _logic getVariable ["type",gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "ammo")]; + _ammo = _logic getvariable ["type",gettext (configfile >> "cfgvehicles" >> typeof _logic >> "ammo")]; if (_ammo != "") then { - _CfgAmmo = configFile >> "CfgAmmo" >> _ammo; - _dirVar = _fnc_scriptname + typeOf _logic; - _logic setdir (missionnamespace getVariable [_dirVar,direction _logic]); //--- Restore custom direction + _cfgAmmo = configfile >> "cfgammo" >> _ammo; + //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; + // It seems BI broke this part... + // _dirVar = _fnc_scriptname + typeof _logic; + // _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction _pos = getposatl _logic; _posAmmo = +_pos; _posAmmo set [2,0]; _dir = direction _logic; - _simulation = tolower gettext (configFile >> "CfgAmmo" >> _ammo >> "simulation"); + _simulation = tolower gettext (configfile >> "cfgammo" >> _ammo >> "simulation"); _altitude = 0; _velocity = []; _attach = false; @@ -107,15 +104,15 @@ if (_activated) then { }; }; }; - } forEach _entities; + } foreach _entities; }; }; - if (count _hint > 0 && {count objectCurators _logic > 0}) then { + if (count _hint > 0 && {count objectcurators _logic > 0}) then { [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp; }; if (count _velocity == 3) then { - _altitude = (_logic getVariable ["altitude",_altitude]) call bis_fnc_parsenumber; - _radio = _logic getVariable ["radio",_radio]; + _altitude = (_logic getvariable ["altitude",_altitude]) call bis_fnc_parsenumber; + _radio = _logic getvariable ["radio",_radio]; //--- Create projectile _posAmmo set [2,_altitude]; @@ -124,7 +121,7 @@ if (_activated) then { _projectile setvelocity _velocity; if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];}; - // Added by ace_zeus for ace_frag compatibility + // Added by ace_zeus for ace_frag compatibility if (!isNil QEFUNC(frag,addPfhRound)) then { [objNull, _ammo, _projectile, true] call EFUNC(frag,addPfhRound); }; @@ -143,13 +140,13 @@ if (_activated) then { //--- Update if (_attach) then { - waitUntil { + waituntil { _soundSource setposatl getposatl _projectile; sleep 1; isnull _projectile || isnull _logic }; } else { - waitUntil { + waituntil { _soundSource setposatl getposatl _projectile; if (getposatl _logic distance _pos > 0 || direction _logic != _dir) then { @@ -161,7 +158,7 @@ if (_activated) then { _projectile setposasl _posNew; _pos = getposatl _logic; _dir = direction _logic; - missionnamespace setVariable [_dirVar,_dir]; + missionnamespace setvariable [_dirVar,_dir]; }; sleep 0.1; isnull _projectile || isnull _logic @@ -180,7 +177,7 @@ if (_activated) then { } else { //--- Repeat to achieve permanent effect - _repeat = _logic getVariable ["repeat",0] > 0; + _repeat = _logic getvariable ["repeat",0] > 0; if (_repeat) then { [_logic,_units,_activated] call bis_fnc_moduleprojectile; } else { @@ -191,6 +188,6 @@ if (_activated) then { deletevehicle _logic; }; } else { - ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeOf _logic] call bis_fnc_error; + ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeof _logic] call bis_fnc_error; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 6d2d3fd950..994b445d8d 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -34,13 +34,16 @@ if (_activated && local _logic && !isnull curatorcamera) then { if ((_mouseOver select 0) == typename objnull) then {_unit = _mouseOver select 1;}; _unit = effectivecommander _unit; + //--- Temp owner + private _tempOwner = _unit getvariable ["bis_fnc_moduleRemoteControl_owner", objnull]; + //--- Check if the unit is suitable _error = ""; if !(side group _unit in [east,west,resistance,civilian]) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorEmpty";}; if (isplayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";}; if !(alive _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorDestroyed";}; if (isnull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";}; - if !(isnull (_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; + if (!isnull _tempOwner && {_tempOwner in allPlayers}) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; if (isuavconnected vehicle _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; if (_error == "") then { diff --git a/addons/zeus/functions/fnc_getModuleDestination.sqf b/addons/zeus/functions/fnc_getModuleDestination.sqf index 138d8342a5..f29b42550c 100644 --- a/addons/zeus/functions/fnc_getModuleDestination.sqf +++ b/addons/zeus/functions/fnc_getModuleDestination.sqf @@ -40,8 +40,8 @@ GVAR(moduleDestination_displayEHMouse) = [findDisplay 312, "mouseButtonDown", { params ["", "_mouseButton", "", "", "_shift", "_ctrl", "_alt"]; if (_mouseButton != 0) exitWith {}; // Only watch for LMB - TRACE_2("placed",_object,_mousePosASL); + //IGNORE_PRIVATE_WARNING ["_thisArgs"] _thisArgs params ["_object", "_code"]; // Get mouse position on 2D map or 3D world @@ -52,6 +52,7 @@ GVAR(moduleDestination_displayEHMouse) = [findDisplay 312, "mouseButtonDown", { } else { AGLToASL (screenToWorld getMousePosition); }; + TRACE_2("placed",_object,_mousePosASL); [true, _object, _mousePosASL, _shift, _ctrl, _alt] call _code; GVAR(moduleDestination_running) = false; @@ -62,8 +63,8 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", { params ["", "_keyCode", "_shift", "_ctrl", "_alt"]; if (_keyCode != 1) exitWith {}; // Only watch for ESC - TRACE_2("aborted",_object,_mousePosASL); + //IGNORE_PRIVATE_WARNING ["_thisArgs"] _thisArgs params ["_object", "_code"]; // Get mouse position on 2D map or 3D world @@ -74,6 +75,7 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", { } else { AGLToASL (screenToWorld getMousePosition); }; + TRACE_2("aborted",_object,_mousePosASL); [false, _object, _mousePosASL, _shift, _ctrl, _alt] call _code; GVAR(moduleDestination_running) = false; @@ -83,6 +85,7 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", { // Add draw EH for the zeus map - draws the 2D icon and line GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw", { params ["_mapCtrl"]; + //IGNORE_PRIVATE_WARNING ["_thisArgs"] _thisArgs params ["_object", "_text", "_icon", "_color"]; private _pos2d = (((findDisplay 312) displayCtrl 50) ctrlMapScreenToWorld getMousePosition); diff --git a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf index 2899d8d952..05c5de668e 100644 --- a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf +++ b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf @@ -25,27 +25,23 @@ if !(isClass (configFile >> "ACE_Curator")) exitWith { ERROR("The ACE_Curator class does not exist") }; params ["_logic"]; + private _removeAddons = []; - -private _numCfgs = count (configFile >> "ACE_Curator"); -for "_n" from 0 to (_numCfgs - 1) do { - private _cfg = (configFile >> "ACE_Curator") select _n; - - if (isArray _cfg) then { - _requiredAddon = getArray _cfg; +{ + private _addon = _x; + if (isArray _addon) then { { if !(isClass (configFile >> "CfgPatches" >> _x)) exitWith { - _removeAddons pushBack (configName _cfg); + _removeAddons pushBack (configName _addon); }; - } forEach _requiredAddon; + } forEach (getArray _addon); }; - if (isText _cfg) then { - _requiredAddon = getText _cfg; - if !(isClass (configFile >> "CfgPatches" >> _requiredAddon)) then { - _removeAddons pushBack (configName _cfg); + if (isText _addon) then { + if !(isClass (configFile >> "CfgPatches" >> getText _addon)) then { + _removeAddons pushBack (configName _addon); }; }; -}; +} forEach configProperties [configFile >> "ACE_Curator"]; _logic removeCuratorAddons _removeAddons; diff --git a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf index 5b05d256f4..6f60f80947 100644 --- a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf +++ b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf @@ -17,9 +17,9 @@ */ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && {local _logic}) exitWith {}; +if !(local _logic) exitWith {}; if !(["ace_fastroping"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf b/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf index 56d3dca9d9..ed633c2033 100644 --- a/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf +++ b/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf @@ -17,9 +17,9 @@ */ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf b/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf index da9327af7a..58cd6c1063 100644 --- a/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf +++ b/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf @@ -17,9 +17,9 @@ */ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index c2345616f0..317c785f20 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if (isNil QEFUNC(captives,setHandcuffed)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleConfigurePylons.sqf b/addons/zeus/functions/fnc_moduleConfigurePylons.sqf index 4998ae8bac..404605451e 100644 --- a/addons/zeus/functions/fnc_moduleConfigurePylons.sqf +++ b/addons/zeus/functions/fnc_moduleConfigurePylons.sqf @@ -19,9 +19,9 @@ if (canSuspend) exitWith {[FUNC(moduleConfigurePylons), _this] call CBA_fnc_directCall;}; -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && {local _logic}) exitWith {}; +if !(local _logic) exitWith {}; private _aircraft = attachedTo _logic; diff --git a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf index ce864e85b0..1d4e2769b8 100644 --- a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf +++ b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf @@ -17,8 +17,8 @@ #include "script_component.hpp" -_this params ["_varName","_varValue"]; -_varValue params ["_general","_accuracy","_handling","_spotting","_cover","_combat"]; +params ["_varName", "_varValue"]; +_varValue params ["_general", "_accuracy", "_handling", "_spotting", "_cover", "_combat"]; TRACE_1("Params",_this); TRACE_6("AI settings updated",GVAR(GlobalSkillAI)); diff --git a/addons/zeus/functions/fnc_moduleGroupSide.sqf b/addons/zeus/functions/fnc_moduleGroupSide.sqf index 050b92a9fc..2a52df09da 100644 --- a/addons/zeus/functions/fnc_moduleGroupSide.sqf +++ b/addons/zeus/functions/fnc_moduleGroupSide.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" -params ["_unit","_newSide"]; +params ["_unit", "_newSide"]; private _side = side _unit; // Nothing to do here diff --git a/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf b/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf index 630fd537ef..33ceb703a1 100644 --- a/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf +++ b/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf @@ -19,9 +19,9 @@ if (canSuspend) exitWith {[FUNC(moduleLoadIntoCargo), _this] call CBA_fnc_directCall;}; -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && {local _logic}) exitWith {}; +if !(local _logic) exitWith {}; private _cargo = attachedTo _logic; diff --git a/addons/zeus/functions/fnc_moduleSearchNearby.sqf b/addons/zeus/functions/fnc_moduleSearchNearby.sqf index 30d545e6d9..a73dbd7fe8 100644 --- a/addons/zeus/functions/fnc_moduleSearchNearby.sqf +++ b/addons/zeus/functions/fnc_moduleSearchNearby.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic","_units","_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; //Validate the module target: private _unit = effectiveCommander (attachedTo _logic); diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf index 578aeb27f9..b2cd233bc7 100644 --- a/addons/zeus/functions/fnc_moduleSetMedic.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf index 09636bc006..4977b21986 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf index 6e240416ff..a819a15d9e 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index 2d24242fbd..fceb72b57f 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if (isNil QEFUNC(captives,setSurrendered)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index 30dc7b9d27..1e0955997f 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if (isNil QEFUNC(medical,setUnconscious)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleZeusSettings.sqf b/addons/zeus/functions/fnc_moduleZeusSettings.sqf index b52c597c2c..8abd714824 100644 --- a/addons/zeus/functions/fnc_moduleZeusSettings.sqf +++ b/addons/zeus/functions/fnc_moduleZeusSettings.sqf @@ -18,9 +18,7 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; - -if !(_activated) exitWith {}; +params ["_logic"]; [_logic, QGVAR(zeusAscension), "zeusAscension"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(zeusBird), "zeusBird"] call EFUNC(common,readSettingFromModule); diff --git a/addons/zeus/functions/fnc_ui_attributePosition.sqf b/addons/zeus/functions/fnc_ui_attributePosition.sqf index e0396e2c03..ecd3458ac2 100644 --- a/addons/zeus/functions/fnc_ui_attributePosition.sqf +++ b/addons/zeus/functions/fnc_ui_attributePosition.sqf @@ -48,7 +48,7 @@ private _fnc_onDraw = { }; private _fnc_onMapClick = { - params ["_map","_button","_x","_y","_shift","_ctrl","_alt"]; + params ["_map","_button"]; if (_button == 0) then { private _display = ctrlParent _map; diff --git a/addons/zeus/functions/fnc_ui_groupSide.sqf b/addons/zeus/functions/fnc_ui_groupSide.sqf index 90de9d06ca..e5720e0720 100644 --- a/addons/zeus/functions/fnc_ui_groupSide.sqf +++ b/addons/zeus/functions/fnc_ui_groupSide.sqf @@ -115,7 +115,7 @@ private _fnc_onUnload = { }; private _fnc_onConfirm = { - params [["_ctrlButtonOK", controlNull, [controlNull]]]; + params ["_ctrlButtonOK"]; private _display = ctrlparent _ctrlButtonOK; if (isNull _display) exitWith {}; diff --git a/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf b/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf index 3085271dfa..9dff6808e4 100644 --- a/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf +++ b/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf @@ -126,18 +126,7 @@ private _fnc_onConfirm = { private _target = _combo2 lbValue (lbCurSel _combo2); private _gear = _combo3 lbValue (lbCurSel _combo3); - - _toggle = [ - false, - true - ] select (_toggle == 1); - - _gear = [ - false, - true - ] select (_gear == 1); - - [_logic, _toggle, _gear, _target] call FUNC(moduleToggleFlashlight); + [_logic, _toggle == 1, _gear == 1, _target] call FUNC(moduleToggleFlashlight); }; _display displayAddEventHandler ["unload", _fnc_onUnload]; diff --git a/addons/zeus/functions/fnc_ui_toggleNvg.sqf b/addons/zeus/functions/fnc_ui_toggleNvg.sqf index 10ed14aa0e..822e552dac 100644 --- a/addons/zeus/functions/fnc_ui_toggleNvg.sqf +++ b/addons/zeus/functions/fnc_ui_toggleNvg.sqf @@ -115,12 +115,7 @@ private _fnc_onConfirm = { private _toggle = _combo1 lbValue (lbCurSel _combo1); private _target = _combo2 lbValue (lbCurSel _combo2); - private _toggle = [ - false, - true - ] select (_toggle == 1); - - [_logic, _toggle, _target] call FUNC(moduleToggleNvg); + [_logic, _toggle == 1, _target] call FUNC(moduleToggleNvg); }; _display displayAddEventHandler ["unload", _fnc_onUnload];