From 7bdfe03c922fcd92a306871b5a7a59ec476af640 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Sun, 9 Aug 2015 02:19:34 +0200 Subject: [PATCH 001/180] Code cleanup of Concertina_wire module --- addons/concertina_wire/XEH_init.sqf | 5 ++- .../concertina_wire/functions/fnc_deploy.sqf | 35 ++++++++++--------- .../functions/fnc_dismount.sqf | 8 ++--- .../functions/fnc_dismountSuccess.sqf | 22 ++++++------ .../functions/fnc_handleDamage.sqf | 9 ++--- .../functions/fnc_handleKilled.sqf | 8 ++--- .../functions/fnc_vehicleDamage.sqf | 12 +++---- 7 files changed, 45 insertions(+), 54 deletions(-) diff --git a/addons/concertina_wire/XEH_init.sqf b/addons/concertina_wire/XEH_init.sqf index dbce4a9b92..dc6424f172 100644 --- a/addons/concertina_wire/XEH_init.sqf +++ b/addons/concertina_wire/XEH_init.sqf @@ -1,4 +1,3 @@ #include "script_component.hpp" - -PARAMS_1(_wire); -_wire addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; \ No newline at end of file +params ["_wire"]; +_wire addEventHandler ["HandleDamage", FUNC(handleDamage)]; diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf index 5548cad649..aedc8b9608 100644 --- a/addons/concertina_wire/functions/fnc_deploy.sqf +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -8,10 +8,9 @@ * 1: unit * * Return Value: - * Nothing - * - * Return value: * None + * + * Public: No */ #include "script_component.hpp" @@ -22,7 +21,7 @@ private ["_wireNoGeo", "_dir", "_pos", "_wireNoGeoPos"]; _wireNoGeo = "ACE_ConcertinaWireNoGeo" createVehicle [0,0,0]; { _wireNoGeo animate [_x, 1]; -} foreach WIRE_FAST; +} count WIRE_FAST; GVAR(placer) = _unit; _dir = getDir _unit; @@ -37,8 +36,9 @@ deleteVehicle _wirecoil; _unit setVariable [QGVAR(wireDeployed), false]; GVAR(deployPFH) = [{ - EXPLODE_3_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit); - + params ["_args", "_idPFH"]; + _args params ["_wireNoGeo", "_wireNoGeoPos", "_unit"]; + private ["_range", "_posStart", "_posEnd", "_dirVect", "_dir", "_anim", "_wire"]; _posStart = (_wireNoGeo modelToWorldVisual (_wireNoGeo selectionPosition "start")) call EFUNC(common,positionToASL); _posEnd = (getPosASL _unit) vectorAdd (vectorDir _unit); @@ -46,37 +46,38 @@ GVAR(deployPFH) = [{ _dir = _dirVect call CBA_fnc_vectDir; _range = vectorMagnitude _dirVect; _anim = 0 max (1 - (_range / 12)); - + if (!(alive _unit) || _range >= 12 || (_unit getVariable [QGVAR(wireDeployed), false])) exitWith { _wire = "ACE_ConcertinaWire" createvehicle [0, 0, 0]; { _wire animate [_x, _anim]; - } foreach WIRE_FAST; - + } count WIRE_FAST; + [{ - EXPLODE_5_PVT(_this select 0,_wireNoGeo,_wire,_anim,_dir,_wireNoGeoPos); + params ["_args", "_idPFH"]; + _args params ["_wireNoGeo", "_wire", "_anim", "_dir", "_wireNoGeoPos"]; if (_wire animationPhase "wire_2" == _anim) then { deleteVehicle _wireNoGeo; _wire setDir _dir; _wire setPosASL _wireNoGeoPos; - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; }, 0, [_wireNoGeo, _wire, _anim, _dir, _wireNoGeoPos]] call CBA_fnc_addPerFrameHandler; - + [_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); call EFUNC(interaction,hideMouseHint); - - [_this select 1] call CBA_fnc_removePerFrameHandler; + + [_idPFH] call CBA_fnc_removePerFrameHandler; }; - + _wireNoGeo setDir _dir; { _wireNoGeo animate [_x, _anim]; - } foreach WIRE_FAST; + } count WIRE_FAST; }, 0, [_wireNoGeo, _wireNoGeoPos, _unit]] call CBA_fnc_addPerFrameHandler; [localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint); - + GVAR(placer) setVariable [QGVAR(Deploy), [GVAR(placer), "DefaultAction", {GVAR(deployPFH) != -1}, diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf index c9a5d1f9ff..c7ba3f50b1 100644 --- a/addons/concertina_wire/functions/fnc_dismount.sqf +++ b/addons/concertina_wire/functions/fnc_dismount.sqf @@ -8,10 +8,9 @@ * 1: unit * * Return Value: - * Nothing - * - * Return value: * None + * + * Public: No */ #include "script_component.hpp" @@ -21,8 +20,7 @@ if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exit _this call FUNC(dismount); }, _this] call EFUNC(common,execNextFrame); }; - -PARAMS_2(_wire,_unit); +params ["_wire", "_unit"]; private ["_config", "_delay"]; _config = (configFile >> "CfgVehicles" >> typeOf _unit); diff --git a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf index a6e34fe44f..a3f5081271 100644 --- a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf +++ b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf @@ -7,10 +7,9 @@ * 0: wire * * Return Value: - * Nothing - * - * Return value: * None + * + * Public: No */ #include "script_component.hpp" @@ -18,25 +17,26 @@ PARAMS_1(_wire); { _wire animate [_x, 1]; -} foreach WIRE_FAST; +} count WIRE_FAST; [{ - EXPLODE_1_PVT(_this select 0,_wire); - + params ["_args", "_idPFH"]; + _args params ["_wire"]; + if (_wire animationPhase "wire_2" == 1) then { private ["_dir", "_pos", "_wirecoil"]; - + _dir = getDir _wire; _pos = getPosASL _wire; - + _wirecoil = "ACE_ConcertinaWireCoil" createvehicle [0, 0, 0]; deleteVehicle _wire; - + _wirecoil setDir _dir; _wirecoil setPosASL _pos; _wirecoil setVelocity [0, 0, 0]; - - [_this select 1] call CBA_fnc_removePerFrameHandler; + + [_idPFH] call CBA_fnc_removePerFrameHandler; }; }, 0, [_wire]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/concertina_wire/functions/fnc_handleDamage.sqf b/addons/concertina_wire/functions/fnc_handleDamage.sqf index 61cd1c4e7c..43a04641dd 100644 --- a/addons/concertina_wire/functions/fnc_handleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_handleDamage.sqf @@ -11,15 +11,12 @@ * 4: projectile * * Return Value: - * Nothing - * - * Return value: * None + * + * Public: No */ #include "script_component.hpp" - -PARAMS_5(_wire,_selectionName,_damage,_source,_projectile); - +params ["_wire", "", "_damage", "_source", ""]; if (_damage < 0.5) exitWith { 0 }; if (!(isNull _source)) then { diff --git a/addons/concertina_wire/functions/fnc_handleKilled.sqf b/addons/concertina_wire/functions/fnc_handleKilled.sqf index f5f84a6afa..ac59798d10 100644 --- a/addons/concertina_wire/functions/fnc_handleKilled.sqf +++ b/addons/concertina_wire/functions/fnc_handleKilled.sqf @@ -8,14 +8,12 @@ * 1: killer (vehicle) * * Return Value: - * Nothing - * - * Return value: * None + * + * Public: No */ #include "script_component.hpp" - -PARAMS_2(_wire,_killer); +params ["_wire", "_killer"]; private ["_distance", "_vehicle"]; diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf index e7dff30000..41050eb9b9 100644 --- a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf @@ -7,14 +7,12 @@ * 1: vehicle * * Return Value: - * Nothing - * - * Return value: * None + * + * Public: No */ #include "script_component.hpp" - -PARAMS_2(_wire,_vehicle); +params ["_wire", "_vehicle"]; private ["_type", "_mode", "_anim", "_parts", "_selectionPart", "_selection", "_pos_w", "_dir_w"]; @@ -43,8 +41,8 @@ _dir_w = getDir _wire; if (_mode == 0) then { private ["_x", "_y", "_found", "_wireCheckPosAr", "_no"]; - _x = _pos_w select 0; - _y = _pos_w select 1; + _pos_w params ["_x","_y"]; + // Check if two Single coils are placed next to each other (i.e playes have built a big wire obstacle) _wireCheckPosAr = [ [_x + (sin (_dir_w+90) * 1.5),_y + (cos (_dir_w+90) * 1.5)], From bd1a6d14a80ba54238ebdceaffe179df13d1afe3 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Sun, 9 Aug 2015 02:33:00 +0200 Subject: [PATCH 002/180] Code cleanup of Dagr module --- addons/dagr/XEH_postInit.sqf | 2 +- addons/dagr/functions/fnc_menuInit.sqf | 16 ++++++++-------- addons/dagr/functions/fnc_outputData.sqf | 13 +++++++------ addons/dagr/functions/fnc_outputVector.sqf | 19 +++++++++---------- addons/dagr/functions/fnc_outputWP.sqf | 19 ++++++++++--------- addons/dagr/functions/fnc_toggleOverlay.sqf | 5 +++-- 6 files changed, 38 insertions(+), 36 deletions(-) diff --git a/addons/dagr/XEH_postInit.sqf b/addons/dagr/XEH_postInit.sqf index 39f2a7ea28..883a73d418 100644 --- a/addons/dagr/XEH_postInit.sqf +++ b/addons/dagr/XEH_postInit.sqf @@ -30,4 +30,4 @@ GVAR(vectorConnected) = false; GVAR(noVectorData) = true; GVAR(vectorGrid) = "00000000"; -["RangerfinderData", {_this call FUNC(handleRangeFinderData)}] call EFUNC(common,addEventHandler); +["RangerfinderData", FUNC(handleRangeFinderData)] call EFUNC(common,addEventHandler); diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf index 739f41df0b..e4fb341537 100644 --- a/addons/dagr/functions/fnc_menuInit.sqf +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -74,13 +74,13 @@ GVAR(menuRun) = true; GVAR(menuRun) = false; [_this select 1] call CBA_fnc_removePerFrameHandler; }; - + if (GVAR(MENU_B)) then { GVAR(menu) = "main"; GVAR(selection) = 0; GVAR(numSelections) = 5; }; - + if (!GVAR(add) && !GVAR(edit)) then { if (GVAR(DOWN)) then { GVAR(selection) = (GVAR(numSelections) + GVAR(selection) + 1); @@ -90,7 +90,7 @@ GVAR(menuRun) = true; }; GVAR(selection) = if (GVAR(numSelections) > 0) then { GVAR(selection) % GVAR(numSelections) } else { 0 }; }; - + if (GVAR(LEFT)) then { GVAR(pointer) = (8 + GVAR(pointer) - 1); }; @@ -98,7 +98,7 @@ GVAR(menuRun) = true; GVAR(pointer) = (8 + GVAR(pointer) + 1); }; GVAR(pointer) = GVAR(pointer) % 8; - + (__dsp displayCtrl __PSelection1) ctrlSetText ""; (__dsp displayCtrl __PSelection2) ctrlSetText ""; (__dsp displayCtrl __PSelection3) ctrlSetText ""; @@ -113,7 +113,7 @@ GVAR(menuRun) = true; (__dsp displayCtrl __Selection2) ctrlSetText ""; (__dsp displayCtrl __Selection3) ctrlSetText ""; (__dsp displayCtrl __Selection4) ctrlSetText ""; - + (__dsp displayCtrl __F1) ctrlSetText ""; (__dsp displayCtrl __F2) ctrlSetText ""; (__dsp displayCtrl __F3) ctrlSetText ""; @@ -124,7 +124,7 @@ GVAR(menuRun) = true; (__dsp displayCtrl __Option2) ctrlSetText ""; (__dsp displayCtrl __Option3) ctrlSetText ""; (__dsp displayCtrl __Option4) ctrlSetText ""; - + switch (GVAR(menu)) do { case "main": { if (GVAR(SEL)) then { @@ -500,7 +500,7 @@ GVAR(menuRun) = true; case 6: { GVAR(digit6) = (10 + GVAR(digit6) - 1) % 10 }; case 7: { GVAR(digit7) = (10 + GVAR(digit7) - 1) % 10 }; case 8: { GVAR(digit8) = (10 + GVAR(digit8) - 1) % 10 }; - }; + }; }; }; }; @@ -590,7 +590,7 @@ GVAR(menuRun) = true; }; }; }; - + if (!GVAR(busy)) then { GVAR(F3) = false; GVAR(F2) = false; diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf index 9bcf244fbc..63350c71a3 100644 --- a/addons/dagr/functions/fnc_outputData.sqf +++ b/addons/dagr/functions/fnc_outputData.sqf @@ -31,18 +31,19 @@ if (GVAR(outputPFH) != -1) exitWith {}; GVAR(outputPFH) = [{ private["_dagrElevation", "_dagrGrid", "_dagrHeading", "_dagrSpeed", "_dagrTime", "_elevation", "_gridArray", "_speed"]; - + // Abort Condition if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith { GVAR(outputPFH) = -1; 135471 cutText ["", "PLAIN"]; [_this select 1] call CBA_fnc_removePerFrameHandler; }; - + // GRID _gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos); - _dagrGrid = format ["%1 %2", ((_gridArray select 0) select [0,4]), ((_gridArray select 1) select [0,4])]; - + _gridArray params ["_gridArrayX","_gridArrayY"]; + _dagrGrid = format ["%1 %2", ((_gridArrayX) select [0,4]), ((_gridArrayY) select [0,4])]; + // SPEED _speed = speed (vehicle ACE_player); _speed = floor (_speed * 10) / 10; @@ -68,7 +69,7 @@ GVAR(outputPFH) = [{ __gridControl ctrlSetText format ["%1", _dagrGrid]; __speedControl ctrlSetText format ["%1", _dagrSpeed]; __elevationControl ctrlSetText format ["%1", _dagrElevation]; - __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1 ", _dagrHeading] }); + __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1 �", _dagrHeading] }); __timeControl ctrlSetText format ["%1", _dagrTime]; - + }, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index ad9068344f..7787a7ff96 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -private ["_pos", "_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevation", "_dagrTime", "_elevation", "_xCoord", "_yCoord"]; +private ["_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevation", "_dagrTime", "_elevation", "_xCoord", "_yCoord"]; 135471 cutRsc ["DAGR_DISPLAY", "plain down"]; @@ -30,15 +30,14 @@ private ["_pos", "_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dag __background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa)); if (GVAR(noVectorData)) exitwith {}; - -_pos = [GVAR(LAZPOS) select 0, GVAR(LAZPOS) select 1]; +GVAR(LAZPOS) params ["_lazPosX", "_lazPosY", "_lazPosZ"]; // Incase grids go neg due to 99-00 boundry -if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];}; -if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];}; - +if (_lazPosX < 0) then { _lazPosX = _lazPosX + 99999;}; +if (_lazPosY < 0) then {_lazPosY = _lazPosY + 99999;}; + // Find laser position -_xGrid = toArray Str(round(_pos select 0)); +_xGrid = toArray Str(round _lazPosX); while {count _xGrid < 5} do { _xGrid = [48] + _xGrid; @@ -47,7 +46,7 @@ _xGrid resize 4; _xGrid = toString _xGrid; _xGrid = parseNumber _xGrid; -_yGrid = toArray Str(round(_pos select 1)); +_yGrid = toArray Str(round _lazPosY); while {count _yGrid < 5} do { _yGrid = [48] + _yGrid; }; @@ -72,7 +71,7 @@ _yCoord = switch true do { _dagrGrid = _xCoord + " " + _yCoord; // Find target elevation -_elevation = floor ((GVAR(LAZPOS) select 2) + EGVAR(common,mapAltitude)); +_elevation = floor (_lazPosZ) + EGVAR(common,mapAltitude)); _dagrElevation = str _elevation + "m"; // Time @@ -94,5 +93,5 @@ GVAR(vectorGrid) = _dagrGrid; __gridControl ctrlSetText format ["%1", _dagrGrid]; __speedControl ctrlSetText format ["%1", _dagrDist]; __elevationControl ctrlSetText format ["%1", _dagrElevation]; -__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _bearing] } else { format ["%1", _bearing] }); +__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _bearing] } else { format ["%1�", _bearing] }); __timeControl ctrlSetText format ["%1", _dagrTime]; diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf index 71c3e7c1a7..77bee00398 100644 --- a/addons/dagr/functions/fnc_outputWP.sqf +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -31,22 +31,23 @@ if (GVAR(outputPFH) != -1) exitWith {}; GVAR(outputPFH) = [{ private["_MYpos", "_WPpos", "_bearing", "_dagrDistance", "_dagrGrid", "_dagrHeading", "_distance", "_gridArray"]; - + // Abort Condition if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith { GVAR(outputPFH) = -1; 135471 cutText ["", "PLAIN"]; [_this select 1] call CBA_fnc_removePerFrameHandler; }; - + // GRID _gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos); - _dagrGrid = format ["%1 %2", ((_gridArray select 0) select [0,4]), ((_gridArray select 1) select [0,4])]; + _gridArray params ["_gridArrayX","_gridArrayY"]; + _dagrGrid = format ["%1 %2", (_gridArrayX select [0,4]), (_gridArrayY select [0,4])]; // WP Grid _xGrid2 = floor (DAGR_WP_INFO / 10000); _yGrid2 = DAGR_WP_INFO - _xGrid2 * 10000; - + _xCoord2 = switch true do { case (_xGrid2 >= 1000): { "" + Str(_xGrid2) }; case (_xGrid2 >= 100): { "0" + Str(_xGrid2) }; @@ -60,7 +61,7 @@ GVAR(outputPFH) = [{ case (_yGrid2 >= 10): { "00" + Str(_yGrid2) }; default { "000" + Str(_yGrid2) }; }; - + _dagrGrid2 = _xCoord2 + " " + _yCoord2; // Distance @@ -69,7 +70,7 @@ GVAR(outputPFH) = [{ _distance = _MYpos distance _WPpos; _distance = floor (_distance * 10) / 10; _dagrDistance = str _distance + "m"; - + // Heading _dagrHeading = floor (if (GVAR(useDegrees)) then { direction (vehicle ACE_player) @@ -79,12 +80,12 @@ GVAR(outputPFH) = [{ // WP Heading _bearing = floor ((_WPpos vectorDiff _MYpos) call CBA_fnc_vectDir); - + // Output __gridControl ctrlSetText format ["%1", _dagrGrid]; __speedControl ctrlSetText format ["%1", _bearing]; __elevationControl ctrlSetText format ["%1", _dagrGrid2]; - __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1", _dagrHeading] }); + __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1�", _dagrHeading] }); __timeControl ctrlSetText format ["%1", _dagrDistance]; - + }, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dagr/functions/fnc_toggleOverlay.sqf b/addons/dagr/functions/fnc_toggleOverlay.sqf index 1fcb87d0ff..d48a83ae51 100644 --- a/addons/dagr/functions/fnc_toggleOverlay.sqf +++ b/addons/dagr/functions/fnc_toggleOverlay.sqf @@ -23,11 +23,12 @@ if (GVAR(run)) then { }; GVAR(hidden) = true; [{ - EXPLODE_1_PVT(_this select 0,_vehicle); + params ["_args", "_idPFH"]; + _args params ["_vehicle"]; if (!GVAR(run) || (!alive ACE_player) || (vehicle ACE_player != _vehicle)) exitWith { GVAR(run) = false; 135471 cutText ["", "PLAIN"]; - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; if (cameraView == "GUNNER") then { if (!GVAR(hidden)) then { From a38cdda8e36da5737946f11f4b474e74e2498d98 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Sat, 8 Aug 2015 08:26:15 +0200 Subject: [PATCH 003/180] First iteration on implementing Dslyecxi's ST Map Gestures --- addons/map_gestures/$PBOPREFIX$ | 1 + addons/map_gestures/ACE_Settings.hpp | 50 ++++++++++ addons/map_gestures/CfgEventHandlers.hpp | 11 +++ addons/map_gestures/CfgVehicles.hpp | 64 +++++++++++++ addons/map_gestures/XEH_postInit.sqf | 16 ++++ addons/map_gestures/XEH_preInit.sqf | 17 ++++ addons/map_gestures/config.cpp | 17 ++++ .../functions/fnc_assignClientIDOnServer.sqf | 24 +++++ .../functions/fnc_drawMapGestures.sqf | 48 ++++++++++ .../functions/fnc_endTransmit.sqf | 21 ++++ .../functions/fnc_getProximityPlayers.sqf | 23 +++++ .../functions/fnc_initTransmit.sqf | 21 ++++ .../functions/fnc_moduleGroupSettings.sqf | 53 +++++++++++ .../functions/fnc_moduleSettings.sqf | 35 +++++++ .../functions/fnc_receiverInit.sqf | 32 +++++++ .../functions/fnc_sanitizeName.sqf | 30 ++++++ .../map_gestures/functions/fnc_transmit.sqf | 42 ++++++++ .../functions/fnc_transmitterInit.sqf | 59 ++++++++++++ .../functions/script_component.hpp | 1 + addons/map_gestures/script_component.hpp | 12 +++ addons/map_gestures/stringtable.xml | 95 +++++++++++++++++++ 21 files changed, 672 insertions(+) create mode 100644 addons/map_gestures/$PBOPREFIX$ create mode 100644 addons/map_gestures/ACE_Settings.hpp create mode 100644 addons/map_gestures/CfgEventHandlers.hpp create mode 100644 addons/map_gestures/CfgVehicles.hpp create mode 100644 addons/map_gestures/XEH_postInit.sqf create mode 100644 addons/map_gestures/XEH_preInit.sqf create mode 100644 addons/map_gestures/config.cpp create mode 100644 addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf create mode 100644 addons/map_gestures/functions/fnc_drawMapGestures.sqf create mode 100644 addons/map_gestures/functions/fnc_endTransmit.sqf create mode 100644 addons/map_gestures/functions/fnc_getProximityPlayers.sqf create mode 100644 addons/map_gestures/functions/fnc_initTransmit.sqf create mode 100644 addons/map_gestures/functions/fnc_moduleGroupSettings.sqf create mode 100644 addons/map_gestures/functions/fnc_moduleSettings.sqf create mode 100644 addons/map_gestures/functions/fnc_receiverInit.sqf create mode 100644 addons/map_gestures/functions/fnc_sanitizeName.sqf create mode 100644 addons/map_gestures/functions/fnc_transmit.sqf create mode 100644 addons/map_gestures/functions/fnc_transmitterInit.sqf create mode 100644 addons/map_gestures/functions/script_component.hpp create mode 100644 addons/map_gestures/script_component.hpp create mode 100644 addons/map_gestures/stringtable.xml diff --git a/addons/map_gestures/$PBOPREFIX$ b/addons/map_gestures/$PBOPREFIX$ new file mode 100644 index 0000000000..8672ea58f4 --- /dev/null +++ b/addons/map_gestures/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\map_gestures diff --git a/addons/map_gestures/ACE_Settings.hpp b/addons/map_gestures/ACE_Settings.hpp new file mode 100644 index 0000000000..c7b9a8b2ed --- /dev/null +++ b/addons/map_gestures/ACE_Settings.hpp @@ -0,0 +1,50 @@ +class ACE_Settings { + class GVAR(enabled) { + value = 1; + typeName = "BOOL"; + displayName = CSTRING(enabled_displayName); + description = CSTRING(enabled_description); + }; + class GVAR(maxRange) { + value = 7; + typeName = "SCALAR"; + displayName = CSTRING(maxRange_displayName); + description = CSTRING(maxRange_description); + }; + class GVAR(interval) { + value = 0.03; + typeName = "SCALAR"; + displayName = CSTRING(interval_displayName); + description = CSTRING(interval_description); + }; + class GVAR(defaultLeadColor) { + value[] = {1, 0.88, 0, 0.95}; + typeName = "COLOR"; + displayName = CSTRING(defaultLeadColor_displayName); + description = CSTRING(defaultLeadColor_description); + }; + class GVAR(defaultColor) { + value[] = {1, 0.88, 0, 0.7}; + typeName = "COLOR"; + displayName = CSTRING(defaultColor_displayName); + description = CSTRING(defaultColor_description); + }; + class GVAR(GroupColorConfigurations) { + value[] = {}; + typeName = "ARRAY"; + displayName = CSTRING(GroupColorConfigurations_displayName); + description = CSTRING(GroupColorConfigurations_description); + }; + class GVAR(GroupColorConfigurationsGroups) { + value[] = {}; + typeName = "ARRAY"; + displayName = CSTRING(GroupColorConfigurationsGroups_displayName); + description = CSTRING(GroupColorConfigurationsGroups_description); + }; + class GVAR(GroupColorConfigurationsGroupIndex) { + value[] = {}; + typeName = "ARRAY"; + displayName = CSTRING(GroupColorConfigurationsGroupIndex_displayName); + description = CSTRING(GroupColorConfigurationsGroupIndex_description); + }; +}; diff --git a/addons/map_gestures/CfgEventHandlers.hpp b/addons/map_gestures/CfgEventHandlers.hpp new file mode 100644 index 0000000000..e75956f440 --- /dev/null +++ b/addons/map_gestures/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/map_gestures/CfgVehicles.hpp b/addons/map_gestures/CfgVehicles.hpp new file mode 100644 index 0000000000..30204629a8 --- /dev/null +++ b/addons/map_gestures/CfgVehicles.hpp @@ -0,0 +1,64 @@ +class CfgVehicles { + class ACE_Module; + class GVAR(moduleSettings): ACE_Module { + scope = 2; + category = "ACE"; + displayName = CSTRING(moduleSettings_displayName); + function = QFUNC(moduleSettings); + isGlobal = 0; + author = ECSTRING(common,ACETeam); + class Arguments { + class enabled { + displayName = CSTRING(enabled_DisplayName); + typeName = "BOOL"; + defaultValue = 1; + }; + class maxRange { + displayName = CSTRING(maxRange_displayName); + description = CSTRING(maxRange_description); + typeName = "NUMBER"; + defaultValue = 4; + }; + class interval { + displayName = CSTRING(interval_displayName); + description = CSTRING(interval_description); + typeName = "NUMBER"; + defaultValue = 0.03; + }; + class defaultLeadColor { + displayName = CSTRING(defaultLeadColor_displayName); + description = CSTRING(defaultLeadColor_description); + typeName = "STRING"; + defaultValue = "0,0,0,0"; + }; + class defaultColor { + displayName = CSTRING(defaultColor_displayName); + description = CSTRING(defaultColor_description); + typeName = "STRING"; + defaultValue = "0,0,0,0"; + }; + }; + }; + class GVAR(moduleGroupSettings): ACE_Module { + scope = 2; + category = "ACE"; + displayName = CSTRING(moduleGroupSettings_displayName); + function = QFUNC(moduleGroupSettings); + isGlobal = 0; + author = ECSTRING(common,ACETeam); + class Arguments { + class leadColor { + displayName = CSTRING(leadColor_displayName); + description = CSTRING(leadColor_description); + typeName = "STRING"; + defaultValue = "0,0,0,0"; + }; + class color { + displayName = CSTRING(color_displayName); + description = CSTRING(color_description); + typeName = "STRING"; + defaultValue = "0,0,0,0"; + }; + }; + }; +}; diff --git a/addons/map_gestures/XEH_postInit.sqf b/addons/map_gestures/XEH_postInit.sqf new file mode 100644 index 0000000000..777463e86a --- /dev/null +++ b/addons/map_gestures/XEH_postInit.sqf @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +["SettingsInitialized", { + [{ + if (isNull (findDisplay 12)) exitWith {}; + + params ["", "_pfhId"]; + + call FUNC(receiverInit); + call FUNC(transmitterInit); + + [_pfhId] call CBA_fnc_removePerFrameHandler; + }, 1, []] call CBA_fnc_addPerFrameHandler; +}] call EFUNC(common,addEventHandler); diff --git a/addons/map_gestures/XEH_preInit.sqf b/addons/map_gestures/XEH_preInit.sqf new file mode 100644 index 0000000000..08159aa972 --- /dev/null +++ b/addons/map_gestures/XEH_preInit.sqf @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(assignClientIDOnServer); +PREP(drawMapGestures); +PREP(endTransmit); +PREP(getProximityPlayers); +PREP(initTransmit); +PREP(moduleGroupSettings); +PREP(moduleSettings); +PREP(receiverInit); +PREP(sanitizeName); +PREP(transmit); +PREP(transmitterInit); + +ADDON = true; diff --git a/addons/map_gestures/config.cpp b/addons/map_gestures/config.cpp new file mode 100644 index 0000000000..72e7f82078 --- /dev/null +++ b/addons/map_gestures/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"Dslyecxi", "MikeMatrix"}; + authorUrl = "https://github.com/MikeMatrix"; + VERSION_CONFIG; + }; +}; + +#include "ACE_Settings.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf b/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf new file mode 100644 index 0000000000..129c5066e1 --- /dev/null +++ b/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf @@ -0,0 +1,24 @@ +/* + * Author: MikeMatrix + * Assign readable client ID to unit on the server. + * + * Arguments: + * 0: Unit name + * + * Return Value: + * None + * + * Example: + * ["MikeMatrix"] call ace_map_gestures_fnc_assignClientIDOnServer + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unitName"]; + +{ + if (name _x == _unitName) then { + _x setVariable [QGVAR(owner_id), owner _x, true]; + }; +} count playableUnits; diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf new file mode 100644 index 0000000000..0b352418af --- /dev/null +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -0,0 +1,48 @@ +/* + * Author: MikeMatrix + * Receives and draws map gestures from nearby players. + * + * Arguments: + * 0: Map Handle + * + * Return Value: + * None + * + * Example: + * [findDisplay 12 displayCtrl 51] call ace_map_gesutres_fnc_drawMapGestures + * + * Public: No + */ +#include "script_component.hpp" + +if (!GVAR(enabled)) exitWith {}; +if (!visibleMap) exitWith {}; + +params ["_mapHandle"]; + +_nearDudes = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); +{ + _nameSane = [name _x] call FUNC(sanitizeName); + _drawPosVariableName = format [QGVAR(%1_DrawPos), _nameSane]; + if (!isNil _drawPosVariableName) then { + _pos = call compile _drawPosVariableName; + if (alive _x && + (_pos distance [0, 0, 0]) > 50 && + {_x getVariable QGVAR(Transmit)}) then { + _group = group _x; + _grpName = groupID _group; + + _color = [1, 1, 1, 1]; + if (_grpName in GVAR(GroupColorConfigurationsGroups)) then { + _grpNameIndex = GVAR(GroupColorConfigurationsGroups) find _grpName; + _color = (GVAR(GroupColorConfigurations) select (GVAR(GroupColorConfigurationsGroupIndex) select _grpNameIndex)) select (_x != leader _group); + } else { + _color = if (_x == leader _group) then {GVAR(defaultLeadColor)} else {GVAR(defaultColor)}; + }; + + _mapHandle drawIcon ["\a3\ui_f\data\gui\cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, 55, 55, 0, "", 1, 0.030, "PuristaBold", "left"]; + _mapHandle drawIcon ["#(argb,8,8,3)color(0,0,0,0)", [.2,.2,.2,.3], _pos, 20, 20, 0, name _x, 0, 0.030, "PuristaBold", "left"]; + }; + }; + nil +} count _nearDudes; diff --git a/addons/map_gestures/functions/fnc_endTransmit.sqf b/addons/map_gestures/functions/fnc_endTransmit.sqf new file mode 100644 index 0000000000..0db082aa65 --- /dev/null +++ b/addons/map_gestures/functions/fnc_endTransmit.sqf @@ -0,0 +1,21 @@ +/* + * Author: MikeMatrix + * Ensure that all variables used to indicate transmission are disabled. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_map_gestures_fnc_endTransmit + * + * Public: No + */ +#include "script_component.hpp" + +if (!GVAR(enabled)) exitWith {}; + +ACE_player setVariable [QGVAR(Transmit), false, true]; +GVAR(EnableTransmit) = false; diff --git a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf new file mode 100644 index 0000000000..eb1b609778 --- /dev/null +++ b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf @@ -0,0 +1,23 @@ +/* + * Author: MikeMatrix + * Returns all players in a given range and in the units vehicle. + * + * Arguments: + * 0: Unit + * 1: Range + * + * Return Value: + * All units in proximity + * + * Example: + * ["example value"] call ace_module_fnc_functionName + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_range"]; + +_proximityPlayers = (getPos _unit) nearEntities [["CAMAnBase"], _range]; +_proximityPlayers = _proximityPlayers - [_unit]; +(_proximityPlayers + (crew vehicle _unit)) diff --git a/addons/map_gestures/functions/fnc_initTransmit.sqf b/addons/map_gestures/functions/fnc_initTransmit.sqf new file mode 100644 index 0000000000..546e5d3c3b --- /dev/null +++ b/addons/map_gestures/functions/fnc_initTransmit.sqf @@ -0,0 +1,21 @@ +/* + * Author: MikeMatrix + * Initializes transmitting map gestures. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_map_gestures_fnc_initTransmit + * + * Public: No + */ +#include "script_component.hpp" + +if (!GVAR(enabled)) exitWith {}; + +GVAR(EnableTransmit) = true; +[FUNC(transmit), GVAR(interval), []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf new file mode 100644 index 0000000000..b51f4b99b4 --- /dev/null +++ b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf @@ -0,0 +1,53 @@ +/* + * Author: MikeMatrix + * Initializes Settings for the groups modules and transcodes settings to a useable format. + * + * Arguments: + * 0: Logic + * 1: Units + * 2: Activated + * + * Return Value: + * None + * + * Example: + * [module, [player], true] call ace_map_gestures_fnc_moduleGroupSettings + * + * Public: No + */ +#include "script_component.hpp" + +params ["_logic", "_units", "_activated"]; + +if (!_activated) exitWith {}; +if (!isServer) exitWith {}; + +_leadColor = call compile ("[" + (_logic getVariable ["leadColor", ""]) + "]"); +if (isNil "_leadColor" || !((typeName _leadColor) isEqualTo "ARRAY") || {count _leadColor != 4}) exitWith {}; +_color = call compile ("[" + (_logic getVariable ["color", ""]) + "]"); +if (isNil "_color" || !((typeName _color) isEqualTo "ARRAY") || {count _color != 4}) exitWith {}; + +_configurations = +GVAR(GroupColorConfigurations); +if (isNil "_configurations") then {_configurations = []}; +_configurationIndex = _configurations pushBack [_leadColor, _color]; + +_configurationGroups = +GVAR(GroupColorConfigurationsGroups); +_configurationGroupsIndex = +GVAR(GroupColorConfigurationsGroupIndex); + +if (isNil "_configurationGroups") then {_configurationGroups = [];}; +if (isNil "_configurationGroupsIndex") then {_configurationGroupsIndex = [];}; +_completedGroups = []; +{ + private "_group"; + _group = groupID (group _x); + if (!(_group in _completedGroups)) then { + _index = if (_group in _configurationGroups) then {_configurationGroups find _group} else {_configurationGroups pushBack _group}; + _configurationGroupsIndex set [_index, _configurationIndex]; + _completedGroups pushBack _group; + }; + nil +} count _units; + +[QGVAR(GroupColorConfigurations), _configurations, true, true] call EFUNC(common,setSetting); +[QGVAR(GroupColorConfigurationsGroups), _configurationGroups, true, true] call EFUNC(common,setSetting); +[QGVAR(GroupColorConfigurationsGroupIndex), _configurationGroupsIndex, true, true] call EFUNC(common,setSetting); diff --git a/addons/map_gestures/functions/fnc_moduleSettings.sqf b/addons/map_gestures/functions/fnc_moduleSettings.sqf new file mode 100644 index 0000000000..d53e118b46 --- /dev/null +++ b/addons/map_gestures/functions/fnc_moduleSettings.sqf @@ -0,0 +1,35 @@ +/* + * Author: MikeMatrix + * Initializes Settings for the module and transcodes settings to a useable format. + * + * Arguments: + * 0: Logic + * 1: Units + * 2: Activated + * + * Return Value: + * None + * + * Example: + * [module, [player], true] call ace_map_gestures_fnc_moduleGroupSettings + * + * Public: No + */ +#include "script_component.hpp" + +params ["_logic", "_units", "_activated"]; + +if (!_activated) exitWith {}; +if (!isServer) exitWith {}; + +[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(interval), "interval"] call EFUNC(common,readSettingFromModule); + +_defaultLeadColor = call compile ("[" + (_logic getVariable ["defaultLeadColor", ""]) + "]"); +if (isNil "_leadColor" || !((typeName _leadColor) isEqualTo "ARRAY") || {count _leadColor != 4}) exitWith {}; +[QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting); + +_defaultColor = call compile ("[" + (_logic getVariable ["defaultColor", ""]) + "]"); +if (isNil "_color" || !((typeName _color) isEqualTo "ARRAY") || {count _color != 4}) exitWith {}; +[QGVAR(defaultColor), _defaultColor, true, true] call EFUNC(common,setSetting); diff --git a/addons/map_gestures/functions/fnc_receiverInit.sqf b/addons/map_gestures/functions/fnc_receiverInit.sqf new file mode 100644 index 0000000000..44b5bada47 --- /dev/null +++ b/addons/map_gestures/functions/fnc_receiverInit.sqf @@ -0,0 +1,32 @@ +/* + * Author: MikeMatrix + * Initializes the receiver and hooks it to the Draw event of the map. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_map_gestures_fnc_receiverInit + * + * Public: No + */ +#include "script_component.hpp" + +{ + if (isPlayer _x) then { + _nameSane = [name _x] call FUNC(sanitizeName); + call compile format [QUOTE(GVAR(%1_DrawPos) = [ARR_3(1,1,1)];), _nameSane]; + }; + nil +} count allUnits; + +ACE_player setVariable [QGVAR(Transmit), false, true]; +GVAR(EnableTransmit) = false; + +if (!isNil QGVAR(DrawMapHandlerID)) then { + (findDisplay 12 displayCtrl 51) ctrlRemoveEventHandler ["Draw", GVAR(DrawMapHandlerID)]; GVAR(DrawMapHandlerID) = nil; +}; +GVAR(DrawMapHandlerID) = findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", FUNC(drawMapGestures)]; diff --git a/addons/map_gestures/functions/fnc_sanitizeName.sqf b/addons/map_gestures/functions/fnc_sanitizeName.sqf new file mode 100644 index 0000000000..bafe9d3052 --- /dev/null +++ b/addons/map_gestures/functions/fnc_sanitizeName.sqf @@ -0,0 +1,30 @@ +/* + * Author: MikeMatrix + * Cleans up unit names to be usable within variable names. + * + * Arguments: + * 0: Name + * + * Return Value: + * Sanitized name + * + * Example: + * ["I am a non valid variable name"] call ace_map_gestures_fnc_sanitizeName + * + * Public: No + */ +#include "script_component.hpp" + +private ["_alphabet", "_nameSanitized"]; + +params ["_name"]; + +_alphabet = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]; + +_nameSanitized = []; +{ + if (toString [_x] in _alphabet) then {_nameSanitized pushBack _x}; + nil +} count (toArray _name); + +toString _nameSanitized diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf new file mode 100644 index 0000000000..9defec2fd8 --- /dev/null +++ b/addons/map_gestures/functions/fnc_transmit.sqf @@ -0,0 +1,42 @@ +/* + * Author: MikeMatrix + * Transmit PFH + * + * Arguments: + * 0: Arguments + * 1: PFH ID + * + * Return Value: + * Return description + * + * Example: + * [[], 2] call ace_map_gestures_fnc_transmit + * + * Public: No + */ +#include "script_component.hpp" + +private ["_nearDudes", "_ownerID", "_nameSane"]; + +params ["", "_pfhId"]; + +if (!GVAR(EnableTransmit) || !visibleMap) exitWith { + call FUNC(endTransmit); + [_pfhId] call CBA_fnc_removePerFrameHandler; +}; + +_nearDudes = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); +TRACE_1("Near",_nearDudes) + +{ + _ownerID = _x getVariable QGVAR(owner_id); + if (isNil _ownerID) exitWith { + [0, {[_this] call FUNC(assignClientIDOnServer)}, name _x] call cba_fnc_GlobalExecute; + }; + _ownerID = _x getVariable QGVAR(owner_id); + + if (_ownerID != ACE_player getVariable QGVAR(owner_id)) then { + _nameSane = [name ACE_player] call FUNC(sanitizeName); + _ownerID publicVariableClient format [QGVAR(%1_DrawPos), _nameSane]; + }; +} count _nearDudes; diff --git a/addons/map_gestures/functions/fnc_transmitterInit.sqf b/addons/map_gestures/functions/fnc_transmitterInit.sqf new file mode 100644 index 0000000000..3c0cfa7c10 --- /dev/null +++ b/addons/map_gestures/functions/fnc_transmitterInit.sqf @@ -0,0 +1,59 @@ +/* + * Author: MikeMatrix + * Initializes the transmitting event handlers. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_map_gestures_fnc_transmitterInit + * + * Public: No + */ +#include "script_component.hpp" + +private ["_mapCtrl", "_nameSane"]; + +disableSerialization; + +_mapCtrl = findDisplay 12 displayCtrl 51; + +// MouseMoving EH. +if (!isNil QGVAR(MouseMoveHandlerID)) then {_mapCtrl ctrlRemoveEventHandler ["MouseMoving", GVAR(MouseMoveHandlerID)]; GVAR(MouseMoveHandlerID) = nil;}; +GVAR(MouseMoveHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseMoving", { + if (EGVAR(maptools,drawing_isDrawing)) exitWith {}; + if (EGVAR(maptools,mapTool_isDragging)) exitWith {}; + if (EGVAR(maptools,mapTool_isRotating)) exitWith {}; + + params ["_control", "_posX", "_posY"]; + + if (GVAR(EnableTransmit)) then { + if (!(ACE_player getVariable QGVAR(Transmit))) then { + ACE_player setVariable [QGVAR(Transmit), true, true]; + }; + + _nameSane = [name ACE_player] call FUNC(sanitizeName); + call compile format [QUOTE(GVAR(%1_DrawPos) = %2), _nameSane, _control ctrlMapScreenToWorld [_posX, _posY]]; + }; +}]; + +// MouseDown EH +if (!isNil QGVAR(MouseDownHandlerID)) then {_mapCtrl ctrlRemoveEventHandler ["MouseButtonDown",GVAR(MouseDownHandlerID)]; GVAR(MouseDownHandlerID) = nil;}; +GVAR(MouseDownHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseButtonDown", { + if (!GVAR(enabled)) exitWith {}; + + params ["", "_button"]; + + if (_button == 0) then {call FUNC(initTransmit);}; +}]; + +// MouseUp EH +if (!isNil QGVAR(MouseUpHandlerID)) then {_mapCtrl ctrlRemoveEventHandler ["MouseButtonUp", GVAR(MouseUpHandlerID)]; GVAR(MouseUpHandlerID) = nil;}; +GVAR(MouseUpHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseButtonUp", { + params ["", "_button"]; + + if (_button == 0) then {call FUNC(endTransmit);}; +}]; diff --git a/addons/map_gestures/functions/script_component.hpp b/addons/map_gestures/functions/script_component.hpp new file mode 100644 index 0000000000..65841c15f9 --- /dev/null +++ b/addons/map_gestures/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\map_gestures\script_component.hpp" diff --git a/addons/map_gestures/script_component.hpp b/addons/map_gestures/script_component.hpp new file mode 100644 index 0000000000..7c6f3a5b2f --- /dev/null +++ b/addons/map_gestures/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT map_gestures +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_MAP_GESTURES + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MAP_GESTURES + #define DEBUG_SETTINGS DEBUG_SETTINGS_MAP_GESTURES +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml new file mode 100644 index 0000000000..324e9f92e7 --- /dev/null +++ b/addons/map_gestures/stringtable.xml @@ -0,0 +1,95 @@ + + + + + Map Gestures + + + Enabled + + + Map Gesture Max Range + + + Max range between players to show the map gesture indicator [default: 7 meters] + + + Lead Default Alpha + + + Fallback Alpha value for group leaders. + + + Default Alpha + + + Fallback Alpha value. + + + Lead Default Color + + + Fallback Color value for group leaders. + + + Default Color + + + Fallback Color value. + + + Lead Alpha + + + Alpha value for group leaders of groups synced with this module. + + + Alpha + + + Alpha value for group members of groups synced with this module. + + + Lead Color + + + Color value for group leaders of groups synced with this module. + + + Color + + + Color value for group members of groups synced with this module. + + + Map Gestures - Group Settings + + + Update Interval + + + Time between data updates. + + + Group color configurations + + + Group color configuration containing arrays of color pairs ([leadColor, color]). + + + Group color group name index, containing names of groups with configurations attached to them. + + + Group color group name index + + + Group color group name mapping index + + + Group color group name mapping index, mapping the GroupColorConfigurationsGroups to the GroupColorConfigurations. + + + Enables the Map Gestures. + + + From 90e4d005ee663e8976a5ffed1b02c1c11934851c Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 10 Aug 2015 08:45:43 +0200 Subject: [PATCH 004/180] Give credit where credit is due --- AUTHORS.txt | 5 +++-- addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf | 2 +- addons/map_gestures/functions/fnc_drawMapGestures.sqf | 2 +- addons/map_gestures/functions/fnc_endTransmit.sqf | 2 +- addons/map_gestures/functions/fnc_getProximityPlayers.sqf | 2 +- addons/map_gestures/functions/fnc_initTransmit.sqf | 2 +- addons/map_gestures/functions/fnc_moduleGroupSettings.sqf | 2 +- addons/map_gestures/functions/fnc_moduleSettings.sqf | 2 +- addons/map_gestures/functions/fnc_receiverInit.sqf | 2 +- addons/map_gestures/functions/fnc_sanitizeName.sqf | 2 +- addons/map_gestures/functions/fnc_transmit.sqf | 2 +- addons/map_gestures/functions/fnc_transmitterInit.sqf | 2 +- 12 files changed, 14 insertions(+), 13 deletions(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index 62329d7c1d..711ed6f687 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -50,6 +50,8 @@ Coren Crusty Dharma Bellamkonda Dimaslg +Drill +Dslyecxi eRazeri evromalarkey F3 Project @@ -81,6 +83,7 @@ Macusercom MarcBook meat Michail Nikolaev +MikeMatrix nic547 nikolauska nomisum @@ -106,5 +109,3 @@ Valentin Torikian VyMajoris(W-Cephei) Winter zGuba -Drill -MikeMatrix diff --git a/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf b/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf index 129c5066e1..c686c17b79 100644 --- a/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf +++ b/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf @@ -1,5 +1,5 @@ /* - * Author: MikeMatrix + * Author: Dslyecxi, MikeMatrix * Assign readable client ID to unit on the server. * * Arguments: diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 0b352418af..b270e3d073 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -1,5 +1,5 @@ /* - * Author: MikeMatrix + * Author: Dslyecxi, MikeMatrix * Receives and draws map gestures from nearby players. * * Arguments: diff --git a/addons/map_gestures/functions/fnc_endTransmit.sqf b/addons/map_gestures/functions/fnc_endTransmit.sqf index 0db082aa65..fc3e0e81e1 100644 --- a/addons/map_gestures/functions/fnc_endTransmit.sqf +++ b/addons/map_gestures/functions/fnc_endTransmit.sqf @@ -1,5 +1,5 @@ /* - * Author: MikeMatrix + * Author: Dslyecxi, MikeMatrix * Ensure that all variables used to indicate transmission are disabled. * * Arguments: diff --git a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf index eb1b609778..3ac8803a70 100644 --- a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf +++ b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf @@ -1,5 +1,5 @@ /* - * Author: MikeMatrix + * Author: Dslyecxi, MikeMatrix * Returns all players in a given range and in the units vehicle. * * Arguments: diff --git a/addons/map_gestures/functions/fnc_initTransmit.sqf b/addons/map_gestures/functions/fnc_initTransmit.sqf index 546e5d3c3b..604bf9e233 100644 --- a/addons/map_gestures/functions/fnc_initTransmit.sqf +++ b/addons/map_gestures/functions/fnc_initTransmit.sqf @@ -1,5 +1,5 @@ /* - * Author: MikeMatrix + * Author: Dslyecxi, MikeMatrix * Initializes transmitting map gestures. * * Arguments: diff --git a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf index b51f4b99b4..569bdd687a 100644 --- a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf @@ -1,5 +1,5 @@ /* - * Author: MikeMatrix + * Author: Dslyecxi, MikeMatrix * Initializes Settings for the groups modules and transcodes settings to a useable format. * * Arguments: diff --git a/addons/map_gestures/functions/fnc_moduleSettings.sqf b/addons/map_gestures/functions/fnc_moduleSettings.sqf index d53e118b46..00cfc7288c 100644 --- a/addons/map_gestures/functions/fnc_moduleSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleSettings.sqf @@ -1,5 +1,5 @@ /* - * Author: MikeMatrix + * Author: Dslyecxi, MikeMatrix * Initializes Settings for the module and transcodes settings to a useable format. * * Arguments: diff --git a/addons/map_gestures/functions/fnc_receiverInit.sqf b/addons/map_gestures/functions/fnc_receiverInit.sqf index 44b5bada47..8dfc7de51c 100644 --- a/addons/map_gestures/functions/fnc_receiverInit.sqf +++ b/addons/map_gestures/functions/fnc_receiverInit.sqf @@ -1,5 +1,5 @@ /* - * Author: MikeMatrix + * Author: Dslyecxi, MikeMatrix * Initializes the receiver and hooks it to the Draw event of the map. * * Arguments: diff --git a/addons/map_gestures/functions/fnc_sanitizeName.sqf b/addons/map_gestures/functions/fnc_sanitizeName.sqf index bafe9d3052..f36e626102 100644 --- a/addons/map_gestures/functions/fnc_sanitizeName.sqf +++ b/addons/map_gestures/functions/fnc_sanitizeName.sqf @@ -1,5 +1,5 @@ /* - * Author: MikeMatrix + * Author: Dslyecxi, MikeMatrix * Cleans up unit names to be usable within variable names. * * Arguments: diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf index 9defec2fd8..880b21f36e 100644 --- a/addons/map_gestures/functions/fnc_transmit.sqf +++ b/addons/map_gestures/functions/fnc_transmit.sqf @@ -1,5 +1,5 @@ /* - * Author: MikeMatrix + * Author: Dslyecxi, MikeMatrix * Transmit PFH * * Arguments: diff --git a/addons/map_gestures/functions/fnc_transmitterInit.sqf b/addons/map_gestures/functions/fnc_transmitterInit.sqf index 3c0cfa7c10..6ba6d0881e 100644 --- a/addons/map_gestures/functions/fnc_transmitterInit.sqf +++ b/addons/map_gestures/functions/fnc_transmitterInit.sqf @@ -1,5 +1,5 @@ /* - * Author: MikeMatrix + * Author: Dslyecxi, MikeMatrix * Initializes the transmitting event handlers. * * Arguments: From b1d3654a97324644b6ac40b2c53a4359a7e1ad21 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 10 Aug 2015 14:54:28 +0200 Subject: [PATCH 005/180] Fixed owner id not getting assigned in map gestures --- addons/map_gestures/functions/fnc_transmit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf index 880b21f36e..a87be445bf 100644 --- a/addons/map_gestures/functions/fnc_transmit.sqf +++ b/addons/map_gestures/functions/fnc_transmit.sqf @@ -30,7 +30,7 @@ TRACE_1("Near",_nearDudes) { _ownerID = _x getVariable QGVAR(owner_id); - if (isNil _ownerID) exitWith { + if (isNil "_ownerID") exitWith { [0, {[_this] call FUNC(assignClientIDOnServer)}, name _x] call cba_fnc_GlobalExecute; }; _ownerID = _x getVariable QGVAR(owner_id); From 5788705821442e4cee027664ddac05dad415647b Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 10 Aug 2015 15:24:57 +0200 Subject: [PATCH 006/180] Fixed code style issues and added missing variable initialization in map_gestures --- .../map_gestures/functions/fnc_drawMapGestures.sqf | 13 ++++++------- .../functions/fnc_moduleGroupSettings.sqf | 7 +------ addons/map_gestures/functions/fnc_receiverInit.sqf | 4 ++-- addons/map_gestures/functions/fnc_transmit.sqf | 8 ++++---- 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index b270e3d073..05afa9bf0e 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -20,24 +20,23 @@ if (!visibleMap) exitWith {}; params ["_mapHandle"]; -_nearDudes = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); +_proximityPlayers = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); { _nameSane = [name _x] call FUNC(sanitizeName); _drawPosVariableName = format [QGVAR(%1_DrawPos), _nameSane]; if (!isNil _drawPosVariableName) then { + if (isNil {call compile _drawPosVariableName}) then {call compile format [QUOTE(GVAR(%1_DrawPos) = [ARR_3(1,1,1)];), _nameSane];} _pos = call compile _drawPosVariableName; if (alive _x && - (_pos distance [0, 0, 0]) > 50 && {_x getVariable QGVAR(Transmit)}) then { _group = group _x; _grpName = groupID _group; - _color = [1, 1, 1, 1]; - if (_grpName in GVAR(GroupColorConfigurationsGroups)) then { + _color = if (_grpName in GVAR(GroupColorConfigurationsGroups)) then { _grpNameIndex = GVAR(GroupColorConfigurationsGroups) find _grpName; - _color = (GVAR(GroupColorConfigurations) select (GVAR(GroupColorConfigurationsGroupIndex) select _grpNameIndex)) select (_x != leader _group); + (GVAR(GroupColorConfigurations) select (GVAR(GroupColorConfigurationsGroupIndex) select _grpNameIndex)) select (_x != leader _group) } else { - _color = if (_x == leader _group) then {GVAR(defaultLeadColor)} else {GVAR(defaultColor)}; + if (_x == leader _group) then {GVAR(defaultLeadColor)} else {GVAR(defaultColor)}; }; _mapHandle drawIcon ["\a3\ui_f\data\gui\cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, 55, 55, 0, "", 1, 0.030, "PuristaBold", "left"]; @@ -45,4 +44,4 @@ _nearDudes = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); }; }; nil -} count _nearDudes; +} count _proximityPlayers; diff --git a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf index 569bdd687a..c0158d90c7 100644 --- a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf @@ -27,12 +27,7 @@ if (isNil "_leadColor" || !((typeName _leadColor) isEqualTo "ARRAY") || {count _ _color = call compile ("[" + (_logic getVariable ["color", ""]) + "]"); if (isNil "_color" || !((typeName _color) isEqualTo "ARRAY") || {count _color != 4}) exitWith {}; -_configurations = +GVAR(GroupColorConfigurations); -if (isNil "_configurations") then {_configurations = []}; -_configurationIndex = _configurations pushBack [_leadColor, _color]; - -_configurationGroups = +GVAR(GroupColorConfigurationsGroups); -_configurationGroupsIndex = +GVAR(GroupColorConfigurationsGroupIndex); +_configurationGroups = if (isNil QGVAR(GroupColorConfigurationsGroups) then { [] } else { +GVAR(GroupColorConfigurationsGroups) }; if (isNil "_configurationGroups") then {_configurationGroups = [];}; if (isNil "_configurationGroupsIndex") then {_configurationGroupsIndex = [];}; diff --git a/addons/map_gestures/functions/fnc_receiverInit.sqf b/addons/map_gestures/functions/fnc_receiverInit.sqf index 8dfc7de51c..482572c19e 100644 --- a/addons/map_gestures/functions/fnc_receiverInit.sqf +++ b/addons/map_gestures/functions/fnc_receiverInit.sqf @@ -17,8 +17,8 @@ { if (isPlayer _x) then { - _nameSane = [name _x] call FUNC(sanitizeName); - call compile format [QUOTE(GVAR(%1_DrawPos) = [ARR_3(1,1,1)];), _nameSane]; + _nameSane = [name _x] call FUNC(sanitizeName); + call compile format [QUOTE(GVAR(%1_DrawPos) = [ARR_3(1,1,1)];), _nameSane]; }; nil } count allUnits; diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf index a87be445bf..a0ab7bf0bf 100644 --- a/addons/map_gestures/functions/fnc_transmit.sqf +++ b/addons/map_gestures/functions/fnc_transmit.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -private ["_nearDudes", "_ownerID", "_nameSane"]; +private ["_proximityPlayers", "_ownerID", "_nameSane"]; params ["", "_pfhId"]; @@ -25,8 +25,8 @@ if (!GVAR(EnableTransmit) || !visibleMap) exitWith { [_pfhId] call CBA_fnc_removePerFrameHandler; }; -_nearDudes = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); -TRACE_1("Near",_nearDudes) +_proximityPlayers = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); +TRACE_1("Near",_proximityPlayers) { _ownerID = _x getVariable QGVAR(owner_id); @@ -39,4 +39,4 @@ TRACE_1("Near",_nearDudes) _nameSane = [name ACE_player] call FUNC(sanitizeName); _ownerID publicVariableClient format [QGVAR(%1_DrawPos), _nameSane]; }; -} count _nearDudes; +} count _proximityPlayers; From 5e4316d0e214150facde679f52c24149169bef4c Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 10 Aug 2015 16:43:33 +0200 Subject: [PATCH 007/180] Fixed missing semi-colon --- addons/map_gestures/functions/fnc_drawMapGestures.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 05afa9bf0e..877b503b38 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -25,7 +25,7 @@ _proximityPlayers = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); _nameSane = [name _x] call FUNC(sanitizeName); _drawPosVariableName = format [QGVAR(%1_DrawPos), _nameSane]; if (!isNil _drawPosVariableName) then { - if (isNil {call compile _drawPosVariableName}) then {call compile format [QUOTE(GVAR(%1_DrawPos) = [ARR_3(1,1,1)];), _nameSane];} + if (isNil {call compile _drawPosVariableName}) then {call compile format [QUOTE(GVAR(%1_DrawPos) = [ARR_3(1,1,1)];), _nameSane];}; _pos = call compile _drawPosVariableName; if (alive _x && {_x getVariable QGVAR(Transmit)}) then { From 5287455c0b5860fa9bdb67502347326273510629 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 10 Aug 2015 17:07:01 +0200 Subject: [PATCH 008/180] Fixed aborting data transmission on no owner id encounter --- addons/map_gestures/functions/fnc_transmit.sqf | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf index a0ab7bf0bf..4d99caa160 100644 --- a/addons/map_gestures/functions/fnc_transmit.sqf +++ b/addons/map_gestures/functions/fnc_transmit.sqf @@ -30,13 +30,12 @@ TRACE_1("Near",_proximityPlayers) { _ownerID = _x getVariable QGVAR(owner_id); - if (isNil "_ownerID") exitWith { + if (isNil "_ownerID") then { [0, {[_this] call FUNC(assignClientIDOnServer)}, name _x] call cba_fnc_GlobalExecute; - }; - _ownerID = _x getVariable QGVAR(owner_id); - - if (_ownerID != ACE_player getVariable QGVAR(owner_id)) then { - _nameSane = [name ACE_player] call FUNC(sanitizeName); - _ownerID publicVariableClient format [QGVAR(%1_DrawPos), _nameSane]; + } else { + if (_ownerID != ACE_player getVariable QGVAR(owner_id)) then { + _nameSane = [name ACE_player] call FUNC(sanitizeName); + _ownerID publicVariableClient format [QGVAR(%1_DrawPos), _nameSane]; + }; }; } count _proximityPlayers; From 3e82391a369894f10e6cfa1dad24959ae6f7ae1b Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 10 Aug 2015 19:04:49 +0200 Subject: [PATCH 009/180] Added validation and various fixes --- addons/map_gestures/XEH_preInit.sqf | 1 + .../functions/fnc_isValidColorArray.sqf | 28 +++++++++++++++++++ .../functions/fnc_moduleGroupSettings.sqf | 13 +++++---- .../functions/fnc_moduleSettings.sqf | 7 +++-- 4 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 addons/map_gestures/functions/fnc_isValidColorArray.sqf diff --git a/addons/map_gestures/XEH_preInit.sqf b/addons/map_gestures/XEH_preInit.sqf index 08159aa972..ad4da44998 100644 --- a/addons/map_gestures/XEH_preInit.sqf +++ b/addons/map_gestures/XEH_preInit.sqf @@ -7,6 +7,7 @@ PREP(drawMapGestures); PREP(endTransmit); PREP(getProximityPlayers); PREP(initTransmit); +PREP(isValidColorArray); PREP(moduleGroupSettings); PREP(moduleSettings); PREP(receiverInit); diff --git a/addons/map_gestures/functions/fnc_isValidColorArray.sqf b/addons/map_gestures/functions/fnc_isValidColorArray.sqf new file mode 100644 index 0000000000..a64cf249eb --- /dev/null +++ b/addons/map_gestures/functions/fnc_isValidColorArray.sqf @@ -0,0 +1,28 @@ +/* + * Author: MikeMatrix + * Validate if an array is in the propper color format. + * + * Arguments: + * 0: Color Array + * + * Return Value: + * Is valid Color Array + * + * Example: + * [[1, 0.2, 1, 0.5]] call ace_map_gestures_fnc_isValidColorArray + * + * Public: No + */ +#include "script_component.hpp" + +params ["_colorArray"]; + +if (isNil "_colorArray") exitWith {false}; +if ((typeName _colorArray) != "ARRAY") exitWith {false}; +if (count _colorArray != 4) exitWith {false}; + +{ + if ((typeName _x) != "SCALAR" || _x < 0 || _x > 1) exitWith {false}; +} count _colorArray; + +true diff --git a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf index c0158d90c7..32f7e73143 100644 --- a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf @@ -19,19 +19,22 @@ params ["_logic", "_units", "_activated"]; +diag_log "Running"; + if (!_activated) exitWith {}; if (!isServer) exitWith {}; _leadColor = call compile ("[" + (_logic getVariable ["leadColor", ""]) + "]"); -if (isNil "_leadColor" || !((typeName _leadColor) isEqualTo "ARRAY") || {count _leadColor != 4}) exitWith {}; +if (!([_leadColor] call FUNC(isValidColorArray))) exitWith {ERROR("leadColor is not a valid color array.")}; _color = call compile ("[" + (_logic getVariable ["color", ""]) + "]"); -if (isNil "_color" || !((typeName _color) isEqualTo "ARRAY") || {count _color != 4}) exitWith {}; +if (!([_color] call FUNC(isValidColorArray))) exitWith {ERROR("color is not a valid color array.")}; -_configurationGroups = if (isNil QGVAR(GroupColorConfigurationsGroups) then { [] } else { +GVAR(GroupColorConfigurationsGroups) }; +_configurations = if (isNil QGVAR(GroupColorConfigurations)) then { [] } else { +GVAR(GroupColorConfigurations) }; +_configurationGroups = if (isNil QGVAR(GroupColorConfigurationsGroups)) then { [] } else { +GVAR(GroupColorConfigurationsGroups) }; +_configurationGroupsIndex = if (isNil QGVAR(GroupColorConfigurationsGroupIndex)) then { [] } else { +GVAR(GroupColorConfigurationsGroupIndex) }; -if (isNil "_configurationGroups") then {_configurationGroups = [];}; -if (isNil "_configurationGroupsIndex") then {_configurationGroupsIndex = [];}; _completedGroups = []; +_configurationIndex = _configurations pushBack [_leadColor, _color]; { private "_group"; _group = groupID (group _x); diff --git a/addons/map_gestures/functions/fnc_moduleSettings.sqf b/addons/map_gestures/functions/fnc_moduleSettings.sqf index 00cfc7288c..6b21db8588 100644 --- a/addons/map_gestures/functions/fnc_moduleSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleSettings.sqf @@ -27,9 +27,10 @@ if (!isServer) exitWith {}; [_logic, QGVAR(interval), "interval"] call EFUNC(common,readSettingFromModule); _defaultLeadColor = call compile ("[" + (_logic getVariable ["defaultLeadColor", ""]) + "]"); -if (isNil "_leadColor" || !((typeName _leadColor) isEqualTo "ARRAY") || {count _leadColor != 4}) exitWith {}; -[QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting); +if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")}; _defaultColor = call compile ("[" + (_logic getVariable ["defaultColor", ""]) + "]"); -if (isNil "_color" || !((typeName _color) isEqualTo "ARRAY") || {count _color != 4}) exitWith {}; +if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")}; + +[QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting); [QGVAR(defaultColor), _defaultColor, true, true] call EFUNC(common,setSetting); From a315596c5a83d461aa9da5bbd85876c72ea8fbf1 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 10 Aug 2015 20:32:26 +0200 Subject: [PATCH 010/180] Fixed isValidColorArray returning true when array had the right size, but wrong datatypes/value ranges --- addons/map_gestures/functions/fnc_isValidColorArray.sqf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/map_gestures/functions/fnc_isValidColorArray.sqf b/addons/map_gestures/functions/fnc_isValidColorArray.sqf index a64cf249eb..809bbaf117 100644 --- a/addons/map_gestures/functions/fnc_isValidColorArray.sqf +++ b/addons/map_gestures/functions/fnc_isValidColorArray.sqf @@ -15,6 +15,8 @@ */ #include "script_component.hpp" +scopeName "main"; + params ["_colorArray"]; if (isNil "_colorArray") exitWith {false}; @@ -22,7 +24,7 @@ if ((typeName _colorArray) != "ARRAY") exitWith {false}; if (count _colorArray != 4) exitWith {false}; { - if ((typeName _x) != "SCALAR" || _x < 0 || _x > 1) exitWith {false}; + if ((typeName _x) != "SCALAR" || _x < 0 || _x > 1) exitWith {false breakOut "main"}; } count _colorArray; true From 183aac191117d762983d251346d7854693696ee7 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Fri, 14 Aug 2015 01:55:54 +0200 Subject: [PATCH 011/180] Code cleanup of Kestrel 4500 module. --- addons/kestrel4500/XEH_preInit.sqf | 18 ++++ .../functions/fnc_buttonPressed.sqf | 4 +- addons/kestrel4500/functions/fnc_canShow.sqf | 6 +- .../kestrel4500/functions/fnc_collectData.sqf | 33 +++----- .../functions/fnc_createKestrelDialog.sqf | 4 +- .../functions/fnc_displayKestrel.sqf | 84 +++++++++++-------- .../functions/fnc_generateOutputData.sqf | 40 +++++---- .../functions/fnc_measureWindSpeed.sqf | 3 +- .../functions/fnc_onCloseDialog.sqf | 15 ++++ .../functions/fnc_onCloseDisplay.sqf | 15 ++++ .../functions/fnc_restoreUserData.sqf | 2 +- .../functions/fnc_storeUserData.sqf | 4 +- .../functions/fnc_updateDisplay.sqf | 30 ++----- .../functions/fnc_updateImpellerState.sqf | 4 +- 14 files changed, 150 insertions(+), 112 deletions(-) diff --git a/addons/kestrel4500/XEH_preInit.sqf b/addons/kestrel4500/XEH_preInit.sqf index 7b36167a16..b7d66cbb94 100644 --- a/addons/kestrel4500/XEH_preInit.sqf +++ b/addons/kestrel4500/XEH_preInit.sqf @@ -17,3 +17,21 @@ PREP(updateDisplay); PREP(updateImpellerState); ADDON = true; + +FUNC(updateMemory) = { + params ["_slot", "_value"]; + GVAR(MIN) set [_slot, (GVAR(MIN) select _slot) min _value]; + GVAR(MAX) set [_slot, _value max (GVAR(MAX) select _slot)]; + GVAR(TOTAL) set [_slot, (GVAR(TOTAL) select _slot) + _value]; +}; + +FUNC(dayOfWeek) = { + private "_table"; + params ["_year", "_month", "_day"]; + + _table = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]; + if (_month < 3) then { + _year = _year - 1; + }; + (_year + floor(_year/4) - floor(_year/100) + floor(_year/400) + (_table select (_month - 1)) + _day) % 7 +}; diff --git a/addons/kestrel4500/functions/fnc_buttonPressed.sqf b/addons/kestrel4500/functions/fnc_buttonPressed.sqf index 8f38568462..83c471092a 100644 --- a/addons/kestrel4500/functions/fnc_buttonPressed.sqf +++ b/addons/kestrel4500/functions/fnc_buttonPressed.sqf @@ -3,10 +3,10 @@ * Handles the Kestrel 4500 dialog button actions * * Arguments: - * buttonID + * button ID * * Return Value: - * Nothing + * None * * Example: * 2 call ace_kestrel4500_fnc_buttonPressed diff --git a/addons/kestrel4500/functions/fnc_canShow.sqf b/addons/kestrel4500/functions/fnc_canShow.sqf index 0c9e29f9bc..f563138f5c 100644 --- a/addons/kestrel4500/functions/fnc_canShow.sqf +++ b/addons/kestrel4500/functions/fnc_canShow.sqf @@ -3,13 +3,13 @@ * Tests if the Kestrel 4500 can be shown * * Arguments: - * Nothing + * None * * Return Value: - * canShow (bool) + * canShow * * Example: - * [mode] call ace_kestrel4500_fnc_canShow + * call ace_kestrel4500_fnc_canShow * * Public: No */ diff --git a/addons/kestrel4500/functions/fnc_collectData.sqf b/addons/kestrel4500/functions/fnc_collectData.sqf index 244e719b37..2e25fbcf60 100644 --- a/addons/kestrel4500/functions/fnc_collectData.sqf +++ b/addons/kestrel4500/functions/fnc_collectData.sqf @@ -3,18 +3,19 @@ * Gathers the weather data for the Kestrel 4500 * * Arguments: - * Nothing + * None * * Return Value: - * Nothing + * None * * Example: + * call ace_kestrel4500_fnc_collectData * * Public: No */ #include "script_component.hpp" -private ["_playerDir", "_playerAltitude", "_temperature", "_humidity", "_barometricPressure", "_altitude", "_airDensity", "_densityAltitude", "_chill", "_heatIndex", "_dewPoint", "_wetBulb", "_fnc_updateMemory", "_windSpeed", "_crosswind", "_headwind"]; +private ["_playerDir", "_playerAltitude", "_temperature", "_humidity", "_barometricPressure", "_altitude", "_airDensity", "_densityAltitude", "_chill", "_heatIndex", "_dewPoint", "_wetBulb", "_windSpeed", "_crosswind", "_headwind"]; _playerDir = getDir ACE_player; _playerAltitude = (getPosASL ACE_player) select 2; _temperature = _playerAltitude call EFUNC(weather,calculateTemperatureAtHeight); @@ -35,25 +36,19 @@ if (isNil QGVAR(MIN) || isNil QGVAR(MAX)) then { { GVAR(ENTRIES) set [_x, (GVAR(ENTRIES) select _x) + 1]; -} forEach [1, 5, 6, 7, 8, 9, 10, 11, 12, 13]; +} count [1, 5, 6, 7, 8, 9, 10, 11, 12, 13]; -_fnc_updateMemory = { - PARAMS_2(_slot,_value); - GVAR(MIN) set [_slot, (GVAR(MIN) select _slot) min _value]; - GVAR(MAX) set [_slot, _value max (GVAR(MAX) select _slot)]; - GVAR(TOTAL) set [_slot, (GVAR(TOTAL) select _slot) + _value]; -}; -[0, _playerDir] call _fnc_updateMemory; +[0, _playerDir] call FUNC(updateMemory); if (GVAR(MinAvgMaxMode) == 1) then { { GVAR(ENTRIES) set [_x, (GVAR(ENTRIES) select _x) + 1]; - } forEach [2, 3, 4]; + } count [2, 3, 4]; // Wind SPD _windSpeed = call FUNC(measureWindSpeed); - [2, _windSpeed] call _fnc_updateMemory; + [2, _windSpeed] call FUNC(updateMemory); // CROSSWIND _crosswind = 0; @@ -62,7 +57,7 @@ if (GVAR(MinAvgMaxMode) == 1) then { } else { _crosswind = abs(sin(GVAR(RefHeading)) * _windSpeed); }; - [3, _crosswind] call _fnc_updateMemory; + [3, _crosswind] call FUNC(updateMemory); // HEADWIND _headwind = 0; @@ -80,12 +75,4 @@ if (GVAR(MinAvgMaxMode) == 1) then { GVAR(TOTAL) set [4, (GVAR(TOTAL) select 4) + _headwind]; }; -[5, _temperature] call _fnc_updateMemory; -[6, _chill] call _fnc_updateMemory; -[7, _humidity] call _fnc_updateMemory; -[8, _heatIndex] call _fnc_updateMemory; -[9, _dewPoint] call _fnc_updateMemory; -[10, _wetBulb] call _fnc_updateMemory; -[11, _barometricPressure] call _fnc_updateMemory; -[12, _altitude] call _fnc_updateMemory; -[13, _densityAltitude] call _fnc_updateMemory; +{ _x call FUNC(updateMemory); true } count [[5, _temperature],[6, _chill],[7, _humidity],[8, _heatIndex],[9, _dewPoint],[10, _wetBulb],[11, _barometricPressure],[12, _altitude],[13, _densityAltitude]]; diff --git a/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf b/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf index 289d0825fc..23ca70543b 100644 --- a/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf +++ b/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf @@ -3,7 +3,7 @@ * Opens the Kestrel 4500 dialog * * Arguments: - * Nothing + * None * * Return Value: * Nothing @@ -29,7 +29,7 @@ createDialog 'Kestrel4500_Display'; GVAR(Kestrel4500) = false; [_this select 1] call CBA_fnc_removePerFrameHandler; }; - + [] call FUNC(updateDisplay); }, 1, _this select 0] call CBA_fnc_addPerFrameHandler; diff --git a/addons/kestrel4500/functions/fnc_displayKestrel.sqf b/addons/kestrel4500/functions/fnc_displayKestrel.sqf index 679ecce6af..63a162a7b0 100644 --- a/addons/kestrel4500/functions/fnc_displayKestrel.sqf +++ b/addons/kestrel4500/functions/fnc_displayKestrel.sqf @@ -3,12 +3,13 @@ * Shows the Kestrel 4500 as rsc title * * Arguments: - * Nothing + * None * * Return Value: * Nothing * * Example: + * call ace_kestrel4500_fnc_displayKestrell * * Public: No */ @@ -50,49 +51,66 @@ if (GVAR(Kestrel4500) && dialog) then { GVAR(Overlay) = true; -[{ +[{ // abort condition if (!GVAR(Overlay) || {!(("ACE_Kestrel4500" in (uniformItems ACE_player)) || ("ACE_Kestrel4500" in (vestItems ACE_player)))}) exitWith { GVAR(Overlay) = false; 3 cutText ["", "PLAIN"]; [_this select 1] call CBA_fnc_removePerFrameHandler; }; - + if (ACE_diagTime > GVAR(updateTimer)) then { GVAR(updateTimer) = ACE_diagTime + 1; - + private ["_outputData"]; _outputData = [] call FUNC(generateOutputData); - + 3 cutRsc ["RscKestrel4500", "PLAIN", 1, false]; - - __ctrlTop ctrlSetText (_outputData select 0); - __ctrlCenterBig ctrlSetText (_outputData select 1); - - __ctrlTop ctrlSetText (_outputData select 0); - __ctrlCenterBig ctrlSetText (_outputData select 1); - __ctrlCenter ctrlSetText (_outputData select 2); - - __ctrlCenterLine1Left ctrlSetText (_outputData select 3); - __ctrlCenterLine2Left ctrlSetText (_outputData select 4); - __ctrlCenterLine3Left ctrlSetText (_outputData select 5); + _outputData params [ + "_ctrlTop", + "_ctrlCenterBig", + "_ctrlCenter", + "_ctrlCenterLine1Left", + "_ctrlCenterLine2Left", + "_ctrlCenterLine3Left", + "_ctrlCenterLine1Right", + "_ctrlCenterLine2Right", + "_ctrlCenterLine3Right", + "_ctrlInfoLine1", + "_ctrlInfoLine2", + "_ctrlBottomBig", + "_ctrlCenterLine1", + "_ctrlCenterLine2", + "_ctrlCenterLine3", + "_ctrlCenterLine4", + "_ctrlCenterLine5", + "_ctrlCenterLine6" + ]; - __ctrlCenterLine1Right ctrlSetText (_outputData select 6); - __ctrlCenterLine2Right ctrlSetText (_outputData select 7); - __ctrlCenterLine3Right ctrlSetText (_outputData select 8); + __ctrlTop ctrlSetText _ctrlTop; + __ctrlCenterBig ctrlSetText _ctrlCenterBig; + __ctrlCenter ctrlSetText _ctrlCenter; + + __ctrlCenterLine1Left ctrlSetText _ctrlCenterLine1Left; + __ctrlCenterLine2Left ctrlSetText _ctrlCenterLine2Left; + __ctrlCenterLine3Left ctrlSetText _ctrlCenterLine3Left; + + __ctrlCenterLine1Right ctrlSetText _ctrlCenterLine1Right; + __ctrlCenterLine2Right ctrlSetText _ctrlCenterLine2Right; + __ctrlCenterLine3Right ctrlSetText _ctrlCenterLine3Right; + + __ctrlInfoLine1 ctrlSetText _ctrlInfoLine1; + __ctrlInfoLine2 ctrlSetText _ctrlInfoLine2; + + __ctrlBottomBig ctrlSetText _ctrlBottomBig ; + + __ctrlCenterLine1 ctrlSetText _ctrlCenterLine1; + __ctrlCenterLine2 ctrlSetText _ctrlCenterLine2; + __ctrlCenterLine3 ctrlSetText _ctrlCenterLine3; + __ctrlCenterLine4 ctrlSetText _ctrlCenterLine4; + __ctrlCenterLine5 ctrlSetText _ctrlCenterLine5; + __ctrlCenterLine6 ctrlSetText _ctrlCenterLine6; - __ctrlInfoLine1 ctrlSetText (_outputData select 9); - __ctrlInfoLine2 ctrlSetText (_outputData select 10); - - __ctrlBottomBig ctrlSetText (_outputData select 11); - - __ctrlCenterLine1 ctrlSetText (_outputData select 12); - __ctrlCenterLine2 ctrlSetText (_outputData select 13); - __ctrlCenterLine3 ctrlSetText (_outputData select 14); - __ctrlCenterLine4 ctrlSetText (_outputData select 15); - __ctrlCenterLine5 ctrlSetText (_outputData select 16); - __ctrlCenterLine6 ctrlSetText (_outputData select 17); - if (GVAR(referenceHeadingMenu) == 1) then { if (GVAR(referenceHeadingAutoSet)) then { __ctrlCenterLine3 ctrlSetTextColor [0, 0, 0, 0.6]; @@ -106,10 +124,10 @@ GVAR(Overlay) = true; __ctrlCenterLine4 ctrlSetTextColor [0, 0, 0, 1.0]; }; }; - + call FUNC(updateImpellerState); __ctrlKestrel4500 ctrlSetText format [QUOTE(PATHTOF(UI\Kestrel4500_%1.paa)), floor(GVAR(ImpellerState) % 7)]; - + }, 0.01, []] call CBA_fnc_addPerFrameHandler; true diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index d61a1f48e4..de62da31ff 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -3,12 +3,29 @@ * Generates the Kestrel 4500 output text. * * Arguments: - * Nothing + * None * * Return Value: - * [top , centerBig , CenterLine1Left , CenterLine2Left , CenterLine3Left , CenterLine1Right , CenterLine2Right , CenterLine3Right , InfoLine1 , InfoLine2 ] + * 0: top + * 1: centerBig + * 2: CenterLine1Left + * 3: CenterLine2Left + * 4: CenterLine3Left + * 5: CenterLine1Right + * 6: CenterLine2Right + * 7: CenterLine3Right + * 8: InfoLine1 + * 9: InfoLine2 + * 10: Bottom Big + * 11: Center Line 1 + * 11: Center Line 2 + * 12: Center Line 3 + * 13: Center Line 4 + * 14: Center Line 5 + * 15: Center Line 6 * * Example: + * _var = call ace_kestrell4500_fnc_generateOutputData * * Public: No */ @@ -16,7 +33,7 @@ if (ACE_diagTime - GVAR(headingSetDisplayTimer) < 0.8) exitWith {["", "", " Heading Set", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]}; -private ["_playerDir", "_playerAltitude", "_temperature", "_humidity", "_barometricPressure", "_airDensity", "_densityAltitude", "_chill", "_heatIndex", "_dewPoint", "_wetBulb", "_fnc_dayOfWeek", "_dayString", "_monthString", "_windSpeed", "_windDir", "_textTop", "_textCenterBig", "_textCenter", "_textCenterLine1Left", "_textCenterLine2Left", "_textCenterLine3Left", "_textCenterLine1Right", "_textCenterLine2Right", "_textCenterLine3Right", "_textInfoLine1", "_textInfoLine2", "_textBottomBig", "_textCenterLine1", "_textCenterLine2", "_textCenterLine3", "_textCenterLine4", "_textCenterLine5", "_textCenterLine6"]; +private ["_playerDir", "_playerAltitude", "_temperature", "_humidity", "_barometricPressure", "_airDensity", "_densityAltitude", "_chill", "_heatIndex", "_dewPoint", "_wetBulb", "_dayString", "_monthString", "_windSpeed", "_windDir", "_textTop", "_textCenterBig", "_textCenter", "_textCenterLine1Left", "_textCenterLine2Left", "_textCenterLine3Left", "_textCenterLine1Right", "_textCenterLine2Right", "_textCenterLine3Right", "_textInfoLine1", "_textInfoLine2", "_textBottomBig", "_textCenterLine1", "_textCenterLine2", "_textCenterLine3", "_textCenterLine4", "_textCenterLine5", "_textCenterLine6"]; [] call FUNC(collectData); @@ -59,19 +76,6 @@ _heatIndex = [_temperature, _humidity] call EFUNC(weather,calculateHeatIndex); _dewPoint = [_temperature, _humidity] call EFUNC(weather,calculateDewPoint); _wetBulb = [_temperature, _barometricPressure, _humidity] call EFUNC(weather,calculateWetBulb); -_fnc_dayOfWeek = { - private ["_year", "_month", "_day", "_table"]; - _year = _this select 0; - _month = _this select 1; - _day = _this select 2; - - _table = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]; - if (_month < 3) then { - _year = _year - 1; - }; - (_year + floor(_year/4) - floor(_year/100) + floor(_year/400) + (_table select (_month - 1)) + _day) % 7 -}; - GVAR(Direction) = 4 * floor(_playerDir / 90); if (_playerDir % 90 > 10) then { GVAR(Direction) = GVAR(Direction) + 1}; if (_playerDir % 90 > 35) then { GVAR(Direction) = GVAR(Direction) + 1}; @@ -82,8 +86,8 @@ GVAR(Direction) = GVAR(Direction) % 16; if (GVAR(referenceHeadingMenu) == 0) then { switch (GVAR(Menu)) do { case 0: { // Date - EXPLODE_3_PVT(date,_year,_month,_day); - _dayString = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] select (date call _fnc_dayOfWeek); + date params ["_year", "_month", "_day"]; + _dayString = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] select (date call FUNC(dayOfWeek)); _monthString = localize (["str_january","str_february","str_march","str_april","str_may","str_june","str_july","str_august","str_september","str_october","str_november","str_december"] select (_month - 1)); _textTop = _dayString; _textCenter = format["%1 %2 %3", _day, _monthString, _year]; diff --git a/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf b/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf index 73b4e228d6..2a8a4bbbb3 100644 --- a/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf +++ b/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf @@ -3,12 +3,13 @@ * Measures the wind speed, stores the information in GVAR(MeasuredWindSpeed) and updates GVAR(ImpellerState) * * Arguments: - * Nothing + * None * * Return Value: * wind speed * * Example: + * call ace_kestrel4500_fnc_canShow * * Public: No */ diff --git a/addons/kestrel4500/functions/fnc_onCloseDialog.sqf b/addons/kestrel4500/functions/fnc_onCloseDialog.sqf index a45a9decc3..11fa76ff18 100644 --- a/addons/kestrel4500/functions/fnc_onCloseDialog.sqf +++ b/addons/kestrel4500/functions/fnc_onCloseDialog.sqf @@ -1,3 +1,18 @@ +/* + * Author: Ruthberg + * Called if Kestrell Dialog is closed + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * call ace_kestrel4500_fnc_onCloseDialog + * + * Public: No + */ #include "script_component.hpp" uiNamespace setVariable ['Kestrel4500_Display', nil]; diff --git a/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf b/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf index efb60b322a..9228aedcef 100644 --- a/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf +++ b/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf @@ -1,3 +1,18 @@ +/* + * Author: Ruthberg + * Called if Kestrell Display is closed + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * call ace_kestrel4500_fnc_onCloseDisplay + * + * Public: No + */ #include "script_component.hpp" uiNamespace setVariable ['RscKestrel4500', nil]; diff --git a/addons/kestrel4500/functions/fnc_restoreUserData.sqf b/addons/kestrel4500/functions/fnc_restoreUserData.sqf index 0ce463ad67..c1d9c0ebb3 100644 --- a/addons/kestrel4500/functions/fnc_restoreUserData.sqf +++ b/addons/kestrel4500/functions/fnc_restoreUserData.sqf @@ -6,7 +6,7 @@ * Nothing * * Return Value: - * Nothing + * None * * Example: * call ace_kestrel4500_fnc_restore_user_data diff --git a/addons/kestrel4500/functions/fnc_storeUserData.sqf b/addons/kestrel4500/functions/fnc_storeUserData.sqf index a5d069b31d..80fa219a3c 100644 --- a/addons/kestrel4500/functions/fnc_storeUserData.sqf +++ b/addons/kestrel4500/functions/fnc_storeUserData.sqf @@ -3,10 +3,10 @@ * Saves user data into profileNamespace * * Arguments: - * Nothing + * None * * Return Value: - * Nothing + * None * * Example: * call ace_kestrel4500_fnc_store_user_data diff --git a/addons/kestrel4500/functions/fnc_updateDisplay.sqf b/addons/kestrel4500/functions/fnc_updateDisplay.sqf index 90f77f5f6a..e63b18bcfc 100644 --- a/addons/kestrel4500/functions/fnc_updateDisplay.sqf +++ b/addons/kestrel4500/functions/fnc_updateDisplay.sqf @@ -3,10 +3,10 @@ * Updates the Kestrel 4500 dialog text boxes. * * Arguments: - * Nothing + * None * * Return Value: - * Nothing + * None * * Example: * @@ -22,29 +22,9 @@ private ["_outputData"]; _outputData = [] call FUNC(generateOutputData); -ctrlSetText [74100, _outputData select 0]; -ctrlSetText [74200, _outputData select 1]; -ctrlSetText [74201, _outputData select 2]; - -ctrlSetText [74300, _outputData select 3]; -ctrlSetText [74301, _outputData select 4]; -ctrlSetText [74302, _outputData select 5]; - -ctrlSetText [74303, _outputData select 6]; -ctrlSetText [74304, _outputData select 7]; -ctrlSetText [74305, _outputData select 8]; - -ctrlSetText [74400, _outputData select 9]; -ctrlSetText [74401, _outputData select 10]; - -ctrlSetText [74500, _outputData select 11]; - -ctrlSetText [74600, _outputData select 12]; -ctrlSetText [74601, _outputData select 13]; -ctrlSetText [74602, _outputData select 14]; -ctrlSetText [74603, _outputData select 15]; -ctrlSetText [74604, _outputData select 16]; -ctrlSetText [74605, _outputData select 17]; +{ + ctrlSetText [_x , _outputData select _foreachindex]; +} forEach [74100, 74200, 74201, 74300, 74301, 74302, 74303, 74304, 74305, 74400, 74401, 74500, 74600, 74601, 74602, 74603, 74604, 74605]; if (GVAR(referenceHeadingMenu) == 1) then { if (GVAR(referenceHeadingAutoSet)) then { diff --git a/addons/kestrel4500/functions/fnc_updateImpellerState.sqf b/addons/kestrel4500/functions/fnc_updateImpellerState.sqf index 075ed80080..75a0d10f4c 100644 --- a/addons/kestrel4500/functions/fnc_updateImpellerState.sqf +++ b/addons/kestrel4500/functions/fnc_updateImpellerState.sqf @@ -3,10 +3,10 @@ * Updates the Kestrel 4500 Impeller state * * Arguments: - * Nothing + * None * * Return Value: - * Nothing + * None * * Example: * From 84685f4a84d22a130f5d583ef24eabe7a36f5055 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Fri, 14 Aug 2015 02:22:15 +0200 Subject: [PATCH 012/180] add dayOfWeek and updateMemory to Own File Update some Comments Fixing Spelling Issue --- addons/kestrel4500/XEH_preInit.sqf | 21 ++-------------- .../functions/fnc_createKestrelDialog.sqf | 3 ++- .../kestrel4500/functions/fnc_dayOfWeek.sqf | 25 +++++++++++++++++++ .../functions/fnc_displayKestrel.sqf | 4 +-- .../functions/fnc_generateOutputData.sqf | 2 +- .../functions/fnc_onCloseDialog.sqf | 2 +- .../functions/fnc_onCloseDisplay.sqf | 2 +- .../functions/fnc_updateMemory.sqf | 20 +++++++++++++++ .../functions/script_component.hpp | 2 +- 9 files changed, 55 insertions(+), 26 deletions(-) create mode 100644 addons/kestrel4500/functions/fnc_dayOfWeek.sqf create mode 100644 addons/kestrel4500/functions/fnc_updateMemory.sqf diff --git a/addons/kestrel4500/XEH_preInit.sqf b/addons/kestrel4500/XEH_preInit.sqf index b7d66cbb94..b89f07173f 100644 --- a/addons/kestrel4500/XEH_preInit.sqf +++ b/addons/kestrel4500/XEH_preInit.sqf @@ -15,23 +15,6 @@ PREP(restoreUserData); PREP(storeUserData); PREP(updateDisplay); PREP(updateImpellerState); - +PREP(updateMemory); +PREP(dayOfWeek) ADDON = true; - -FUNC(updateMemory) = { - params ["_slot", "_value"]; - GVAR(MIN) set [_slot, (GVAR(MIN) select _slot) min _value]; - GVAR(MAX) set [_slot, _value max (GVAR(MAX) select _slot)]; - GVAR(TOTAL) set [_slot, (GVAR(TOTAL) select _slot) + _value]; -}; - -FUNC(dayOfWeek) = { - private "_table"; - params ["_year", "_month", "_day"]; - - _table = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]; - if (_month < 3) then { - _year = _year - 1; - }; - (_year + floor(_year/4) - floor(_year/100) + floor(_year/400) + (_table select (_month - 1)) + _day) % 7 -}; diff --git a/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf b/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf index 23ca70543b..a11982968c 100644 --- a/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf +++ b/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf @@ -6,9 +6,10 @@ * None * * Return Value: - * Nothing + * None * * Example: + * call ace_kestrel4500_fnc_createKestrelDialog * * Public: No */ diff --git a/addons/kestrel4500/functions/fnc_dayOfWeek.sqf b/addons/kestrel4500/functions/fnc_dayOfWeek.sqf new file mode 100644 index 0000000000..9e142f661c --- /dev/null +++ b/addons/kestrel4500/functions/fnc_dayOfWeek.sqf @@ -0,0 +1,25 @@ +/* + * Author: Ruthberg + * Calculate Current Day in the Week + * + * Arguments: + * 0: Year + * 1: Month + * 2: Day + * + * Return Value: + * Day of The Week + * + * Example: + * [1995, 10, 21] call ace_kestrel4500_fnc_buttonPressed + * + * Public: No + */ +private "_table"; +params ["_year", "_month", "_day"]; + +_table = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]; +if (_month < 3) then { + _year = _year - 1; +}; +(_year + floor(_year/4) - floor(_year/100) + floor(_year/400) + (_table select (_month - 1)) + _day) % 7 diff --git a/addons/kestrel4500/functions/fnc_displayKestrel.sqf b/addons/kestrel4500/functions/fnc_displayKestrel.sqf index 63a162a7b0..770347ec71 100644 --- a/addons/kestrel4500/functions/fnc_displayKestrel.sqf +++ b/addons/kestrel4500/functions/fnc_displayKestrel.sqf @@ -6,10 +6,10 @@ * None * * Return Value: - * Nothing + * None * * Example: - * call ace_kestrel4500_fnc_displayKestrell + * call ace_kestrel4500_fnc_displayKestrel * * Public: No */ diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index de62da31ff..016baebef7 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -25,7 +25,7 @@ * 15: Center Line 6 * * Example: - * _var = call ace_kestrell4500_fnc_generateOutputData + * _var = call ace_kestrel4500_fnc_generateOutputData * * Public: No */ diff --git a/addons/kestrel4500/functions/fnc_onCloseDialog.sqf b/addons/kestrel4500/functions/fnc_onCloseDialog.sqf index 11fa76ff18..2474f30d94 100644 --- a/addons/kestrel4500/functions/fnc_onCloseDialog.sqf +++ b/addons/kestrel4500/functions/fnc_onCloseDialog.sqf @@ -1,6 +1,6 @@ /* * Author: Ruthberg - * Called if Kestrell Dialog is closed + * Called if Kestrel Dialog is closed * * Arguments: * None diff --git a/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf b/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf index 9228aedcef..bdc701ddb1 100644 --- a/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf +++ b/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf @@ -1,6 +1,6 @@ /* * Author: Ruthberg - * Called if Kestrell Display is closed + * Called if Kestrel Display is closed * * Arguments: * None diff --git a/addons/kestrel4500/functions/fnc_updateMemory.sqf b/addons/kestrel4500/functions/fnc_updateMemory.sqf new file mode 100644 index 0000000000..f38e9ee6df --- /dev/null +++ b/addons/kestrel4500/functions/fnc_updateMemory.sqf @@ -0,0 +1,20 @@ +/* + * Author: Ruthberg + * Update Memory of Kestrel + * + * Arguments: + * 0: Slot + * 1: Value + * + * Return Value: + * None + * + * Example: + * [1, "test"] call ace_kestrel4500_fnc_updateMemory + * + * Public: No + */ +params ["_slot", "_value"]; +GVAR(MIN) set [_slot, (GVAR(MIN) select _slot) min _value]; +GVAR(MAX) set [_slot, _value max (GVAR(MAX) select _slot)]; +GVAR(TOTAL) set [_slot, (GVAR(TOTAL) select _slot) + _value]; diff --git a/addons/kestrel4500/functions/script_component.hpp b/addons/kestrel4500/functions/script_component.hpp index 32c774cd89..bc42218de7 100644 --- a/addons/kestrel4500/functions/script_component.hpp +++ b/addons/kestrel4500/functions/script_component.hpp @@ -1 +1 @@ -#include "\z\ace\addons\kestrel4500\script_component.hpp" \ No newline at end of file +#include "\z\ace\addons\kestrel4500\script_component.hpp" From c3c39150a303299f4f6cfdbccbb1130d2ce4f6f2 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Sat, 15 Aug 2015 12:12:41 +0200 Subject: [PATCH 013/180] Improved handling of accessing dynamic variable names --- addons/map_gestures/functions/fnc_drawMapGestures.sqf | 4 ++-- addons/map_gestures/functions/fnc_receiverInit.sqf | 2 +- addons/map_gestures/functions/fnc_transmitterInit.sqf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 877b503b38..54efd878ce 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -25,8 +25,8 @@ _proximityPlayers = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); _nameSane = [name _x] call FUNC(sanitizeName); _drawPosVariableName = format [QGVAR(%1_DrawPos), _nameSane]; if (!isNil _drawPosVariableName) then { - if (isNil {call compile _drawPosVariableName}) then {call compile format [QUOTE(GVAR(%1_DrawPos) = [ARR_3(1,1,1)];), _nameSane];}; - _pos = call compile _drawPosVariableName; + if (isNil {missionNamespace getVariable _drawPosVariableName}) then {missionNamespace setVariable [_drawPosVariableName, [1, 1, 1]];}; + _pos = missionNamespace getVariable _drawPosVariableName; if (alive _x && {_x getVariable QGVAR(Transmit)}) then { _group = group _x; diff --git a/addons/map_gestures/functions/fnc_receiverInit.sqf b/addons/map_gestures/functions/fnc_receiverInit.sqf index 482572c19e..719e5a727b 100644 --- a/addons/map_gestures/functions/fnc_receiverInit.sqf +++ b/addons/map_gestures/functions/fnc_receiverInit.sqf @@ -18,7 +18,7 @@ { if (isPlayer _x) then { _nameSane = [name _x] call FUNC(sanitizeName); - call compile format [QUOTE(GVAR(%1_DrawPos) = [ARR_3(1,1,1)];), _nameSane]; + missionNamespace setVariable [format [QGVAR(%1_DrawPos), _nameSane], [1, 1, 1]]; }; nil } count allUnits; diff --git a/addons/map_gestures/functions/fnc_transmitterInit.sqf b/addons/map_gestures/functions/fnc_transmitterInit.sqf index 6ba6d0881e..828261e017 100644 --- a/addons/map_gestures/functions/fnc_transmitterInit.sqf +++ b/addons/map_gestures/functions/fnc_transmitterInit.sqf @@ -36,7 +36,7 @@ GVAR(MouseMoveHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseMoving", { }; _nameSane = [name ACE_player] call FUNC(sanitizeName); - call compile format [QUOTE(GVAR(%1_DrawPos) = %2), _nameSane, _control ctrlMapScreenToWorld [_posX, _posY]]; + missionNamespace setVariable [format [QGVAR(%1_DrawPos), _nameSane], _control ctrlMapScreenToWorld [_posX, _posY]]; }; }]; From 3646654ff3b4bac29d137cb7fd733e9370ddb2ea Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Sat, 15 Aug 2015 12:21:40 +0200 Subject: [PATCH 014/180] Added module icons --- addons/map_gestures/CfgVehicles.hpp | 2 ++ .../ui/icon_module_map_gestures_ca.paa | Bin 0 -> 5625 bytes 2 files changed, 2 insertions(+) create mode 100644 addons/map_gestures/ui/icon_module_map_gestures_ca.paa diff --git a/addons/map_gestures/CfgVehicles.hpp b/addons/map_gestures/CfgVehicles.hpp index 30204629a8..f5c2ae8f38 100644 --- a/addons/map_gestures/CfgVehicles.hpp +++ b/addons/map_gestures/CfgVehicles.hpp @@ -7,6 +7,7 @@ class CfgVehicles { function = QFUNC(moduleSettings); isGlobal = 0; author = ECSTRING(common,ACETeam); + icon = PATHTOF(ui\icon_module_map_gestures_ca.paa); class Arguments { class enabled { displayName = CSTRING(enabled_DisplayName); @@ -46,6 +47,7 @@ class CfgVehicles { function = QFUNC(moduleGroupSettings); isGlobal = 0; author = ECSTRING(common,ACETeam); + icon = PATHTOF(ui\icon_module_map_gestures_ca.paa); class Arguments { class leadColor { displayName = CSTRING(leadColor_displayName); diff --git a/addons/map_gestures/ui/icon_module_map_gestures_ca.paa b/addons/map_gestures/ui/icon_module_map_gestures_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..2d2bcbdf07e0bd88e5158a22bdccdbca6a570df1 GIT binary patch literal 5625 zcmd^@eN0nV6u=Lq4jD?Ba~emTb=0^;jL9&?=^PJdpcRnm3^Un?QekWwL6?QNIoHQD zVU9%@NN@(k!5<`=$Vax9Y|gc^{jsP+Bz~ZE>gJ3(tW;n{S?k-qub%r}AEAW|{+Tar z(qHen=j)z(-+6C>n3|fr=C#zUWGw&;4i3IA@!I4J$|AWarzWSTP!1zs%5S8kWOC#; zPrfBF0DGnaR6PT5nS4igaliq@5JUcH)FA!!U)itCAHZ1X6M@qh$%pv|k>&Kmc#Qog z>Ug91Q-wV!H(DwJSZgWQ4rf1P{6ruyo}u~!?Qs=>tco8%V;~>&M{Pe84_R+8Yv>%* zCxS)Il1etN%D>v)Q2l}Hsg@7LqI&)P6IlFycgmIPMI?f-%K!0Se-c0Oh~*DRafRYw z_3vN*Kz(G%0`v!Enm}cKNb#HHdZ(lGQs^ru^*?NW{nAQ#`p@w4q1TJni|o&%^&i%L zXnksbNdAN7=l?#g&d1}$G+KILefw$ToZvQXoaeFj;e3}T%uRpOOVaC7ou4Z1b~`g^e6pB(!G;OUI(&yh1u#9Han4BAk^-9 zu;pvyxXU$rV{)yf$n!fZa-F+sW004gfx>Q+H4a&S$L5=E>(56X>v%@1ub`U*f2Hst z`m?k{=WT2BT||y*5c1+u3SUKDb$8OoU9ECH)b?JuZrw=YU4Zh2mV_xszkPW-a_OMW zohlC0A?xVIp){O>3AB&JPQxGZcyUB5 zDP|#O3F_bd;Fl(^_bNqczt_XI`nhRs?EVyaHp|*$dM6gg|A1=EWydP!uMaGzmPc)E zz;Q!<voi_8*XoA>&7*xs&NzR{G$o_)i%fmh5#yTD@_bW-ju0ulGv_gq*j8_gMU5 zL%5OG#2e85axk|V(`A33mezM4Ti-eTS4z%DIS!+IZ0AbH$;O$iUS_;)&Q+cl8X(OG zDRGq7b)IN?cuU9j+seDeGcPv!F5&oi#~MEnC#_c$bu2ztk0p@Zx%Y#PtL4=!zFw*9*Q#7e}Giy8b#~^oJ7Vkj)bB;fCaGGE}ioEFht^5NWQLi9t zrDJU5ZAzphFSiAY?kxHB^syRNpWnfuxc-v;;i&(4yRczN$02s?8a`8KD{H+jtx@EYLz3y*pXqJYYZo@=CD<$4f3w0?qem2!Ob-z77po)q<|?8T5* zf#fA4M;0_Evo{Cb=IsNvx`C}p$OhilI$NlWM<(*KoS9Qt8aPLB7+9=Md3-Br@aic_ zVQ`M!q!N1VGLt>4kXLtucZ_+b9xmQlgYtjD2UXABK9h~Sn1+#|Sk_$7^5o>eaos@i zo19{sL=WtY;uXC9aC3&U#mD3)!bJL7^k)3p*;(zIbg1Sxu77{ijwnfvBps%GRg_nq la*pjrV`b^Fwte14l-H6ImE<%1$nMXJu6(fu|E5y`{sk(+gCGC^ literal 0 HcmV?d00001 From 7217d5ec10ffdf14fb08d1b305b86793ca98477e Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 24 Aug 2015 17:03:47 +0200 Subject: [PATCH 015/180] Various code cleanups and switch to player UIDs instead of sanitized names --- addons/map_gestures/CfgEventHandlers.hpp | 1 + addons/map_gestures/XEH_preInit.sqf | 1 - addons/map_gestures/XEH_serverPostInit.sqf | 3 ++ .../functions/fnc_assignClientIDOnServer.sqf | 2 +- .../functions/fnc_drawMapGestures.sqf | 35 +++++++++++++------ .../functions/fnc_getProximityPlayers.sqf | 5 +-- .../functions/fnc_moduleGroupSettings.sqf | 12 ++++--- .../functions/fnc_receiverInit.sqf | 8 ----- .../functions/fnc_sanitizeName.sqf | 30 ---------------- .../map_gestures/functions/fnc_transmit.sqf | 24 +++++++------ .../functions/fnc_transmitterInit.sqf | 22 ++++++------ addons/map_gestures/script_component.hpp | 2 ++ 12 files changed, 67 insertions(+), 78 deletions(-) create mode 100644 addons/map_gestures/XEH_serverPostInit.sqf delete mode 100644 addons/map_gestures/functions/fnc_sanitizeName.sqf diff --git a/addons/map_gestures/CfgEventHandlers.hpp b/addons/map_gestures/CfgEventHandlers.hpp index e75956f440..7e0c8d2ce3 100644 --- a/addons/map_gestures/CfgEventHandlers.hpp +++ b/addons/map_gestures/CfgEventHandlers.hpp @@ -7,5 +7,6 @@ class Extended_PreInit_EventHandlers { class Extended_PostInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_postInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_serverPostInit)); }; }; diff --git a/addons/map_gestures/XEH_preInit.sqf b/addons/map_gestures/XEH_preInit.sqf index ad4da44998..8154106fd6 100644 --- a/addons/map_gestures/XEH_preInit.sqf +++ b/addons/map_gestures/XEH_preInit.sqf @@ -11,7 +11,6 @@ PREP(isValidColorArray); PREP(moduleGroupSettings); PREP(moduleSettings); PREP(receiverInit); -PREP(sanitizeName); PREP(transmit); PREP(transmitterInit); diff --git a/addons/map_gestures/XEH_serverPostInit.sqf b/addons/map_gestures/XEH_serverPostInit.sqf new file mode 100644 index 0000000000..9bbf84911e --- /dev/null +++ b/addons/map_gestures/XEH_serverPostInit.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +[MAP_GESTURES_NO_OWNER_ID_EVENT, FUNC(assignClientIDOnServer)] call EFUNC(common,addEventHandler) diff --git a/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf b/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf index c686c17b79..92b1e95ab5 100644 --- a/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf +++ b/addons/map_gestures/functions/fnc_assignClientIDOnServer.sqf @@ -18,7 +18,7 @@ params ["_unitName"]; { - if (name _x == _unitName) then { + if (name _x == _unitName) exitWith { _x setVariable [QGVAR(owner_id), owner _x, true]; }; } count playableUnits; diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 54efd878ce..31c41ca995 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -15,23 +15,35 @@ */ #include "script_component.hpp" -if (!GVAR(enabled)) exitWith {}; -if (!visibleMap) exitWith {}; +#define ICON_RENDER_SIZE 55 +#define ICON_TEXT_ALIGN "left" +#define ICON_ANGLE 0 +#define ICON_SHADOW 1 +#define TEXT_FONT "PuristaBold" +#define TEXT_ICON_RENDER_SIZE 20 +#define TEXT_SIZE 0.030 +#define TEXT_SHADOW 0 + +if (!GVAR(enabled) || !visibleMap) exitWith {}; params ["_mapHandle"]; -_proximityPlayers = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); +// Iterate over all nearby players and render their pointer if player is transmitting. { - _nameSane = [name _x] call FUNC(sanitizeName); - _drawPosVariableName = format [QGVAR(%1_DrawPos), _nameSane]; - if (!isNil _drawPosVariableName) then { + // Data variable name for unit + _unitUID = getPlayerUID _x; + _drawPosVariableName = if (!isNil "_unitUID" && _unitUID != "") then {format [QGVAR(%1_DrawPos), _unitUID]} else {nil}; + + if (!isNil "_drawPosVariableName") then { if (isNil {missionNamespace getVariable _drawPosVariableName}) then {missionNamespace setVariable [_drawPosVariableName, [1, 1, 1]];}; _pos = missionNamespace getVariable _drawPosVariableName; - if (alive _x && - {_x getVariable QGVAR(Transmit)}) then { + + // Only render if the unit is alive and transmitting + if (alive _x && {_x getVariable QGVAR(Transmit)}) then { _group = group _x; _grpName = groupID _group; + // If color settings for the group exist, then use those, otherwise fall back to the default colors _color = if (_grpName in GVAR(GroupColorConfigurationsGroups)) then { _grpNameIndex = GVAR(GroupColorConfigurationsGroups) find _grpName; (GVAR(GroupColorConfigurations) select (GVAR(GroupColorConfigurationsGroupIndex) select _grpNameIndex)) select (_x != leader _group) @@ -39,9 +51,10 @@ _proximityPlayers = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); if (_x == leader _group) then {GVAR(defaultLeadColor)} else {GVAR(defaultColor)}; }; - _mapHandle drawIcon ["\a3\ui_f\data\gui\cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, 55, 55, 0, "", 1, 0.030, "PuristaBold", "left"]; - _mapHandle drawIcon ["#(argb,8,8,3)color(0,0,0,0)", [.2,.2,.2,.3], _pos, 20, 20, 0, name _x, 0, 0.030, "PuristaBold", "left"]; + // Render icon and player name + _mapHandle drawIcon ["\a3\ui_f\data\gui\cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, ICON_RENDER_SIZE, ICON_RENDER_SIZE, ICON_ANGLE, "", ICON_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; + _mapHandle drawIcon ["#(argb,8,8,3)color(0,0,0,0)", [.2,.2,.2,.3], _pos, TEXT_ICON_RENDER_SIZE, TEXT_ICON_RENDER_SIZE, ICON_ANGLE, name _x, TEXT_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; }; }; nil -} count _proximityPlayers; +} count ([ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers)); diff --git a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf index 3ac8803a70..43d78f3506 100644 --- a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf +++ b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf @@ -19,5 +19,6 @@ params ["_unit", "_range"]; _proximityPlayers = (getPos _unit) nearEntities [["CAMAnBase"], _range]; -_proximityPlayers = _proximityPlayers - [_unit]; -(_proximityPlayers + (crew vehicle _unit)) +_proximityPlayers deleteAt (_proximityPlayers find _unit); +_proximityPlayers append (crew vehicle _unit) +_proximityPlayers diff --git a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf index 32f7e73143..013f076347 100644 --- a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf @@ -19,22 +19,24 @@ params ["_logic", "_units", "_activated"]; -diag_log "Running"; - -if (!_activated) exitWith {}; -if (!isServer) exitWith {}; +if (!_activated || !isServer) exitWith {}; +// Transcode string setting into usable array. Example: "1,1,1,1" -> [1, 1, 1, 1] _leadColor = call compile ("[" + (_logic getVariable ["leadColor", ""]) + "]"); if (!([_leadColor] call FUNC(isValidColorArray))) exitWith {ERROR("leadColor is not a valid color array.")}; _color = call compile ("[" + (_logic getVariable ["color", ""]) + "]"); if (!([_color] call FUNC(isValidColorArray))) exitWith {ERROR("color is not a valid color array.")}; +// If we already have color configurations from another source, use those, otherwise use default. _configurations = if (isNil QGVAR(GroupColorConfigurations)) then { [] } else { +GVAR(GroupColorConfigurations) }; _configurationGroups = if (isNil QGVAR(GroupColorConfigurationsGroups)) then { [] } else { +GVAR(GroupColorConfigurationsGroups) }; _configurationGroupsIndex = if (isNil QGVAR(GroupColorConfigurationsGroupIndex)) then { [] } else { +GVAR(GroupColorConfigurationsGroupIndex) }; -_completedGroups = []; +// Save custom color configuration and keep the index of the entry. _configurationIndex = _configurations pushBack [_leadColor, _color]; + +// Add all synchronized groups and reference custom configuration for them +_completedGroups = []; { private "_group"; _group = groupID (group _x); diff --git a/addons/map_gestures/functions/fnc_receiverInit.sqf b/addons/map_gestures/functions/fnc_receiverInit.sqf index 719e5a727b..a14efbffc1 100644 --- a/addons/map_gestures/functions/fnc_receiverInit.sqf +++ b/addons/map_gestures/functions/fnc_receiverInit.sqf @@ -15,14 +15,6 @@ */ #include "script_component.hpp" -{ - if (isPlayer _x) then { - _nameSane = [name _x] call FUNC(sanitizeName); - missionNamespace setVariable [format [QGVAR(%1_DrawPos), _nameSane], [1, 1, 1]]; - }; - nil -} count allUnits; - ACE_player setVariable [QGVAR(Transmit), false, true]; GVAR(EnableTransmit) = false; diff --git a/addons/map_gestures/functions/fnc_sanitizeName.sqf b/addons/map_gestures/functions/fnc_sanitizeName.sqf deleted file mode 100644 index f36e626102..0000000000 --- a/addons/map_gestures/functions/fnc_sanitizeName.sqf +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Author: Dslyecxi, MikeMatrix - * Cleans up unit names to be usable within variable names. - * - * Arguments: - * 0: Name - * - * Return Value: - * Sanitized name - * - * Example: - * ["I am a non valid variable name"] call ace_map_gestures_fnc_sanitizeName - * - * Public: No - */ -#include "script_component.hpp" - -private ["_alphabet", "_nameSanitized"]; - -params ["_name"]; - -_alphabet = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]; - -_nameSanitized = []; -{ - if (toString [_x] in _alphabet) then {_nameSanitized pushBack _x}; - nil -} count (toArray _name); - -toString _nameSanitized diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf index 4d99caa160..56adbe4266 100644 --- a/addons/map_gestures/functions/fnc_transmit.sqf +++ b/addons/map_gestures/functions/fnc_transmit.sqf @@ -16,26 +16,30 @@ */ #include "script_component.hpp" -private ["_proximityPlayers", "_ownerID", "_nameSane"]; +private ["_proximityPlayers", "_ownerID", "_unitUID", "_drawPosVariableName"]; params ["", "_pfhId"]; -if (!GVAR(EnableTransmit) || !visibleMap) exitWith { +if (!visibleMap) then { call FUNC(endTransmit); +} + +if (!GVAR(EnableTransmit) || !visibleMap) exitWith { [_pfhId] call CBA_fnc_removePerFrameHandler; }; -_proximityPlayers = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers); -TRACE_1("Near",_proximityPlayers) - { _ownerID = _x getVariable QGVAR(owner_id); if (isNil "_ownerID") then { - [0, {[_this] call FUNC(assignClientIDOnServer)}, name _x] call cba_fnc_GlobalExecute; + [MAP_GESTURES_NO_OWNER_ID_EVENT, [name _x]] call EFUNC(common,serverEvent); } else { - if (_ownerID != ACE_player getVariable QGVAR(owner_id)) then { - _nameSane = [name ACE_player] call FUNC(sanitizeName); - _ownerID publicVariableClient format [QGVAR(%1_DrawPos), _nameSane]; + _playerOwnerID = ACE_player getVariable QGVAR(owner_id); + if (!isNil "_playerOwnerID" && _ownerID != _playerOwnerID) then { + _unitUID = getPlayerUID ACE_Player; + _drawPosVariableName = if (!isNil "_unitUID" && _unitUID != "") then {format [QGVAR(%1_DrawPos), _unitUID]} else {nil}; + if (!isNil "_drawPosVariableName") then { + _ownerID publicVariableClient _drawPosVariableName; + }; }; }; -} count _proximityPlayers; +} count ([ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers)); diff --git a/addons/map_gestures/functions/fnc_transmitterInit.sqf b/addons/map_gestures/functions/fnc_transmitterInit.sqf index 828261e017..251e6d2619 100644 --- a/addons/map_gestures/functions/fnc_transmitterInit.sqf +++ b/addons/map_gestures/functions/fnc_transmitterInit.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -private ["_mapCtrl", "_nameSane"]; +private ["_mapCtrl", "_unitUID", "_drawPosVariableName"]; disableSerialization; @@ -24,19 +24,19 @@ _mapCtrl = findDisplay 12 displayCtrl 51; // MouseMoving EH. if (!isNil QGVAR(MouseMoveHandlerID)) then {_mapCtrl ctrlRemoveEventHandler ["MouseMoving", GVAR(MouseMoveHandlerID)]; GVAR(MouseMoveHandlerID) = nil;}; GVAR(MouseMoveHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseMoving", { - if (EGVAR(maptools,drawing_isDrawing)) exitWith {}; - if (EGVAR(maptools,mapTool_isDragging)) exitWith {}; - if (EGVAR(maptools,mapTool_isRotating)) exitWith {}; + // Don't transmit any data if we're using the map tools + if (!GVAR(EnableTransmit) || EGVAR(maptools,drawing_isDrawing) || EGVAR(maptools,mapTool_isDragging) || EGVAR(maptools,mapTool_isRotating)) exitWith {}; params ["_control", "_posX", "_posY"]; - if (GVAR(EnableTransmit)) then { - if (!(ACE_player getVariable QGVAR(Transmit))) then { - ACE_player setVariable [QGVAR(Transmit), true, true]; - }; + if (!(ACE_player getVariable QGVAR(Transmit))) then { + ACE_player setVariable [QGVAR(Transmit), true, true]; + }; - _nameSane = [name ACE_player] call FUNC(sanitizeName); - missionNamespace setVariable [format [QGVAR(%1_DrawPos), _nameSane], _control ctrlMapScreenToWorld [_posX, _posY]]; + _unitUID = getPlayerUID ACE_player; + _drawPosVariableName = if (!isNil "_unitUID" && _unitUID != "") then {format [QGVAR(%1_DrawPos), _unitUID]} else {nil}; + if (!isNil "_drawPosVariableName") then { + missionNamespace setVariable [_drawPosVariableName, _control ctrlMapScreenToWorld [_posX, _posY]]; }; }]; @@ -53,6 +53,8 @@ GVAR(MouseDownHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseButtonDown", { // MouseUp EH if (!isNil QGVAR(MouseUpHandlerID)) then {_mapCtrl ctrlRemoveEventHandler ["MouseButtonUp", GVAR(MouseUpHandlerID)]; GVAR(MouseUpHandlerID) = nil;}; GVAR(MouseUpHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseButtonUp", { + if (!GVAR(enabled)) exitWith {}; + params ["", "_button"]; if (_button == 0) then {call FUNC(endTransmit);}; diff --git a/addons/map_gestures/script_component.hpp b/addons/map_gestures/script_component.hpp index 7c6f3a5b2f..50f155ccc1 100644 --- a/addons/map_gestures/script_component.hpp +++ b/addons/map_gestures/script_component.hpp @@ -10,3 +10,5 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" + +#define MAP_GESTURES_NO_OWNER_ID_EVENT "PlayerNameHasNoOwnerID" From ee2cc22801ae83b698a403cb43610fa23031dbae Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 24 Aug 2015 17:28:08 +0200 Subject: [PATCH 016/180] Added missing semicolon --- addons/map_gestures/functions/fnc_transmit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf index 56adbe4266..ccd702fd55 100644 --- a/addons/map_gestures/functions/fnc_transmit.sqf +++ b/addons/map_gestures/functions/fnc_transmit.sqf @@ -22,7 +22,7 @@ params ["", "_pfhId"]; if (!visibleMap) then { call FUNC(endTransmit); -} +}; if (!GVAR(EnableTransmit) || !visibleMap) exitWith { [_pfhId] call CBA_fnc_removePerFrameHandler; From 0ff5e86b5271ee4035927caa7df724700fd92d5e Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 24 Aug 2015 21:00:24 +0200 Subject: [PATCH 017/180] Another missing semi-colon --- addons/map_gestures/functions/fnc_getProximityPlayers.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf index 43d78f3506..7a72c00520 100644 --- a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf +++ b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf @@ -20,5 +20,5 @@ params ["_unit", "_range"]; _proximityPlayers = (getPos _unit) nearEntities [["CAMAnBase"], _range]; _proximityPlayers deleteAt (_proximityPlayers find _unit); -_proximityPlayers append (crew vehicle _unit) +_proximityPlayers append (crew vehicle _unit); _proximityPlayers From ef2924623f05142ea960e857ed230aec02ba9547 Mon Sep 17 00:00:00 2001 From: jonpas Date: Mon, 24 Aug 2015 21:45:02 +0200 Subject: [PATCH 018/180] Added common parseList function for module list parsing --- addons/common/XEH_preInit.sqf | 1 + .../functions/fnc_assignObjectsInList.sqf | 39 +++++------- addons/common/functions/fnc_parseList.sqf | 61 +++++++++++++++++++ addons/slideshow/XEH_preInit.sqf | 1 - addons/slideshow/functions/fnc_makeList.sqf | 57 ----------------- addons/slideshow/functions/fnc_moduleInit.sqf | 8 +-- 6 files changed, 80 insertions(+), 87 deletions(-) create mode 100644 addons/common/functions/fnc_parseList.sqf delete mode 100644 addons/slideshow/functions/fnc_makeList.sqf diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 6fdf99113c..705e8e8b4b 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -144,6 +144,7 @@ PREP(numberToDigitsString); PREP(numberToString); PREP(onAnswerRequest); PREP(owned); +PREP(parseList); PREP(player); PREP(playerSide); PREP(positionToASL); diff --git a/addons/common/functions/fnc_assignObjectsInList.sqf b/addons/common/functions/fnc_assignObjectsInList.sqf index 0d10066d01..89c8a3352d 100644 --- a/addons/common/functions/fnc_assignObjectsInList.sqf +++ b/addons/common/functions/fnc_assignObjectsInList.sqf @@ -4,47 +4,36 @@ * Used by moduleAssign* within various parts of the ACE3 project. * * Arguments: - * 0: list - * 1: variableName - * 2: value + * 0: List + * 1: Variable Name + * 2: Value * 3: Global * * Return Value: - * None + * None + * + * Example: + * ["text", "variable", value, true] call ace_common_fnc_assignObjectsInList * * Public: No */ - +#define DEBUG_MODE_FULL #include "script_component.hpp" -private ["_splittedList", "_nilCheckPassedList"]; params ["_list", "_variable", "_setting", "_global"]; if (typeName _list == "STRING") then { - _splittedList = [_list, ","] call BIS_fnc_splitString; - _nilCheckPassedList = ""; - { - _x = [_x] call FUNC(stringRemoveWhiteSpace); - if !(isnil _x) then { - if (_nilCheckPassedList == "") then { - _nilCheckPassedList = _x; - } else { - _nilCheckPassedList = _nilCheckPassedList + ","+ _x; - }; - }; - }foreach _splittedList; - - _list = [] call compile format["[%1]",_nilCheckPassedList]; + _list = [_list, true, true] call FUNC(parseList); + TRACE_1("Parsed",_list) }; { - if (!isnil "_x") then { + if (!isNil "_x") then { if (typeName _x == typeName objNull) then { if (local _x) then { - _x setvariable [_variable, _setting, _global]; + _x setVariable [_variable, _setting, _global]; + TRACE_4("Set variable",_x,_variable,_setting,_global); }; }; }; -}foreach _list; - -true +} count _list; diff --git a/addons/common/functions/fnc_parseList.sqf b/addons/common/functions/fnc_parseList.sqf new file mode 100644 index 0000000000..20630e1109 --- /dev/null +++ b/addons/common/functions/fnc_parseList.sqf @@ -0,0 +1,61 @@ +/* + * Author: Jonpas + * Makes a list from a string using comma as a delimiter, optionally trim or remove whitespace and check each for object existence. + * + * Arguments: + * 0: List + * 1: Remove or Trim Whitespace (default: false (trim)) + * 2: Check Nil (default: false) + * + * Return Value: + * Parsed List + * + * Example: + * ["text", true, false] call ace_common_fnc_parseList + * + * Public: No + */ +#define DEBUG_MODE_FULL +#include "script_component.hpp" + +private ["_splittedList", "_whitespaceList", "_nilCheckedList"]; +params ["_list", ["_removeWhitespace", false], ["_checkNil", false]]; + + +// Split using comma delimiter +_splittedList = [_list, ","] call BIS_fnc_splitString; + + +// Remove or Trim Whitespace +_whitespaceList = []; +{ + if (_removeWhitespace) then { + _whitespaceList pushBack ([_x] call FUNC(stringRemoveWhiteSpace)); + } else { + _whitespaceList pushBack ([_x] call CBA_fnc_trim); + }; + nil +} count _splittedList; +_list = _whitespaceList; + + +// Check for object existence +_nilCheckedList = ""; +if (_checkNil) then { + { + if !(isNil _x) then { + if (_nilCheckedList == "") then { + _nilCheckedList = _x; + } else { + _nilCheckedList = _nilCheckedList + "," + _x; + }; + }; + } count _list; + + // Add Array characters and parse into array + _list = [] call compile format ["[%1]", _nilCheckedList]; +}; + +TRACE_4("Lists",_splittedList,_whitespaceList,_nilCheckedList,_list); + +_list diff --git a/addons/slideshow/XEH_preInit.sqf b/addons/slideshow/XEH_preInit.sqf index 0f9e270896..152c02ec77 100644 --- a/addons/slideshow/XEH_preInit.sqf +++ b/addons/slideshow/XEH_preInit.sqf @@ -5,7 +5,6 @@ ADDON = false; PREP(addSlideActions); PREP(autoTransition); PREP(createSlideshow); -PREP(makeList); PREP(moduleInit); GVAR(slideshows) = 0; diff --git a/addons/slideshow/functions/fnc_makeList.sqf b/addons/slideshow/functions/fnc_makeList.sqf deleted file mode 100644 index 6736fabbdb..0000000000 --- a/addons/slideshow/functions/fnc_makeList.sqf +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Author: Jonpas - * Makes a list from a string using comma as a delimiter, optionally remove whitespace and check each for object existence. - * - * Arguments: - * 0: Text - * 1: Trim Whitespace - * 2: Check Nil - * - * Return Value: - * Parsed List - * - * Example: - * ["text", true, false] call ace_slideshow_fnc_makeList - * - * Public: No - */ -#include "script_component.hpp" - -params ["_list", "_trimWhitespace", "_checkNil"]; - -private ["_splittedList", "_listTrimmedWhitespace", "_nilCheckPassedList"]; - -// Split using comma delimiter -_splittedList = [_list, ","] call BIS_fnc_splitString; - -// Remove whitespace -_listTrimmedWhitespace = []; -if (_trimWhitespace) then { - { - _listTrimmedWhitespace pushBack ([_x] call CBA_fnc_trim); - nil - } count _splittedList; - _list = _listTrimmedWhitespace; -}; - -// Check for object existence -_nilCheckPassedList = ""; -if (_checkNil) then { - { - if !(isNil _x) then { - if (_nilCheckPassedList == "") then { - _nilCheckPassedList = _x; - } else { - _nilCheckPassedList = _nilCheckPassedList + "," + _x; - }; - }; - } count _list; - - // Add Array characters and parse into array - _list = "[" + _nilCheckPassedList + "]"; - _list = [] call compile _list; -}; - -TRACE_4("Lists",_splittedList,_listTrimmedWhitespace,_nilCheckPassedList,_list); - -_list // return diff --git a/addons/slideshow/functions/fnc_moduleInit.sqf b/addons/slideshow/functions/fnc_moduleInit.sqf index da1724dfcc..e4f7fbb56c 100644 --- a/addons/slideshow/functions/fnc_moduleInit.sqf +++ b/addons/slideshow/functions/fnc_moduleInit.sqf @@ -25,10 +25,10 @@ if !(_activated) exitWith {}; if (isNull _logic) exitWith {}; // Extract variables from logic -_objects = [_logic getVariable ["Objects", ""], true, true] call FUNC(makeList); -_controllers = [_logic getVariable ["Controllers", ""], true, true] call FUNC(makeList); -_images = [_logic getVariable ["Images", ""], true, false] call FUNC(makeList); -_names = [_logic getVariable ["Names", ""], true, false] call FUNC(makeList); +_objects = [_logic getVariable ["Objects", ""], true, true] call EFUNC(common,parseList); +_controllers = [_logic getVariable ["Controllers", ""], true, true] call EFUNC(common,parseList); +_images = [_logic getVariable ["Images", ""], false, false] call EFUNC(common,parseList); +_names = [_logic getVariable ["Names", ""], false, false] call EFUNC(common,parseList); _duration = _logic getVariable ["Duration", 0]; // Prepare with actions From 5b6429f23e84bd3af7439d88cd5aa9860f72006a Mon Sep 17 00:00:00 2001 From: jonpas Date: Mon, 24 Aug 2015 21:55:48 +0200 Subject: [PATCH 019/180] Made more modules use assignObjectsInList common function --- .../functions/fnc_moduleAssignMedicRoles.sqf | 59 ++++-------------- .../fnc_moduleAssignMedicalVehicle.sqf | 60 ++++--------------- .../functions/fnc_moduleAssignEngineer.sqf | 8 +-- .../fnc_moduleAssignRepairFacility.sqf | 6 +- .../fnc_moduleAssignRepairVehicle.sqf | 8 +-- 5 files changed, 30 insertions(+), 111 deletions(-) diff --git a/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf b/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf index 1c26eb53d4..a884bfe300 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf @@ -1,63 +1,26 @@ /* * Author: Glowbal - * Assign a medical role to a unit + * Assign a medical role to a unit. * * Arguments: - * 0: The module logic - * 1: units - * 2: activated + * 0: The module logic + * 1: Synchronized units + * 2: Activated * * Return Value: * None * * Public: No */ - #include "script_component.hpp" -private ["_logic","_setting","_objects", "_list", "_splittedList", "_nilCheckPassedList", "_parsedList"]; -_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param; +params ["_logic"]; if (!isNull _logic) then { - _list = _logic getvariable ["EnableList",""]; + private ["_list", "_setting"]; + _list = _logic getVariable ["EnableList", ""]; + _setting = _logic getVariable ["role", 0]; - _splittedList = [_list, ","] call BIS_fnc_splitString; - _nilCheckPassedList = ""; - { - _x = [_x] call EFUNC(common,stringRemoveWhiteSpace); - if !(isnil _x) then { - if (_nilCheckPassedList == "") then { - _nilCheckPassedList = _x; - } else { - _nilCheckPassedList = _nilCheckPassedList + ","+ _x; - }; - }; - }foreach _splittedList; - - _list = "[" + _nilCheckPassedList + "]"; - _parsedList = [] call compile _list; - _setting = _logic getvariable ["role",0]; - _objects = synchronizedObjects _logic; - if (!(_objects isEqualTo []) && _parsedList isEqualTo []) then { - { - if (!isnil "_x") then { - if (typeName _x == typeName objNull) then { - if (local _x) then { - _x setvariable [QGVAR(medicClass), _setting, true]; - }; - }; - }; - }foreach _objects; - }; - { - if (!isnil "_x") then { - if (typeName _x == typeName objNull) then { - if (local _x) then { - _x setvariable [QGVAR(medicClass), _setting, true]; - }; - }; - }; - }foreach _parsedList; - }; - -true \ No newline at end of file + [_list, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList); + [synchronizedObjects _logic, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList); +}; diff --git a/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf b/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf index af6de73ce1..d073ffaecb 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf @@ -1,64 +1,26 @@ /* * Author: Glowbal - * Assign vehicle as a medical vehicle + * Assign vehicle as a medical vehicle. * * Arguments: - * 0: The module logic - * 1: units - * 2: activated + * 0: The module logic + * 1: Synchronized units + * 2: Activated * * Return Value: * None * * Public: No */ - - #include "script_component.hpp" -private ["_logic","_setting","_objects", "_list", "_splittedList", "_nilCheckPassedList", "_parsedList"]; -_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param; +params ["_logic"]; if (!isNull _logic) then { - _list = _logic getvariable ["EnableList",""]; + private ["_list", "_setting"]; + _list = _logic getVariable ["EnableList", ""]; + _setting = _logic getVariable ["enabled", 0]; - _splittedList = [_list, ","] call BIS_fnc_splitString; - _nilCheckPassedList = ""; - { - _x = [_x] call EFUNC(common,stringRemoveWhiteSpace); - if !(isnil _x) then { - if (_nilCheckPassedList == "") then { - _nilCheckPassedList = _x; - } else { - _nilCheckPassedList = _nilCheckPassedList + ","+ _x; - }; - }; - }foreach _splittedList; - - _list = "[" + _nilCheckPassedList + "]"; - _parsedList = [] call compile _list; - _setting = _logic getvariable ["enabled", 0]; - _objects = synchronizedObjects _logic; - if (!(_objects isEqualTo []) && _parsedList isEqualTo []) then { - { - if (!isnil "_x") then { - if (typeName _x == typeName objNull) then { - if (local _x) then { - _x setvariable [QGVAR(medicClass), _setting, true]; - }; - }; - }; - }foreach _objects; - }; - { - if (!isnil "_x") then { - if (typeName _x == typeName objNull) then { - if (local _x) then { - _x setvariable [QGVAR(medicClass), _setting, true]; - }; - }; - }; - }foreach _parsedList; - }; - -true; + [_list, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList); + [synchronizedObjects _logic, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList); +}; diff --git a/addons/repair/functions/fnc_moduleAssignEngineer.sqf b/addons/repair/functions/fnc_moduleAssignEngineer.sqf index 9fb9ed8431..240a8c3b62 100644 --- a/addons/repair/functions/fnc_moduleAssignEngineer.sqf +++ b/addons/repair/functions/fnc_moduleAssignEngineer.sqf @@ -21,11 +21,9 @@ params ["_logic"]; if (!isNull _logic) then { private ["_list", "_setting"]; - _list = _logic getVariable ["EnableList",""]; - _setting = _logic getVariable ["role",0]; + _list = _logic getVariable ["EnableList", ""]; + _setting = _logic getVariable ["role", 0]; [_list, "ACE_IsEngineer", _setting, true] call EFUNC(common,assignObjectsInList); [synchronizedObjects _logic, "ACE_IsEngineer", _setting, true] call EFUNC(common,assignObjectsInList); - }; - -true +}; diff --git a/addons/repair/functions/fnc_moduleAssignRepairFacility.sqf b/addons/repair/functions/fnc_moduleAssignRepairFacility.sqf index 00cb847866..7150d0226b 100644 --- a/addons/repair/functions/fnc_moduleAssignRepairFacility.sqf +++ b/addons/repair/functions/fnc_moduleAssignRepairFacility.sqf @@ -21,11 +21,9 @@ params ["_logic"]; if (!isNull _logic) then { private ["_list", "_setting"]; - _list = _logic getVariable ["EnableList",""]; - _setting = _logic getVariable ["role",0]; + _list = _logic getVariable ["EnableList", ""]; + _setting = _logic getVariable ["role", 0]; [_list, "ACE_isRepairFacility", _setting, true] call EFUNC(common,assignObjectsInList); [synchronizedObjects _logic, "ACE_isRepairFacility", _setting, true] call EFUNC(common,assignObjectsInList); }; - -true diff --git a/addons/repair/functions/fnc_moduleAssignRepairVehicle.sqf b/addons/repair/functions/fnc_moduleAssignRepairVehicle.sqf index 69d2a2c52f..647b5fe52c 100644 --- a/addons/repair/functions/fnc_moduleAssignRepairVehicle.sqf +++ b/addons/repair/functions/fnc_moduleAssignRepairVehicle.sqf @@ -21,11 +21,9 @@ params ["_logic"]; if (!isNull _logic) then { private ["_list", "_setting"]; - _list = _logic getVariable ["EnableList",""]; - _setting = _logic getVariable ["role",0]; + _list = _logic getVariable ["EnableList", ""]; + _setting = _logic getVariable ["role", 0]; [_list, "ACE_isRepairVehicle", _setting, true] call EFUNC(common,assignObjectsInList); [synchronizedObjects _logic, "ACE_isRepairVehicle", _setting, true] call EFUNC(common,assignObjectsInList); - }; - -true +}; From 3f41882a0673b2bdf8cbf1a42319b431c140fb9f Mon Sep 17 00:00:00 2001 From: jonpas Date: Mon, 24 Aug 2015 21:56:21 +0200 Subject: [PATCH 020/180] Removed debug --- addons/common/functions/fnc_assignObjectsInList.sqf | 1 - addons/common/functions/fnc_parseList.sqf | 1 - 2 files changed, 2 deletions(-) diff --git a/addons/common/functions/fnc_assignObjectsInList.sqf b/addons/common/functions/fnc_assignObjectsInList.sqf index 89c8a3352d..eddd792500 100644 --- a/addons/common/functions/fnc_assignObjectsInList.sqf +++ b/addons/common/functions/fnc_assignObjectsInList.sqf @@ -17,7 +17,6 @@ * * Public: No */ -#define DEBUG_MODE_FULL #include "script_component.hpp" params ["_list", "_variable", "_setting", "_global"]; diff --git a/addons/common/functions/fnc_parseList.sqf b/addons/common/functions/fnc_parseList.sqf index 20630e1109..8cce3c1837 100644 --- a/addons/common/functions/fnc_parseList.sqf +++ b/addons/common/functions/fnc_parseList.sqf @@ -15,7 +15,6 @@ * * Public: No */ -#define DEBUG_MODE_FULL #include "script_component.hpp" private ["_splittedList", "_whitespaceList", "_nilCheckedList"]; From 3cbe6a3ebcc7792aac5cee970451fd32df22f679 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 24 Aug 2015 22:03:47 +0200 Subject: [PATCH 021/180] Fixed multiple group settings not applying properly. Added client configuration options for default colors. --- addons/map_gestures/ACE_Settings.hpp | 56 +++++++++++++------ addons/map_gestures/XEH_serverPostInit.sqf | 2 +- .../functions/fnc_drawMapGestures.sqf | 2 +- .../functions/fnc_moduleGroupSettings.sqf | 6 +- .../functions/fnc_moduleSettings.sqf | 4 +- .../functions/fnc_receiverInit.sqf | 3 +- .../map_gestures/functions/fnc_transmit.sqf | 2 +- .../functions/fnc_transmitterInit.sqf | 15 ++++- addons/map_gestures/script_component.hpp | 2 +- addons/map_gestures/stringtable.xml | 9 +++ 10 files changed, 72 insertions(+), 29 deletions(-) diff --git a/addons/map_gestures/ACE_Settings.hpp b/addons/map_gestures/ACE_Settings.hpp index c7b9a8b2ed..67f258c4cc 100644 --- a/addons/map_gestures/ACE_Settings.hpp +++ b/addons/map_gestures/ACE_Settings.hpp @@ -1,50 +1,74 @@ class ACE_Settings { class GVAR(enabled) { - value = 1; - typeName = "BOOL"; displayName = CSTRING(enabled_displayName); description = CSTRING(enabled_description); + category = CSTRING(mapGestures_category); + isClientSettable = 0; + typeName = "BOOL"; + value = 1; }; class GVAR(maxRange) { - value = 7; - typeName = "SCALAR"; displayName = CSTRING(maxRange_displayName); description = CSTRING(maxRange_description); + category = CSTRING(mapGestures_category); + isClientSettable = 0; + typeName = "SCALAR"; + value = 7; }; class GVAR(interval) { - value = 0.03; - typeName = "SCALAR"; displayName = CSTRING(interval_displayName); description = CSTRING(interval_description); + category = CSTRING(mapGestures_category); + isClientSettable = 0; + typeName = "SCALAR"; + value = 0.03; + }; + class GVAR(nameTextColor) { + displayName = CSTRING(nameTextColor_displayName); + description = CSTRING(nameTextColor_description); + category = CSTRING(mapGestures_category); + isClientSettable = 1; + typeName = "COLOR"; + value[] = {0.2, 0.2, 0.2, 0.3}; }; class GVAR(defaultLeadColor) { - value[] = {1, 0.88, 0, 0.95}; - typeName = "COLOR"; displayName = CSTRING(defaultLeadColor_displayName); description = CSTRING(defaultLeadColor_description); + category = CSTRING(mapGestures_category); + isClientSettable = 1; + typeName = "COLOR"; + value[] = {1, 0.88, 0, 0.95}; }; class GVAR(defaultColor) { - value[] = {1, 0.88, 0, 0.7}; - typeName = "COLOR"; displayName = CSTRING(defaultColor_displayName); description = CSTRING(defaultColor_description); + category = CSTRING(mapGestures_category); + isClientSettable = 1; + typeName = "COLOR"; + value[] = {1, 0.88, 0, 0.7}; }; class GVAR(GroupColorConfigurations) { - value[] = {}; - typeName = "ARRAY"; displayName = CSTRING(GroupColorConfigurations_displayName); description = CSTRING(GroupColorConfigurations_description); + category = CSTRING(mapGestures_category); + isClientSettable = 0; + typeName = "ARRAY"; + value[] = {}; }; class GVAR(GroupColorConfigurationsGroups) { - value[] = {}; - typeName = "ARRAY"; displayName = CSTRING(GroupColorConfigurationsGroups_displayName); description = CSTRING(GroupColorConfigurationsGroups_description); + category = CSTRING(mapGestures_category); + isClientSettable = 0; + typeName = "ARRAY"; + value[] = {}; }; class GVAR(GroupColorConfigurationsGroupIndex) { - value[] = {}; - typeName = "ARRAY"; displayName = CSTRING(GroupColorConfigurationsGroupIndex_displayName); description = CSTRING(GroupColorConfigurationsGroupIndex_description); + category = CSTRING(mapGestures_category); + isClientSettable = 0; + typeName = "ARRAY"; + value[] = {}; }; }; diff --git a/addons/map_gestures/XEH_serverPostInit.sqf b/addons/map_gestures/XEH_serverPostInit.sqf index 9bbf84911e..bde1cdc55b 100644 --- a/addons/map_gestures/XEH_serverPostInit.sqf +++ b/addons/map_gestures/XEH_serverPostInit.sqf @@ -1,3 +1,3 @@ #include "script_component.hpp" -[MAP_GESTURES_NO_OWNER_ID_EVENT, FUNC(assignClientIDOnServer)] call EFUNC(common,addEventHandler) +[EVENT_PLAYER_HAS_NO_OWNER_ID, FUNC(assignClientIDOnServer)] call EFUNC(common,addEventHandler); diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 31c41ca995..2dcf425faf 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -53,7 +53,7 @@ params ["_mapHandle"]; // Render icon and player name _mapHandle drawIcon ["\a3\ui_f\data\gui\cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, ICON_RENDER_SIZE, ICON_RENDER_SIZE, ICON_ANGLE, "", ICON_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; - _mapHandle drawIcon ["#(argb,8,8,3)color(0,0,0,0)", [.2,.2,.2,.3], _pos, TEXT_ICON_RENDER_SIZE, TEXT_ICON_RENDER_SIZE, ICON_ANGLE, name _x, TEXT_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; + _mapHandle drawIcon ["#(argb,8,8,3)color(0,0,0,0)", GVAR(nameTextColor), _pos, TEXT_ICON_RENDER_SIZE, TEXT_ICON_RENDER_SIZE, ICON_ANGLE, name _x, TEXT_SHADOW, TEXT_SIZE, TEXT_FONT, ICON_TEXT_ALIGN]; }; }; nil diff --git a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf index 013f076347..8c819bb4d3 100644 --- a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf @@ -48,6 +48,6 @@ _completedGroups = []; nil } count _units; -[QGVAR(GroupColorConfigurations), _configurations, true, true] call EFUNC(common,setSetting); -[QGVAR(GroupColorConfigurationsGroups), _configurationGroups, true, true] call EFUNC(common,setSetting); -[QGVAR(GroupColorConfigurationsGroupIndex), _configurationGroupsIndex, true, true] call EFUNC(common,setSetting); +[QGVAR(GroupColorConfigurations), _configurations, false, true] call EFUNC(common,setSetting); +[QGVAR(GroupColorConfigurationsGroups), _configurationGroups, false, true] call EFUNC(common,setSetting); +[QGVAR(GroupColorConfigurationsGroupIndex), _configurationGroupsIndex, false, true] call EFUNC(common,setSetting); diff --git a/addons/map_gestures/functions/fnc_moduleSettings.sqf b/addons/map_gestures/functions/fnc_moduleSettings.sqf index 6b21db8588..e3e0bf714b 100644 --- a/addons/map_gestures/functions/fnc_moduleSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleSettings.sqf @@ -32,5 +32,5 @@ if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaul _defaultColor = call compile ("[" + (_logic getVariable ["defaultColor", ""]) + "]"); if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")}; -[QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting); -[QGVAR(defaultColor), _defaultColor, true, true] call EFUNC(common,setSetting); +[QGVAR(defaultLeadColor), _defaultLeadColor, false, true] call EFUNC(common,setSetting); +[QGVAR(defaultColor), _defaultColor, false, true] call EFUNC(common,setSetting); diff --git a/addons/map_gestures/functions/fnc_receiverInit.sqf b/addons/map_gestures/functions/fnc_receiverInit.sqf index a14efbffc1..b132dad1d7 100644 --- a/addons/map_gestures/functions/fnc_receiverInit.sqf +++ b/addons/map_gestures/functions/fnc_receiverInit.sqf @@ -19,6 +19,7 @@ ACE_player setVariable [QGVAR(Transmit), false, true]; GVAR(EnableTransmit) = false; if (!isNil QGVAR(DrawMapHandlerID)) then { - (findDisplay 12 displayCtrl 51) ctrlRemoveEventHandler ["Draw", GVAR(DrawMapHandlerID)]; GVAR(DrawMapHandlerID) = nil; + (findDisplay 12 displayCtrl 51) ctrlRemoveEventHandler ["Draw", GVAR(DrawMapHandlerID)]; + GVAR(DrawMapHandlerID) = nil; }; GVAR(DrawMapHandlerID) = findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", FUNC(drawMapGestures)]; diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf index ccd702fd55..444ebbc604 100644 --- a/addons/map_gestures/functions/fnc_transmit.sqf +++ b/addons/map_gestures/functions/fnc_transmit.sqf @@ -31,7 +31,7 @@ if (!GVAR(EnableTransmit) || !visibleMap) exitWith { { _ownerID = _x getVariable QGVAR(owner_id); if (isNil "_ownerID") then { - [MAP_GESTURES_NO_OWNER_ID_EVENT, [name _x]] call EFUNC(common,serverEvent); + [EVENT_PLAYER_HAS_NO_OWNER_ID, [name _x]] call EFUNC(common,serverEvent); } else { _playerOwnerID = ACE_player getVariable QGVAR(owner_id); if (!isNil "_playerOwnerID" && _ownerID != _playerOwnerID) then { diff --git a/addons/map_gestures/functions/fnc_transmitterInit.sqf b/addons/map_gestures/functions/fnc_transmitterInit.sqf index 251e6d2619..897855dc00 100644 --- a/addons/map_gestures/functions/fnc_transmitterInit.sqf +++ b/addons/map_gestures/functions/fnc_transmitterInit.sqf @@ -22,7 +22,10 @@ disableSerialization; _mapCtrl = findDisplay 12 displayCtrl 51; // MouseMoving EH. -if (!isNil QGVAR(MouseMoveHandlerID)) then {_mapCtrl ctrlRemoveEventHandler ["MouseMoving", GVAR(MouseMoveHandlerID)]; GVAR(MouseMoveHandlerID) = nil;}; +if (!isNil QGVAR(MouseMoveHandlerID)) then { + _mapCtrl ctrlRemoveEventHandler ["MouseMoving", GVAR(MouseMoveHandlerID)]; + GVAR(MouseMoveHandlerID) = nil; +}; GVAR(MouseMoveHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseMoving", { // Don't transmit any data if we're using the map tools if (!GVAR(EnableTransmit) || EGVAR(maptools,drawing_isDrawing) || EGVAR(maptools,mapTool_isDragging) || EGVAR(maptools,mapTool_isRotating)) exitWith {}; @@ -41,7 +44,10 @@ GVAR(MouseMoveHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseMoving", { }]; // MouseDown EH -if (!isNil QGVAR(MouseDownHandlerID)) then {_mapCtrl ctrlRemoveEventHandler ["MouseButtonDown",GVAR(MouseDownHandlerID)]; GVAR(MouseDownHandlerID) = nil;}; +if (!isNil QGVAR(MouseDownHandlerID)) then { + _mapCtrl ctrlRemoveEventHandler ["MouseButtonDown",GVAR(MouseDownHandlerID)]; + GVAR(MouseDownHandlerID) = nil; +}; GVAR(MouseDownHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseButtonDown", { if (!GVAR(enabled)) exitWith {}; @@ -51,7 +57,10 @@ GVAR(MouseDownHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseButtonDown", { }]; // MouseUp EH -if (!isNil QGVAR(MouseUpHandlerID)) then {_mapCtrl ctrlRemoveEventHandler ["MouseButtonUp", GVAR(MouseUpHandlerID)]; GVAR(MouseUpHandlerID) = nil;}; +if (!isNil QGVAR(MouseUpHandlerID)) then { + _mapCtrl ctrlRemoveEventHandler ["MouseButtonUp", GVAR(MouseUpHandlerID)]; + GVAR(MouseUpHandlerID) = nil; +}; GVAR(MouseUpHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseButtonUp", { if (!GVAR(enabled)) exitWith {}; diff --git a/addons/map_gestures/script_component.hpp b/addons/map_gestures/script_component.hpp index 50f155ccc1..1a5ecada12 100644 --- a/addons/map_gestures/script_component.hpp +++ b/addons/map_gestures/script_component.hpp @@ -11,4 +11,4 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define MAP_GESTURES_NO_OWNER_ID_EVENT "PlayerNameHasNoOwnerID" +#define EVENT_PLAYER_HAS_NO_OWNER_ID "PlayerNameHasNoOwnerID" diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index 324e9f92e7..78e4378b73 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -91,5 +91,14 @@ Enables the Map Gestures. + + Name Text Color + + + Color of the name tag text besides the map gestures mark. + + + Map Gestures + From 2b0ef7bc6d9831d3dbe626658ad39a9f5e72abda Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 24 Aug 2015 22:10:02 +0200 Subject: [PATCH 022/180] Removed explicitly stated `isClientSettable` in Map Gestures ace settings --- addons/map_gestures/ACE_Settings.hpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/addons/map_gestures/ACE_Settings.hpp b/addons/map_gestures/ACE_Settings.hpp index 67f258c4cc..1b223d0d67 100644 --- a/addons/map_gestures/ACE_Settings.hpp +++ b/addons/map_gestures/ACE_Settings.hpp @@ -3,7 +3,6 @@ class ACE_Settings { displayName = CSTRING(enabled_displayName); description = CSTRING(enabled_description); category = CSTRING(mapGestures_category); - isClientSettable = 0; typeName = "BOOL"; value = 1; }; @@ -11,7 +10,6 @@ class ACE_Settings { displayName = CSTRING(maxRange_displayName); description = CSTRING(maxRange_description); category = CSTRING(mapGestures_category); - isClientSettable = 0; typeName = "SCALAR"; value = 7; }; @@ -19,7 +17,6 @@ class ACE_Settings { displayName = CSTRING(interval_displayName); description = CSTRING(interval_description); category = CSTRING(mapGestures_category); - isClientSettable = 0; typeName = "SCALAR"; value = 0.03; }; @@ -51,7 +48,6 @@ class ACE_Settings { displayName = CSTRING(GroupColorConfigurations_displayName); description = CSTRING(GroupColorConfigurations_description); category = CSTRING(mapGestures_category); - isClientSettable = 0; typeName = "ARRAY"; value[] = {}; }; @@ -59,7 +55,6 @@ class ACE_Settings { displayName = CSTRING(GroupColorConfigurationsGroups_displayName); description = CSTRING(GroupColorConfigurationsGroups_description); category = CSTRING(mapGestures_category); - isClientSettable = 0; typeName = "ARRAY"; value[] = {}; }; @@ -67,7 +62,6 @@ class ACE_Settings { displayName = CSTRING(GroupColorConfigurationsGroupIndex_displayName); description = CSTRING(GroupColorConfigurationsGroupIndex_description); category = CSTRING(mapGestures_category); - isClientSettable = 0; typeName = "ARRAY"; value[] = {}; }; From 93acdbcb4d8802d52730bb43b7f149d88443d100 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 24 Aug 2015 22:45:59 +0200 Subject: [PATCH 023/180] Replaced custom mapping implementation with ACE Hash --- addons/map_gestures/ACE_Settings.hpp | 15 ++++----------- .../functions/fnc_drawMapGestures.sqf | 5 ++--- .../functions/fnc_moduleGroupSettings.sqf | 16 +++------------- addons/map_gestures/stringtable.xml | 14 ++++---------- 4 files changed, 13 insertions(+), 37 deletions(-) diff --git a/addons/map_gestures/ACE_Settings.hpp b/addons/map_gestures/ACE_Settings.hpp index 1b223d0d67..0038027e3b 100644 --- a/addons/map_gestures/ACE_Settings.hpp +++ b/addons/map_gestures/ACE_Settings.hpp @@ -51,18 +51,11 @@ class ACE_Settings { typeName = "ARRAY"; value[] = {}; }; - class GVAR(GroupColorConfigurationsGroups) { - displayName = CSTRING(GroupColorConfigurationsGroups_displayName); - description = CSTRING(GroupColorConfigurationsGroups_description); + class GVAR(GroupColorConfigurationMapping) { + displayName = CSTRING(GroupColorConfigurationMapping_displayName); + description = CSTRING(GroupColorConfigurationMapping_description); category = CSTRING(mapGestures_category); typeName = "ARRAY"; - value[] = {}; - }; - class GVAR(GroupColorConfigurationsGroupIndex) { - displayName = CSTRING(GroupColorConfigurationsGroupIndex_displayName); - description = CSTRING(GroupColorConfigurationsGroupIndex_description); - category = CSTRING(mapGestures_category); - typeName = "ARRAY"; - value[] = {}; + value[] = {{}, {}}; }; }; diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 2dcf425faf..4ba70f1b30 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -44,9 +44,8 @@ params ["_mapHandle"]; _grpName = groupID _group; // If color settings for the group exist, then use those, otherwise fall back to the default colors - _color = if (_grpName in GVAR(GroupColorConfigurationsGroups)) then { - _grpNameIndex = GVAR(GroupColorConfigurationsGroups) find _grpName; - (GVAR(GroupColorConfigurations) select (GVAR(GroupColorConfigurationsGroupIndex) select _grpNameIndex)) select (_x != leader _group) + _color = if (HASH_HASKEY(GVAR(GroupColorConfigurationMapping),_grpName)) then { + (GVAR(GroupColorConfigurations) select (HASH_GET(GVAR(GroupColorConfigurationMapping),_grpName))) select (_x != leader _group) } else { if (_x == leader _group) then {GVAR(defaultLeadColor)} else {GVAR(defaultColor)}; }; diff --git a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf index 8c819bb4d3..ac01516618 100644 --- a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf @@ -29,25 +29,15 @@ if (!([_color] call FUNC(isValidColorArray))) exitWith {ERROR("color is not a va // If we already have color configurations from another source, use those, otherwise use default. _configurations = if (isNil QGVAR(GroupColorConfigurations)) then { [] } else { +GVAR(GroupColorConfigurations) }; -_configurationGroups = if (isNil QGVAR(GroupColorConfigurationsGroups)) then { [] } else { +GVAR(GroupColorConfigurationsGroups) }; -_configurationGroupsIndex = if (isNil QGVAR(GroupColorConfigurationsGroupIndex)) then { [] } else { +GVAR(GroupColorConfigurationsGroupIndex) }; +_configurationGroupMappings = if(isNil QGVAR(GroupColorConfigurationMapping)) then { HASH_CREATE } else { +GVAR(GroupColorConfigurationMapping) }; // Save custom color configuration and keep the index of the entry. _configurationIndex = _configurations pushBack [_leadColor, _color]; // Add all synchronized groups and reference custom configuration for them -_completedGroups = []; { - private "_group"; - _group = groupID (group _x); - if (!(_group in _completedGroups)) then { - _index = if (_group in _configurationGroups) then {_configurationGroups find _group} else {_configurationGroups pushBack _group}; - _configurationGroupsIndex set [_index, _configurationIndex]; - _completedGroups pushBack _group; - }; - nil + HASH_SET(_configurationGroupMappings,groupID (group _x),_configurationIndex); } count _units; [QGVAR(GroupColorConfigurations), _configurations, false, true] call EFUNC(common,setSetting); -[QGVAR(GroupColorConfigurationsGroups), _configurationGroups, false, true] call EFUNC(common,setSetting); -[QGVAR(GroupColorConfigurationsGroupIndex), _configurationGroupsIndex, false, true] call EFUNC(common,setSetting); +[QGVAR(GroupColorConfigurationMapping), _configurationGroupMappings, false, true] call EFUNC(common,setSetting); diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index 78e4378b73..e5eab426a3 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -76,17 +76,11 @@ Group color configuration containing arrays of color pairs ([leadColor, color]). - - Group color group name index, containing names of groups with configurations attached to them. + + Hash of Group ID mapped to the Group color configuration index. - - Group color group name index - - - Group color group name mapping index - - - Group color group name mapping index, mapping the GroupColorConfigurationsGroups to the GroupColorConfigurations. + + GroupID Color configuration mapping Enables the Map Gestures. From 431bd309a85c0d0c837d797ee9eb9211ed8e3295 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Mon, 24 Aug 2015 23:26:03 +0200 Subject: [PATCH 024/180] Fixed variable privatization --- addons/map_gestures/functions/fnc_drawMapGestures.sqf | 2 ++ addons/map_gestures/functions/fnc_getProximityPlayers.sqf | 2 ++ addons/map_gestures/functions/fnc_moduleGroupSettings.sqf | 2 ++ addons/map_gestures/functions/fnc_moduleSettings.sqf | 7 ++++--- addons/map_gestures/functions/fnc_transmit.sqf | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 4ba70f1b30..b369686501 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -26,6 +26,8 @@ if (!GVAR(enabled) || !visibleMap) exitWith {}; +private["_color", "_drawPosVariableName", "_group", "_grpName", "_pos", "_unitUID"]; + params ["_mapHandle"]; // Iterate over all nearby players and render their pointer if player is transmitting. diff --git a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf index 7a72c00520..dded0b1273 100644 --- a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf +++ b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf @@ -16,6 +16,8 @@ */ #include "script_component.hpp" +private "_proximityPlayers"; + params ["_unit", "_range"]; _proximityPlayers = (getPos _unit) nearEntities [["CAMAnBase"], _range]; diff --git a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf index ac01516618..9c21bf867d 100644 --- a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf @@ -17,6 +17,8 @@ */ #include "script_component.hpp" +private ["_color", "_configurationGroupMappings", "_configurationIndex", "_configurations", "_leadColor"]; + params ["_logic", "_units", "_activated"]; if (!_activated || !isServer) exitWith {}; diff --git a/addons/map_gestures/functions/fnc_moduleSettings.sqf b/addons/map_gestures/functions/fnc_moduleSettings.sqf index e3e0bf714b..99583074fc 100644 --- a/addons/map_gestures/functions/fnc_moduleSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleSettings.sqf @@ -17,10 +17,11 @@ */ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +private ["_defaultColor", "_defaultLeadColor"]; -if (!_activated) exitWith {}; -if (!isServer) exitWith {}; +params ["_logic", "", "_activated"]; + +if (!_activated || !isServer) exitWith {}; [_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule); diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf index 444ebbc604..c9dc487db2 100644 --- a/addons/map_gestures/functions/fnc_transmit.sqf +++ b/addons/map_gestures/functions/fnc_transmit.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -private ["_proximityPlayers", "_ownerID", "_unitUID", "_drawPosVariableName"]; +private ["_ownerID", "_unitUID", "_drawPosVariableName", "_playerOwnerID"]; params ["", "_pfhId"]; From a83a5a17a3862f65966ef7dc633fb01d070cd799 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Fri, 28 Aug 2015 13:15:21 +0200 Subject: [PATCH 025/180] Fix Issues --- addons/kestrel4500/XEH_preInit.sqf | 2 +- addons/kestrel4500/functions/fnc_dayOfWeek.sqf | 1 + addons/kestrel4500/functions/fnc_displayKestrel.sqf | 2 +- addons/kestrel4500/functions/fnc_updateMemory.sqf | 1 + addons/kestrel4500/script_component.hpp | 2 ++ 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/kestrel4500/XEH_preInit.sqf b/addons/kestrel4500/XEH_preInit.sqf index b89f07173f..b3f8ba755f 100644 --- a/addons/kestrel4500/XEH_preInit.sqf +++ b/addons/kestrel4500/XEH_preInit.sqf @@ -16,5 +16,5 @@ PREP(storeUserData); PREP(updateDisplay); PREP(updateImpellerState); PREP(updateMemory); -PREP(dayOfWeek) +PREP(dayOfWeek); ADDON = true; diff --git a/addons/kestrel4500/functions/fnc_dayOfWeek.sqf b/addons/kestrel4500/functions/fnc_dayOfWeek.sqf index 9e142f661c..f63a3969b0 100644 --- a/addons/kestrel4500/functions/fnc_dayOfWeek.sqf +++ b/addons/kestrel4500/functions/fnc_dayOfWeek.sqf @@ -15,6 +15,7 @@ * * Public: No */ +#include "script_component.hpp" private "_table"; params ["_year", "_month", "_day"]; diff --git a/addons/kestrel4500/functions/fnc_displayKestrel.sqf b/addons/kestrel4500/functions/fnc_displayKestrel.sqf index 770347ec71..64d06fea1c 100644 --- a/addons/kestrel4500/functions/fnc_displayKestrel.sqf +++ b/addons/kestrel4500/functions/fnc_displayKestrel.sqf @@ -102,7 +102,7 @@ GVAR(Overlay) = true; __ctrlInfoLine1 ctrlSetText _ctrlInfoLine1; __ctrlInfoLine2 ctrlSetText _ctrlInfoLine2; - __ctrlBottomBig ctrlSetText _ctrlBottomBig ; + __ctrlBottomBig ctrlSetText _ctrlBottomBig; __ctrlCenterLine1 ctrlSetText _ctrlCenterLine1; __ctrlCenterLine2 ctrlSetText _ctrlCenterLine2; diff --git a/addons/kestrel4500/functions/fnc_updateMemory.sqf b/addons/kestrel4500/functions/fnc_updateMemory.sqf index f38e9ee6df..c393aee14f 100644 --- a/addons/kestrel4500/functions/fnc_updateMemory.sqf +++ b/addons/kestrel4500/functions/fnc_updateMemory.sqf @@ -14,6 +14,7 @@ * * Public: No */ +#include "script_component.hpp" params ["_slot", "_value"]; GVAR(MIN) set [_slot, (GVAR(MIN) select _slot) min _value]; GVAR(MAX) set [_slot, _value max (GVAR(MAX) select _slot)]; diff --git a/addons/kestrel4500/script_component.hpp b/addons/kestrel4500/script_component.hpp index 90c338ebeb..e1a58dc1df 100644 --- a/addons/kestrel4500/script_component.hpp +++ b/addons/kestrel4500/script_component.hpp @@ -1,6 +1,8 @@ #define COMPONENT kestrel4500 #include "\z\ace\addons\main\script_mod.hpp" +#define DEBUG_ENABLED_KESTREL4500 + #ifdef DEBUG_ENABLED_KESTREL4500 #define DEBUG_MODE_FULL #endif From 1f602ea9a3c8a0e664b6cd4a56111d145c0a1b51 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Fri, 28 Aug 2015 13:17:29 +0200 Subject: [PATCH 026/180] disable Debug --- addons/kestrel4500/script_component.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/kestrel4500/script_component.hpp b/addons/kestrel4500/script_component.hpp index e1a58dc1df..90c338ebeb 100644 --- a/addons/kestrel4500/script_component.hpp +++ b/addons/kestrel4500/script_component.hpp @@ -1,8 +1,6 @@ #define COMPONENT kestrel4500 #include "\z\ace\addons\main\script_mod.hpp" -#define DEBUG_ENABLED_KESTREL4500 - #ifdef DEBUG_ENABLED_KESTREL4500 #define DEBUG_MODE_FULL #endif From f22072a94da4270519be4bff55c13a655cd29f4f Mon Sep 17 00:00:00 2001 From: jonpas Date: Sat, 5 Sep 2015 19:57:35 +0200 Subject: [PATCH 027/180] Use pushBack instead of array compiling --- addons/common/functions/fnc_parseList.sqf | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/addons/common/functions/fnc_parseList.sqf b/addons/common/functions/fnc_parseList.sqf index 8cce3c1837..22595201fc 100644 --- a/addons/common/functions/fnc_parseList.sqf +++ b/addons/common/functions/fnc_parseList.sqf @@ -39,20 +39,15 @@ _list = _whitespaceList; // Check for object existence -_nilCheckedList = ""; +_nilCheckedList = []; if (_checkNil) then { { if !(isNil _x) then { - if (_nilCheckedList == "") then { - _nilCheckedList = _x; - } else { - _nilCheckedList = _nilCheckedList + "," + _x; - }; + _nilCheckedList pushBack _x; }; } count _list; - // Add Array characters and parse into array - _list = [] call compile format ["[%1]", _nilCheckedList]; + _list = _nilCheckedList; }; TRACE_4("Lists",_splittedList,_whitespaceList,_nilCheckedList,_list); From a2dd77ca702bce3542ffd2985b3e2d4defeb48c6 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sat, 5 Sep 2015 20:15:31 +0200 Subject: [PATCH 028/180] Use splitString instead of BIS_fnc_splitString --- addons/common/functions/fnc_parseList.sqf | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/addons/common/functions/fnc_parseList.sqf b/addons/common/functions/fnc_parseList.sqf index 22595201fc..dcdf255081 100644 --- a/addons/common/functions/fnc_parseList.sqf +++ b/addons/common/functions/fnc_parseList.sqf @@ -1,5 +1,5 @@ /* - * Author: Jonpas + * Author: Glowbal, Jonpas * Makes a list from a string using comma as a delimiter, optionally trim or remove whitespace and check each for object existence. * * Arguments: @@ -17,12 +17,13 @@ */ #include "script_component.hpp" -private ["_splittedList", "_whitespaceList", "_nilCheckedList"]; params ["_list", ["_removeWhitespace", false], ["_checkNil", false]]; +private ["_whitespaceList", "_nilCheckedList"]; // Split using comma delimiter -_splittedList = [_list, ","] call BIS_fnc_splitString; +_list = _list splitString ","; +TRACE_1("Splitted List",_list); // Remove or Trim Whitespace @@ -34,22 +35,25 @@ _whitespaceList = []; _whitespaceList pushBack ([_x] call CBA_fnc_trim); }; nil -} count _splittedList; +} count _list; + _list = _whitespaceList; +TRACE_1("Whitespace List",_list); // Check for object existence -_nilCheckedList = []; if (_checkNil) then { + _nilCheckedList = []; { if !(isNil _x) then { _nilCheckedList pushBack _x; }; + nil } count _list; _list = _nilCheckedList; }; -TRACE_4("Lists",_splittedList,_whitespaceList,_nilCheckedList,_list); +TRACE_1("Final List",_list); _list From 06baa5e4d362dc223cc18f30816b620ec7031a60 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sat, 5 Sep 2015 20:51:48 +0200 Subject: [PATCH 029/180] Fixed nilCheck, changed moduleAddSpareParts to use new parseList --- addons/common/functions/fnc_parseList.sqf | 2 +- .../functions/fnc_moduleAddSpareParts.sqf | 34 +++++-------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/addons/common/functions/fnc_parseList.sqf b/addons/common/functions/fnc_parseList.sqf index dcdf255081..ef7eaae92a 100644 --- a/addons/common/functions/fnc_parseList.sqf +++ b/addons/common/functions/fnc_parseList.sqf @@ -46,7 +46,7 @@ if (_checkNil) then { _nilCheckedList = []; { if !(isNil _x) then { - _nilCheckedList pushBack _x; + _nilCheckedList pushBack (missionNamespace getVariable _x); }; nil } count _list; diff --git a/addons/repair/functions/fnc_moduleAddSpareParts.sqf b/addons/repair/functions/fnc_moduleAddSpareParts.sqf index 46689951a7..cceb62e10c 100644 --- a/addons/repair/functions/fnc_moduleAddSpareParts.sqf +++ b/addons/repair/functions/fnc_moduleAddSpareParts.sqf @@ -11,51 +11,35 @@ * None * * Example: - * function = "ace_repair_fnc_moduleAssignRepairVehicle" + * function = "ace_repair_fnc_moduleAddSpareParts" * * Public: No */ -#define DEBUG_MODE_FULL #include "script_component.hpp" params ["_logic"]; if (!isNull _logic) then { - private ["_list", "_part", "_amount", "_nilCheckPassedList"]; - // Module settings + private ["_list", "_part", "_amount"]; _list = _logic getVariable ["List", ""]; _part = _logic getVariable ["Part", 0]; _amount = _logic getVariable ["Amount", 1]; // Parse list - _nilCheckPassedList = ""; - { - _x = [_x] call EFUNC(common,stringRemoveWhiteSpace); - if !(isnil _x) then { - if (_nilCheckPassedList == "") then { - _nilCheckPassedList = _x; - } else { - _nilCheckPassedList = _nilCheckPassedList + "," + _x; - }; - }; - } forEach ([_list, ","] call BIS_fnc_splitString); - _list = "[" + _nilCheckPassedList + "]"; - _list = [] call compile _list; + _list = [_list, true, true] call EFUNC(common,parseList); // Add synchronized objects to list { _list pushBack _x; - } forEach (synchronizedObjects _logic); + nil + } count (synchronizedObjects _logic); if (_list isEqualTo []) exitWith {}; - TRACE_3("module info parsed",_list,_part,_amount); + TRACE_3("Module info parsed",_list,_part,_amount); + // Add spare parts { - if (!isNil "_x" && {typeName _x == typeName objNull}) then { - [_x, _amount, _part, true] call FUNC(addSpareParts); - }; - } forEach _list; + [_x, _amount, _part, true] call FUNC(addSpareParts); + } count _list; }; - -true From 11738a964d79327b0704ebb34b13f5fe50cb3245 Mon Sep 17 00:00:00 2001 From: alganthe Date: Sat, 12 Sep 2015 02:55:48 +0200 Subject: [PATCH 030/180] contributing.md added --- CONTRIBUTING.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..fc0c12974b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,68 @@ +# Reporting an issue + +## Before reporting + +If you have found an issue with ACE3 please make sure that ACE3 is really the cause of the problem. To do this try to reproduce the issue with using only `@CBA_A3` and `@ace` on a newly created mission. + +Indicate if the issue appears on stable or development version. In case it is the development version, please also include the commit SHA-1 hash. + +
+
Please note:
+

It's not a valid to simply remove @ace from the mod list to confirm that ACE3 is the culprit.

+

If the error happens when using a third-party mod contact the author of the appropriate mod and report the issue there.

+
+ +## Reporting the issue + +Head over to the ACE3 GitHub issue tracker and press the "New issue" button in the top right corner. Add a descriptive title and copy the following issue template in to the text area: + +``` +ACE3 Version: 3.x.x +(indicate if stable or dev, if dev indicate the commit the version is based on) + +**Mods:** +* `@CBA_A3` +* `@ace` + +**Placed ACE3 Modules:** +* *Add the list of modules you have placed on the map. Use 'None' if the error occurs without using any modules.* + +**Description:** +* Add a detailed description of the error. This makes it easier for us to fix the issue.* + +**Steps to reproduce:** +* *Add the steps needed to reproduce the issue.* + +**Where did the issue occur?** +* A possible answer might be "Multiplayer", "Editor" or "Singleplayer"* + +**RPT log file:** +* Add a link (pastebin.com) to the client or server RPT file.* +``` + +A video of the issue might be helpful in resolving it faster. + + +Github uses "Markdown" to style the output. If you want to know more about it (e.g. how to turn text bold, how to denote code blocks or inline code) have a look at the GitHub markdown documentation. + +# Feature Requests + +## Background +ACE2, AGM and CSE had a lot of features implemented or planned. All of them are or have been evaluated for inclusion in ACE3 itself, and we'd like to port the majority of them eventually. However, due to time constraints, we have managed to finish only a fraction of the job so far. + +Please refrain from making requests for any planned or existing features from either ACE2, AGM or CSE. Most of them are already being or have been considered for porting or a rewrite. + +
+
Note:
+

Due to our current work load, in the period of weeks prior and posterior to the first release, new feature requests are under embargo. Feel free to submit yours now, but don't expect them to be considered just yet. Any treatment or attention by developers towards the feature request thread is highly unlikely during this time.

+
+ +## Requesting a feature +In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for ACE 3 Feature requests. Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier. + +Following their approval, feature requests may be moved by moderators to a separate issue for further discussion. + +# Regarding Pull Requests (PRs) + +- [Make sure to respect the file structure](http://ace3mod.com/wiki/development/modularity-and-pbo-structure.html) +- [Make sure to respect the coding guidelines](http://ace3mod.com/wiki/development/coding-guidelines.html) From cc59ac625b7d50b4a74d661d510125cda0ebf6b6 Mon Sep 17 00:00:00 2001 From: alganthe Date: Sat, 12 Sep 2015 03:36:09 +0200 Subject: [PATCH 031/180] links updated for the guides and how to - Added the installation guide - Getting started (deprecated) replaced by the information center page --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c98983d880..73f7874a9c 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,8 @@ The mod is **built modularly**, so almost any included PBO can be easily removed ### Guides & how-tos If you installed ACE3 but have trouble understanding how it all works, or where to start, read this first: -- [Getting started](http://ace3mod.com/wiki/user/getting-started.html) +- [Installation guide](http://ace3mod.com/wiki/user/installation-guide.html) +- [Information center](http://ace3mod.com/wiki/user/information-center.html) #### Contributing You can help out with the ongoing development by looking for potential bugs in our code base, or by contributing new features. To contribute something to ACE3, simply fork this repository and submit your pull requests for review by other collaborators. Remember to add yourself to the author array of any PBO you will be editing and the [`AUTHORS.txt`](https://github.com/acemod/ACE3/blob/master/AUTHORS.txt) file; including a valid email address. From 165ed90db67f62402cb7438352dbaf85a550c5ba Mon Sep 17 00:00:00 2001 From: alganthe Date: Sat, 12 Sep 2015 14:36:26 +0200 Subject: [PATCH 032/180] CONTRIBUTING.md updated --- CONTRIBUTING.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc0c12974b..0cdd596649 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,17 +52,12 @@ ACE2, AGM and CSE had a lot of features implemented or planned. All of them are Please refrain from making requests for any planned or existing features from either ACE2, AGM or CSE. Most of them are already being or have been considered for porting or a rewrite. -
-
Note:
-

Due to our current work load, in the period of weeks prior and posterior to the first release, new feature requests are under embargo. Feel free to submit yours now, but don't expect them to be considered just yet. Any treatment or attention by developers towards the feature request thread is highly unlikely during this time.

-
- ## Requesting a feature In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for ACE 3 Feature requests. Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier. Following their approval, feature requests may be moved by moderators to a separate issue for further discussion. # Regarding Pull Requests (PRs) - +- You want to help but don't know where to start ? check the wiki entry for [setting up the development environment](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html) - [Make sure to respect the file structure](http://ace3mod.com/wiki/development/modularity-and-pbo-structure.html) - [Make sure to respect the coding guidelines](http://ace3mod.com/wiki/development/coding-guidelines.html) From c947cb09f1b4a79f3ea8d76a0cc531b4a1e18813 Mon Sep 17 00:00:00 2001 From: alganthe Date: Sat, 12 Sep 2015 16:06:28 +0200 Subject: [PATCH 033/180] Typo fixed in CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0cdd596649..ae1a5831fe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,6 +58,6 @@ In order to avoid duplicates and keep the issue tracker organized, we have creat Following their approval, feature requests may be moved by moderators to a separate issue for further discussion. # Regarding Pull Requests (PRs) -- You want to help but don't know where to start ? check the wiki entry for [setting up the development environment](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html) +- You want to help but don't know where to start ? Check the wiki entry for [setting up the development environment](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html) - [Make sure to respect the file structure](http://ace3mod.com/wiki/development/modularity-and-pbo-structure.html) - [Make sure to respect the coding guidelines](http://ace3mod.com/wiki/development/coding-guidelines.html) From 024f95968c1cc31abf9c0c083e63065dfa2f7de0 Mon Sep 17 00:00:00 2001 From: alganthe Date: Sat, 12 Sep 2015 19:13:56 +0200 Subject: [PATCH 034/180] line about debug to added --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae1a5831fe..6b7f1006fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,6 +26,7 @@ ACE3 Version: 3.x.x **Placed ACE3 Modules:** * *Add the list of modules you have placed on the map. Use 'None' if the error occurs without using any modules.* +* You can also press the `Debug to` button in the ACE3 option menu (escape -> ACE3 options -> Debug to) and add a link (pastebin.com) to the results. **Description:** * Add a detailed description of the error. This makes it easier for us to fix the issue.* From db41512dc02058d64f335df8b803cd76b8d86e8e Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 14 Sep 2015 22:11:12 -0500 Subject: [PATCH 035/180] #2349 - Don't disable locking for base RocketPods --- addons/laser_selfdesignate/CfgWeapons.hpp | 2 +- addons/missileguidance/CfgAmmo.hpp | 20 +++++++++++++------- addons/missileguidance/CfgWeapons.hpp | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/addons/laser_selfdesignate/CfgWeapons.hpp b/addons/laser_selfdesignate/CfgWeapons.hpp index a62974ce40..70e1afde88 100644 --- a/addons/laser_selfdesignate/CfgWeapons.hpp +++ b/addons/laser_selfdesignate/CfgWeapons.hpp @@ -2,7 +2,7 @@ class CfgWeapons { // Disable locking unless newb mode class LauncherCore; class RocketPods: LauncherCore { - canLock = 1; + // canLock = 1; }; class missiles_DAGR: RocketPods { diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp index 779d2a82eb..64146b8e7e 100644 --- a/addons/missileguidance/CfgAmmo.hpp +++ b/addons/missileguidance/CfgAmmo.hpp @@ -6,7 +6,7 @@ enum { class CfgAmmo { class MissileBase; - class M_PG_AT : MissileBase { + class M_PG_AT: MissileBase { model = "\A3\Weapons_F\Ammo\Rocket_01_fly_F"; proxyShape = "\A3\Weapons_F\Ammo\Rocket_01_F"; @@ -68,15 +68,18 @@ class CfgAmmo { }; }; - class ACE_Hydra70_DAGR : M_PG_AT { + class ACE_Hydra70_DAGR: M_PG_AT { displayName = CSTRING(Hydra70_DAGR); displayNameShort = CSTRING(Hydra70_DAGR_Short); description = CSTRING(Hydra70_DAGR_Desc); descriptionShort = CSTRING(Hydra70_DAGR_Desc); + + //Explicity add guidance config + class ADDON: ADDON {}; }; - class ACE_Hellfire_AGM114K : ACE_Hydra70_DAGR { + class ACE_Hellfire_AGM114K: ACE_Hydra70_DAGR { displayName = CSTRING(Hellfire_AGM114K); displayNameShort = CSTRING(Hellfire_AGM114K_Short); @@ -91,10 +94,13 @@ class CfgAmmo { indirectHit = 71; indirectHitRange = 4.5; effectsMissile = "missile2"; + + //Explicity add guidance config + class ADDON: ADDON {}; }; // Titan - class M_Titan_AT : MissileBase {}; + class M_Titan_AT: MissileBase {}; class ACE_Javelin_FGM148: M_Titan_AT { irLock = 0; @@ -145,8 +151,8 @@ class CfgAmmo { //Take config changes from (M_Titan_AT_static: M_Titan_AT) initTime = 0.25; //"How long (in seconds) the projectile waits before starting it's engine.", - but doesn't seem to do anything effectsMissileInit = "RocketBackEffectsStaticRPG"; - class ADDON: ADDON { - enabled = 1; - }; + + //Explicity add guidance config + class ADDON: ADDON {}; }; }; diff --git a/addons/missileguidance/CfgWeapons.hpp b/addons/missileguidance/CfgWeapons.hpp index ab36d4dd52..a922c6b82e 100644 --- a/addons/missileguidance/CfgWeapons.hpp +++ b/addons/missileguidance/CfgWeapons.hpp @@ -4,7 +4,7 @@ class CfgWeapons { class LauncherCore; class RocketPods: LauncherCore { - canLock = 1; + // canLock = 1; }; class missiles_DAGR : RocketPods { canLock = 1; From 22ac16ead51c390d064ce4f7310e96a024c0247a Mon Sep 17 00:00:00 2001 From: Alessandro Foresi Date: Sat, 19 Sep 2015 16:22:36 +0200 Subject: [PATCH 036/180] Changed: Seeker to aimPoint instead of ASL position --- addons/missileguidance/functions/fnc_seekerType_Optic.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf index 872f33a917..1cc71c1d94 100644 --- a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf @@ -17,7 +17,7 @@ TRACE_1("", _launchParams); // TODO:: Make sure the missile maintains LOS _foundTargetPos = [0,0,0]; if(!isNil "_target") then { - _foundTargetPos = getPosASL _target; + _foundTargetPos = aimPos _target ; //_foundTargetPos = (_target modelToWorldVisual (getCenterOfMass _target)); }; @@ -48,4 +48,4 @@ if(!_angleOkay || !_losOkay) then { }; -_foundTargetPos; \ No newline at end of file +_foundTargetPos; From 10296d2883236c0d64de6be31f21708a07950669 Mon Sep 17 00:00:00 2001 From: alganthe Date: Wed, 23 Sep 2015 15:50:50 +0200 Subject: [PATCH 037/180] PAK and Surgical Kit strings normalized inside modules. Signed-off-by: alganthe --- addons/medical/stringtable.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 17944e83c3..813cbbd4ea 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -3274,7 +3274,7 @@ Elsősegélycsomag helyek
- Where can the Personal Aid Kit be used? + Where can the PAK be used? Где может использоваться аптечка? Gdzie można korzystać z apteczek osobistych? ¿Dónde se puede utilizar el equipo de primeros auxilios? @@ -3295,7 +3295,7 @@ Условие использования аптечки - When can the Personal Aid Kit be used? + When can the PAK be used? Kde může být použita osobní lékárnička? ¿Cuando se puede utilizar el Equipo de primeros auxilios? Quand peut être utilisé le Kit de Premier Secours @@ -3349,7 +3349,7 @@ Járművek & létesítmény - Allow Surgical kit (Adv) + Allow Surgical Kit (Adv) Хирургический набор может использоваться (усл.) Ust. zestawu chirurg. Permitir equipo quirúrgico (Avanzado) @@ -3360,7 +3360,7 @@ Sebészkészlet (Fejlett) engedélyezése - Who can use the surgical kit? + Who can use the Surgical Kit? Кто может использовать хирургический набор? Kto może skorzystać z zestawu chirurgicznego w celu zszycia ran? ¿Quién puede utilizar el equipo quirúrgico? @@ -3371,7 +3371,7 @@ Ki használhatja a sebészkészletet? - Remove Surgical kit (Adv) + Remove Surgical Kit (Adv) Удалять хирургический набор (усл.) Usuń zest. chir. po użyciu Eliminar equipo quirúrgico (Avanzado) @@ -3393,7 +3393,7 @@ Eltávolítódjon a sebészkészlet használatkor? - Locations Surgical kit (Adv) + Locations Surgical Kit (Adv) Место использования хирургического набора (усл.) Ogr. zestawu chirurg. Ubicaciones del equipo quirúrgico (Avanzado) @@ -3404,7 +3404,7 @@ Sebészkészlet (Fejlett) helyei - Where can the Surgical kit be used? + Where can the Surgical Kit be used? Где может использоваться хирургический набор? Gdzie można korzystać z zestawu chirurgicznego? Dónde se puede utilizar el equipo quirúrgico @@ -3415,7 +3415,7 @@ Hol lehet a sebészkészletet használni? - Condition Surgical kit (Adv) + Condition Surgical Kit (Adv) Podmínka chirurgické soupravy (Pokr.) Condición de equipo quirúrgico (Av) Conditions d'utilisation du kit de chirurgie @@ -3425,7 +3425,7 @@ Условие использования хирургического набора (усл.) - When can the Surgical kit be used? + When can the Surgical Kit be used? Kde může být použita chirurgická souprava? ¿Cuando se puede utilizar el equipo quirúrgico? Quand peut être utilisé les kit de chirurgie From e3985dce3eb95ea7674b9a5e1fe18d2b939cae94 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sun, 27 Sep 2015 00:40:59 +0200 Subject: [PATCH 038/180] Cleanup sitRotation as it's no longer needed --- addons/sitting/CfgVehicles.hpp | 6 ------ addons/sitting/functions/fnc_sit.sqf | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp index a156d5e87e..7b0237d172 100644 --- a/addons/sitting/CfgVehicles.hpp +++ b/addons/sitting/CfgVehicles.hpp @@ -60,7 +60,6 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.1, -0.45}; - GVAR(sitRotation) = 10; }; // Camping Chair class Land_CampingChair_V2_F: ThingX { @@ -69,7 +68,6 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.1, -0.45}; - GVAR(sitRotation) = 45; }; class Furniture_base_F; @@ -80,7 +78,6 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 90; GVAR(sitPosition[]) = {0, 0, -0.5}; - GVAR(sitRotation) = 5; }; // Chair (Wooden) class Land_ChairWood_F: Furniture_base_F { @@ -89,7 +86,6 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.05, 0}; - GVAR(sitRotation) = 75; }; // Office Chair class Land_OfficeChair_01_F: Furniture_base_F { @@ -98,7 +94,6 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, 0, -0.6}; - GVAR(sitRotation) = 15; }; // Rattan Chair class Land_RattanChair_01_F: Furniture_base_F { @@ -107,6 +102,5 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point) - GVAR(sitRotation) = 2; }; }; diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf index 5e9c36947e..e77e2d2b13 100644 --- a/addons/sitting/functions/fnc_sit.sqf +++ b/addons/sitting/functions/fnc_sit.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -private ["_actionID", "_configFile", "_sitDirection", "_sitPosition", "_sitRotation", "_seatPosOrig"]; +private ["_actionID", "_configFile", "_sitDirection", "_sitPosition", "_seatPosOrig"]; params ["_seat", "_player"]; @@ -50,7 +50,6 @@ _player setVariable [QGVAR(StandUpActionID), _actionID]; _configFile = configFile >> "CfgVehicles" >> typeOf _seat; _sitDirection = (getDir _seat) + getNumber (_configFile >> QGVAR(sitDirection)); _sitPosition = getArray (_configFile >> QGVAR(sitPosition)); -_sitRotation = if (isNumber (_configFile >> QGVAR(sitRotation))) then {getNumber (_configFile >> QGVAR(sitRotation))} else {45}; // Apply default if config entry not present // Get random animation and perform it (before moving player to ensure correct placement) [_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation); // Correctly places when using non-transitional animations From a7a716ca8d730ad407625c3447b15a7d255c9766 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sun, 27 Sep 2015 01:20:40 +0200 Subject: [PATCH 039/180] Better sitting framework in terms of interactions --- addons/sitting/CfgEventHandlers.hpp | 8 ++++ addons/sitting/CfgVehicles.hpp | 24 ----------- addons/sitting/XEH_preInit.sqf | 3 ++ .../sitting/functions/fnc_addSitActions.sqf | 42 +++++++++++++++++++ addons/sitting/functions/fnc_canSit.sqf | 6 +-- addons/sitting/functions/fnc_sit.sqf | 2 +- 6 files changed, 56 insertions(+), 29 deletions(-) create mode 100644 addons/sitting/functions/fnc_addSitActions.sqf diff --git a/addons/sitting/CfgEventHandlers.hpp b/addons/sitting/CfgEventHandlers.hpp index 1e804e8cc9..bd13e623f0 100644 --- a/addons/sitting/CfgEventHandlers.hpp +++ b/addons/sitting/CfgEventHandlers.hpp @@ -17,3 +17,11 @@ class Extended_Killed_EventHandlers { }; }; }; + +class Extended_InitPost_EventHandlers { + class All { + class ADDON { + init = QUOTE(_this call DFUNC(addSitActions)) + }; + }; +}; diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp index 7b0237d172..0d41ba1ed6 100644 --- a/addons/sitting/CfgVehicles.hpp +++ b/addons/sitting/CfgVehicles.hpp @@ -34,29 +34,10 @@ class CfgVehicles { }; }; - #define MACRO_SEAT_ACTION \ - class ACE_Actions { \ - class ACE_MainActions { \ - displayName = ECSTRING(interaction,MainAction); \ - selection = ""; \ - distance = 1.5; \ - condition = "true"; \ - class GVAR(Sit) { \ - displayName = CSTRING(Sit); \ - condition = QUOTE(_this call FUNC(canSit)); \ - statement = QUOTE(_this call FUNC(sit)); \ - showDisabled = 0; \ - priority = 0; \ - icon = PATHTOF(UI\sit_ca.paa); \ - }; \ - }; \ - }; - class ThingX; // Folding Chair class Land_CampingChair_V1_F: ThingX { XEH_ENABLED; - MACRO_SEAT_ACTION GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.1, -0.45}; @@ -64,7 +45,6 @@ class CfgVehicles { // Camping Chair class Land_CampingChair_V2_F: ThingX { XEH_ENABLED; - MACRO_SEAT_ACTION GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.1, -0.45}; @@ -74,7 +54,6 @@ class CfgVehicles { // Chair (Plastic) class Land_ChairPlastic_F: Furniture_base_F { XEH_ENABLED; - MACRO_SEAT_ACTION GVAR(canSit) = 1; GVAR(sitDirection) = 90; GVAR(sitPosition[]) = {0, 0, -0.5}; @@ -82,7 +61,6 @@ class CfgVehicles { // Chair (Wooden) class Land_ChairWood_F: Furniture_base_F { XEH_ENABLED; - MACRO_SEAT_ACTION GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.05, 0}; @@ -90,7 +68,6 @@ class CfgVehicles { // Office Chair class Land_OfficeChair_01_F: Furniture_base_F { XEH_ENABLED; - MACRO_SEAT_ACTION GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, 0, -0.6}; @@ -98,7 +75,6 @@ class CfgVehicles { // Rattan Chair class Land_RattanChair_01_F: Furniture_base_F { XEH_ENABLED; - MACRO_SEAT_ACTION GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point) diff --git a/addons/sitting/XEH_preInit.sqf b/addons/sitting/XEH_preInit.sqf index 86912ada6b..15ffe281c8 100644 --- a/addons/sitting/XEH_preInit.sqf +++ b/addons/sitting/XEH_preInit.sqf @@ -2,6 +2,7 @@ ADDON = false; +PREP(addSitActions); PREP(canSit); PREP(canStand); PREP(getRandomAnimation); @@ -10,4 +11,6 @@ PREP(moduleInit); PREP(sit); PREP(stand); +GVAR(initializedClasses) = []; + ADDON = true; diff --git a/addons/sitting/functions/fnc_addSitActions.sqf b/addons/sitting/functions/fnc_addSitActions.sqf new file mode 100644 index 0000000000..18779d9229 --- /dev/null +++ b/addons/sitting/functions/fnc_addSitActions.sqf @@ -0,0 +1,42 @@ +/* + * Author: Jonpas + * Adds sit actions. + * + * Arguments: + * 0: Seat + * + * Return Value: + * None + * + * Example: + * [seat] call ace_sitting_fnc_addSitActions + * + * Public: No + */ +#include "script_component.hpp" + +params ["_seat"]; +private ["_type", "_sitAction"]; + +_type = typeOf _seat; + +// Exit if the object is not specified as a seat +if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canSit)) != 1) exitWith {}; + +// Exit if class already initialized +if (_type in GVAR(initializedClasses)) exitWith {}; + +GVAR(initializedClasses) pushBack _type; + +_sitAction = [ + QGVAR(Sit), + localize LSTRING(Sit), + QUOTE(PATHTOF(UI\sit_ca.paa)), + {_this call FUNC(sit)}, + {_this call FUNC(canSit)}, + {}, + [], + [0, 0, 0], + 1.5 +] call EFUNC(interact_menu,createAction); +[_type, 0, ["ACE_MainActions"], _sitAction] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/sitting/functions/fnc_canSit.sqf b/addons/sitting/functions/fnc_canSit.sqf index fef36b4bbd..1dd0c9676f 100644 --- a/addons/sitting/functions/fnc_canSit.sqf +++ b/addons/sitting/functions/fnc_canSit.sqf @@ -4,22 +4,20 @@ * * Arguments: * 0: Seat - * 1: Player * * Return Value: * Can Sit Down * * Example: - * [seat, player] call ace_sitting_fnc_canSit + * [seat] call ace_sitting_fnc_canSit * * Public: No */ #include "script_component.hpp" -params ["_seat", "_player"]; +params ["_seat"]; // Sitting enabled, is seat object, not occupied and standing up (or not on a big slope) GVAR(enable) && -{getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(canSit)) == 1} && {isNil {_seat getVariable QGVAR(seatOccupied)}} && {round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}} diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf index e77e2d2b13..61872dd1a0 100644 --- a/addons/sitting/functions/fnc_sit.sqf +++ b/addons/sitting/functions/fnc_sit.sqf @@ -21,7 +21,7 @@ private ["_actionID", "_configFile", "_sitDirection", "_sitPosition", "_seatPosO params ["_seat", "_player"]; // Set global variable for standing up -GVAR(seat) = _seat; +GVAR(seat) = _seat; //@todo - put into player isSitting variable // Overwrite weird position, because Arma decides to set it differently based on current animation/stance... _player switchMove "amovpknlmstpsraswrfldnon"; From dbd0beb5140355133ee234bd1cd658a5a2cd32d7 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sun, 27 Sep 2015 01:31:23 +0200 Subject: [PATCH 040/180] Stored a global variable in player setVariable --- addons/sitting/CfgEventHandlers.hpp | 1 + addons/sitting/XEH_clientInit.sqf | 2 +- addons/sitting/functions/fnc_canStand.sqf | 2 +- addons/sitting/functions/fnc_handleInterrupt.sqf | 2 +- addons/sitting/functions/fnc_sit.sqf | 9 +++------ addons/sitting/functions/fnc_stand.sqf | 9 ++++++--- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/addons/sitting/CfgEventHandlers.hpp b/addons/sitting/CfgEventHandlers.hpp index bd13e623f0..8b3768a747 100644 --- a/addons/sitting/CfgEventHandlers.hpp +++ b/addons/sitting/CfgEventHandlers.hpp @@ -18,6 +18,7 @@ class Extended_Killed_EventHandlers { }; }; +// Need initPost or there are problems with setVariable class Extended_InitPost_EventHandlers { class All { class ADDON { diff --git a/addons/sitting/XEH_clientInit.sqf b/addons/sitting/XEH_clientInit.sqf index 9cf8278877..23816bd8d7 100644 --- a/addons/sitting/XEH_clientInit.sqf +++ b/addons/sitting/XEH_clientInit.sqf @@ -4,7 +4,7 @@ if (!hasInterface) exitWith {}; // Add interaction menu exception -["isNotSitting", {!((_this select 0) getVariable [QGVAR(isSitting), false])}] call EFUNC(common,addCanInteractWithCondition); +["isNotSitting", {isNil {(_this select 0) getVariable QGVAR(isSitting)}}] call EFUNC(common,addCanInteractWithCondition); // Handle interruptions ["medical_onUnconscious", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler); diff --git a/addons/sitting/functions/fnc_canStand.sqf b/addons/sitting/functions/fnc_canStand.sqf index c516485a82..a051e1784e 100644 --- a/addons/sitting/functions/fnc_canStand.sqf +++ b/addons/sitting/functions/fnc_canStand.sqf @@ -18,4 +18,4 @@ params ["_player"]; // Sitting -(_player getVariable [QGVAR(isSitting), false]) +!isNil {_player getVariable QGVAR(isSitting)} diff --git a/addons/sitting/functions/fnc_handleInterrupt.sqf b/addons/sitting/functions/fnc_handleInterrupt.sqf index 328675c172..c7e0a545ff 100644 --- a/addons/sitting/functions/fnc_handleInterrupt.sqf +++ b/addons/sitting/functions/fnc_handleInterrupt.sqf @@ -17,6 +17,6 @@ params ["_player"]; -if (_player getVariable [QGVAR(isSitting), false]) then { +if (!isNil {_player getVariable QGVAR(isSitting)}) then { _player call FUNC(stand); }; diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf index 61872dd1a0..1b6f979b42 100644 --- a/addons/sitting/functions/fnc_sit.sqf +++ b/addons/sitting/functions/fnc_sit.sqf @@ -20,9 +20,6 @@ private ["_actionID", "_configFile", "_sitDirection", "_sitPosition", "_seatPosO params ["_seat", "_player"]; -// Set global variable for standing up -GVAR(seat) = _seat; //@todo - put into player isSitting variable - // Overwrite weird position, because Arma decides to set it differently based on current animation/stance... _player switchMove "amovpknlmstpsraswrfldnon"; @@ -60,8 +57,8 @@ _player setDir _sitDirection; // No need for ATL/ASL as modelToWorld returns in format position _player setPos (_seat modelToWorld _sitPosition); -// Set variables -_player setVariable [QGVAR(isSitting), true]; +// Set variables, save seat object on player +_player setVariable [QGVAR(isSitting), _seat]; _seat setVariable [QGVAR(seatOccupied), true, true]; // To prevent multiple people sitting on one seat @@ -72,7 +69,7 @@ _seatPosOrig = getPosASL _seat; _args params ["_player", "_seat", "_seatPosOrig"]; // Remove PFH if not sitting any more - if !(_player getVariable [QGVAR(isSitting), false]) exitWith { + if (isNil {_player getVariable QGVAR(isSitting)}) exitWith { [_pfhId] call CBA_fnc_removePerFrameHandler; TRACE_1("Remove PFH",_player getVariable [ARR_2(QGVAR(isSitting), false)]); }; diff --git a/addons/sitting/functions/fnc_stand.sqf b/addons/sitting/functions/fnc_stand.sqf index ef19d5f586..4c56eba1c4 100644 --- a/addons/sitting/functions/fnc_stand.sqf +++ b/addons/sitting/functions/fnc_stand.sqf @@ -17,7 +17,7 @@ params ["_player"]; -// remove scroll wheel action +// Remove scroll wheel action _player removeAction (_player getVariable [QGVAR(StandUpActionID), -1]); // Restore animation @@ -31,7 +31,10 @@ _animation = switch (currentWeapon _player) do { [_player, _animation, 2] call EFUNC(common,doAnimation); +// Get seat from variable on player +_seat = _player getVariable [QGVAR(isSitting), objNull]; +if (isNull _seat) exitWith {}; + // Set variables to nil _player setVariable [QGVAR(isSitting), nil]; -GVAR(seat) setVariable [QGVAR(seatOccupied), nil, true]; -GVAR(seat) = nil; +_seat setVariable [QGVAR(seatOccupied), nil, true]; From 85cff04e0c368caf1f426d5d587e229cfcc9b6c4 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sun, 27 Sep 2015 01:37:19 +0200 Subject: [PATCH 041/180] Stored scroll-wheel action ID into already existing player setVariable instead of having 2 --- addons/sitting/functions/fnc_sit.sqf | 10 +--------- addons/sitting/functions/fnc_stand.sqf | 13 ++++++------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf index 1b6f979b42..821bb230d1 100644 --- a/addons/sitting/functions/fnc_sit.sqf +++ b/addons/sitting/functions/fnc_sit.sqf @@ -24,12 +24,6 @@ params ["_seat", "_player"]; _player switchMove "amovpknlmstpsraswrfldnon"; // Add scroll-wheel action to release object -_actionID = _player getVariable [QGVAR(StandUpActionID), -1]; - -if (_actionID != -1) then { - _player removeAction _actionID; -}; - _actionID = _player addAction [ format ["%1", localize LSTRING(Stand)], QUOTE((_this select 0) call FUNC(stand)), @@ -41,8 +35,6 @@ _actionID = _player addAction [ QUOTE(_this call FUNC(canStand)) ]; -_player setVariable [QGVAR(StandUpActionID), _actionID]; - // Read config _configFile = configFile >> "CfgVehicles" >> typeOf _seat; _sitDirection = (getDir _seat) + getNumber (_configFile >> QGVAR(sitDirection)); @@ -58,7 +50,7 @@ _player setDir _sitDirection; _player setPos (_seat modelToWorld _sitPosition); // Set variables, save seat object on player -_player setVariable [QGVAR(isSitting), _seat]; +_player setVariable [QGVAR(isSitting), [_seat, _actionID]]; _seat setVariable [QGVAR(seatOccupied), true, true]; // To prevent multiple people sitting on one seat diff --git a/addons/sitting/functions/fnc_stand.sqf b/addons/sitting/functions/fnc_stand.sqf index 4c56eba1c4..4c08461746 100644 --- a/addons/sitting/functions/fnc_stand.sqf +++ b/addons/sitting/functions/fnc_stand.sqf @@ -16,12 +16,14 @@ #include "script_component.hpp" params ["_player"]; +private ["_animation"]; -// Remove scroll wheel action -_player removeAction (_player getVariable [QGVAR(StandUpActionID), -1]); +(_player getVariable QGVAR(isSitting)) params ["_seat", "_actionID"]; + +// Remove scroll-wheel action +_player removeAction _actionID; // Restore animation -private "_animation"; _animation = switch (currentWeapon _player) do { case "": {"amovpercmstpsnonwnondnon"}; case (primaryWeapon _player): {"amovpercmstpslowwrfldnon"}; @@ -31,10 +33,7 @@ _animation = switch (currentWeapon _player) do { [_player, _animation, 2] call EFUNC(common,doAnimation); -// Get seat from variable on player -_seat = _player getVariable [QGVAR(isSitting), objNull]; -if (isNull _seat) exitWith {}; - // Set variables to nil _player setVariable [QGVAR(isSitting), nil]; +if (isNull _seat) exitWith {}; _seat setVariable [QGVAR(seatOccupied), nil, true]; From cd510c8ff75d36e813babcb908ac2450df47dccb Mon Sep 17 00:00:00 2001 From: jonpas Date: Sun, 27 Sep 2015 02:05:38 +0200 Subject: [PATCH 042/180] Added carrying to chairs --- addons/dragging/CfgEventHandlers.hpp | 12 +----------- addons/sitting/CfgVehicles.hpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/addons/dragging/CfgEventHandlers.hpp b/addons/dragging/CfgEventHandlers.hpp index 2ff7d07c0d..3ee6e9b8cf 100644 --- a/addons/dragging/CfgEventHandlers.hpp +++ b/addons/dragging/CfgEventHandlers.hpp @@ -18,17 +18,7 @@ class Extended_Init_EventHandlers { init = QUOTE(_this call DFUNC(initPerson)); }; }; - class StaticWeapon { - class ADDON { - init = QUOTE(_this call DFUNC(initObject)); - }; - }; - class ReammoBox_F { - class ADDON { - init = QUOTE(_this call DFUNC(initObject)); - }; - }; - class ACE_RepairItem_Base { + class All { class ADDON { init = QUOTE(_this call DFUNC(initObject)); }; diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp index 0d41ba1ed6..4ac0d0edb7 100644 --- a/addons/sitting/CfgVehicles.hpp +++ b/addons/sitting/CfgVehicles.hpp @@ -41,6 +41,9 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.1, -0.45}; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; }; // Camping Chair class Land_CampingChair_V2_F: ThingX { @@ -48,6 +51,9 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.1, -0.45}; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; }; class Furniture_base_F; @@ -57,6 +63,9 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 90; GVAR(sitPosition[]) = {0, 0, -0.5}; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 270; }; // Chair (Wooden) class Land_ChairWood_F: Furniture_base_F { @@ -64,6 +73,9 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.05, 0}; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; }; // Office Chair class Land_OfficeChair_01_F: Furniture_base_F { @@ -71,6 +83,9 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, 0, -0.6}; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; }; // Rattan Chair class Land_RattanChair_01_F: Furniture_base_F { @@ -78,5 +93,8 @@ class CfgVehicles { GVAR(canSit) = 1; GVAR(sitDirection) = 180; GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point) + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; }; }; From ae07a71b0de9ac0b34daefc42aafe29f5c500eed Mon Sep 17 00:00:00 2001 From: jonpas Date: Sun, 27 Sep 2015 02:13:32 +0200 Subject: [PATCH 043/180] Minimized XEH to ThingX config level --- addons/dragging/CfgEventHandlers.hpp | 7 ++++++- addons/sitting/CfgEventHandlers.hpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/dragging/CfgEventHandlers.hpp b/addons/dragging/CfgEventHandlers.hpp index 3ee6e9b8cf..532038c2c5 100644 --- a/addons/dragging/CfgEventHandlers.hpp +++ b/addons/dragging/CfgEventHandlers.hpp @@ -18,7 +18,12 @@ class Extended_Init_EventHandlers { init = QUOTE(_this call DFUNC(initPerson)); }; }; - class All { + class StaticWeapon { + class ADDON { + init = QUOTE(_this call DFUNC(initObject)); + }; + }; + class ThingX { class ADDON { init = QUOTE(_this call DFUNC(initObject)); }; diff --git a/addons/sitting/CfgEventHandlers.hpp b/addons/sitting/CfgEventHandlers.hpp index 8b3768a747..da7efe1601 100644 --- a/addons/sitting/CfgEventHandlers.hpp +++ b/addons/sitting/CfgEventHandlers.hpp @@ -20,7 +20,7 @@ class Extended_Killed_EventHandlers { // Need initPost or there are problems with setVariable class Extended_InitPost_EventHandlers { - class All { + class ThingX { class ADDON { init = QUOTE(_this call DFUNC(addSitActions)) }; From f65f6e9b729ed3462bbf1e8ab70adbd099e52004 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 27 Sep 2015 17:19:40 +0100 Subject: [PATCH 044/180] Add support for virtual cargo Allows cargo objects to be added via classname and reduces simulation/synchronization overhead. Objects become physical upon unloading and cannot be re-made virtual, only scripts can add such virtual objects. Also separates the player feedback from the loading/unloading code and adds a progress bar. --- addons/cargo/XEH_postInit.sqf | 44 ++++++++++++++++++- addons/cargo/functions/fnc_addCargoItem.sqf | 17 ++----- addons/cargo/functions/fnc_canLoadItemIn.sqf | 24 +++++++--- addons/cargo/functions/fnc_canUnloadItem.sqf | 9 ++-- addons/cargo/functions/fnc_getSizeItem.sqf | 22 +++++++--- .../cargo/functions/fnc_handleDestroyed.sqf | 9 ++-- addons/cargo/functions/fnc_loadItem.sqf | 25 ++++------- addons/cargo/functions/fnc_onMenuOpen.sqf | 5 ++- addons/cargo/functions/fnc_startLoadIn.sqf | 21 ++++++--- addons/cargo/functions/fnc_startUnload.sqf | 17 ++++++- addons/cargo/functions/fnc_unloadItem.sqf | 38 +++++++--------- .../functions/fnc_validateCargoSpace.sqf | 4 +- addons/cargo/stringtable.xml | 12 +++++ 13 files changed, 159 insertions(+), 88 deletions(-) diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 6501044c9d..2aeb3ab630 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -1,5 +1,45 @@ #include "script_component.hpp" -["LoadCargo", {_this call FUNC(loadItem)}] call EFUNC(common,addEventHandler); -["UnloadCargo", {_this call FUNC(unloadItem)}] call EFUNC(common,addEventHandler); ["AddCargoByClass", {_this call FUNC(addCargoItem)}] call EFUNC(common,addEventHandler); + +["LoadCargo", { + (_this select 0) params ["_item","_vehicle"]; + private ["_loaded", "_hint", "_itemName", "_vehicleName"]; + + _loaded = [_item, _vehicle] call FUNC(loadItem); + + // Show hint as feedback + _hint = [LSTRING(LoadingFailed), LSTRING(LoadedItem)] select _loaded; + _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName"); + _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + + ["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent); + + if (_loaded) then { + // Invoke listenable event + ["cargoLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent); + }; +}] call EFUNC(common,addEventHandler); + +["UnloadCargo", { + (_this select 0) params ["_item","_vehicle"]; + private ["_unloaded", "_itemClass", "_hint", "_itemName", "_vehicleName"]; + + _unloaded = [_item, _vehicle] call FUNC(unloadItem); + + _itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item}; + + // Show hint as feedback + _hint = [LSTRING(UnloadingFailed), LSTRING(UnloadedItem)] select _unloaded; + _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName"); + _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + + ["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent); + + if (_unloaded) then { + // Invoke listenable event + ["cargoUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent); + }; + + // TOOO maybe drag/carry the unloaded item? +}] call EFUNC(common,addEventHandler); diff --git a/addons/cargo/functions/fnc_addCargoItem.sqf b/addons/cargo/functions/fnc_addCargoItem.sqf index 1233d0228d..f3282d7718 100644 --- a/addons/cargo/functions/fnc_addCargoItem.sqf +++ b/addons/cargo/functions/fnc_addCargoItem.sqf @@ -21,18 +21,9 @@ private ["_position", "_item", "_i"]; params ["_itemClass", "_vehicle", ["_amount", 1]]; TRACE_3("params",_itemClass,_vehicle,_amount); -_position = getPos _vehicle; -_position set [1, (_position select 1) + 1]; -_position set [2, (_position select 2) + 7.5]; - for "_i" from 1 to _amount do { - _item = createVehicle [_itemClass, _position, [], 0, "CAN_COLLIDE"]; - - // Load item or delete it if no space left - if !([_item, _vehicle] call FUNC(loadItem)) exitWith { - deleteVehicle _item; - }; - - // Invoke listenable event - ["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent); + [_item, _vehicle] call FUNC(loadItem); }; + +// Invoke listenable event +["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent); diff --git a/addons/cargo/functions/fnc_canLoadItemIn.sqf b/addons/cargo/functions/fnc_canLoadItemIn.sqf index 8cfe9e194b..fda60aaf65 100644 --- a/addons/cargo/functions/fnc_canLoadItemIn.sqf +++ b/addons/cargo/functions/fnc_canLoadItemIn.sqf @@ -3,7 +3,7 @@ * Check if item can be loaded into other Object. * * Arguments: - * 0: Item Object + * 0: Item * 1: Holder Object (Vehicle) * * Return value: @@ -16,14 +16,24 @@ */ #include "script_component.hpp" -params ["_item", "_vehicle"]; +params [["_item", "", [objNull,""]], "_vehicle"]; if (speed _vehicle > 1 || (((getPos _vehicle) select 2) > 3)) exitWith {false}; -private "_itemSize"; -_itemSize = ([_item] call FUNC(getSizeItem)); +private ["_itemSize", "_validItem"]; +_itemSize = [_item] call FUNC(getSizeItem); -(_itemSize > 0) && -{alive _item && alive _vehicle} && -{(_item distance _vehicle <= MAX_LOAD_DISTANCE)} && +if (typeName _item == "STRING") then { + _validItem = + isClass (configFile >> "CfgVehicles" >> _item) && + {getNumber (configFile >> "CfgVehicles" >> _item >> QGVAR(canLoad)) == 1}; +} else { + _validItem = + (alive _item) && + {(_item distance _vehicle) <= MAX_LOAD_DISTANCE}; +}; + +_validItem && +{_itemSize > 0} && +{alive _vehicle} && {_itemSize <= ([_vehicle] call FUNC(getCargoSpaceLeft))} diff --git a/addons/cargo/functions/fnc_canUnloadItem.sqf b/addons/cargo/functions/fnc_canUnloadItem.sqf index 779a7533a9..8c741a5448 100644 --- a/addons/cargo/functions/fnc_canUnloadItem.sqf +++ b/addons/cargo/functions/fnc_canUnloadItem.sqf @@ -16,18 +16,19 @@ */ #include "script_component.hpp" -private ["_loaded", "_validVehiclestate", "_emptyPos"]; - params ["_item", "_vehicle"]; +private ["_loaded", "_itemClass", "_validVehiclestate", "_emptyPos"]; _loaded = _vehicle getVariable [QGVAR(loaded), []]; if !(_item in _loaded) exitWith {false}; +_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item}; + _validVehiclestate = true; _emptyPos = []; if (_vehicle isKindOf "Ship" ) then { if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false}; - _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot. + _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, _itemClass]); // TODO: if spot is underwater pick another spot. } else { if (_vehicle isKindOf "Air" ) then { if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false}; @@ -35,7 +36,7 @@ if (_vehicle isKindOf "Ship" ) then { _emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ]; } else { if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false}; - _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); + _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, _itemClass]); }; }; diff --git a/addons/cargo/functions/fnc_getSizeItem.sqf b/addons/cargo/functions/fnc_getSizeItem.sqf index dacd6a4982..807251365c 100644 --- a/addons/cargo/functions/fnc_getSizeItem.sqf +++ b/addons/cargo/functions/fnc_getSizeItem.sqf @@ -3,7 +3,7 @@ * Get the cargo size of an object. * * Arguments: - * 0: Object + * 0: Item * * Return value: * Cargo size (default: -1) @@ -15,14 +15,24 @@ */ #include "script_component.hpp" -private "_config"; - params ["_item"]; +private ["_isVirtual","_itemClass","_config"]; +scopeName "return"; -_config = (configFile >> "CfgVehicles" >> typeOf _item >> QGVAR(size)); +_isVirtual = (typeName _item == "STRING"); +_itemClass = if (_isVirtual) then {_item} else {typeOf _item}; +_config = (configFile >> "CfgVehicles" >> _itemClass >> QGVAR(size)); -if (isNumber (_config)) exitWith { - _item getVariable [QGVAR(size), getNumber (_config)] +if (_isVirtual) then { + if (isNumber _config) then { + (getNumber _config) breakOut "return"; + }; +} else { + _config = (configFile >> "CfgVehicles" >> typeOf _item >> QGVAR(size)); + + if (isNumber _config) then { + (_item getVariable [QGVAR(size), getNumber _config]) breakOut "return"; + }; }; -1 diff --git a/addons/cargo/functions/fnc_handleDestroyed.sqf b/addons/cargo/functions/fnc_handleDestroyed.sqf index c11dd3bfad..1022497719 100644 --- a/addons/cargo/functions/fnc_handleDestroyed.sqf +++ b/addons/cargo/functions/fnc_handleDestroyed.sqf @@ -20,12 +20,13 @@ params ["_vehicle"]; private["_loaded"]; _loaded = _vehicle getVariable [QGVAR(loaded), []]; -if (count _loaded == 0) exitWith {}; +if (_loaded isEqualTo []) exitWith {}; { - // TODO deleteVehicle or just delete vehicle? Do we want to be able to recover destroyed equipment? - deleteVehicle _x; - //_x setDamage 1; + // TODO Do we want to be able to recover destroyed equipment? + if (typeName _x == "OBJECT") then { + deleteVehicle _x; + }; } count _loaded; [_vehicle] call FUNC(validateCargoSpace); diff --git a/addons/cargo/functions/fnc_loadItem.sqf b/addons/cargo/functions/fnc_loadItem.sqf index 3c79604a04..5f519476ef 100644 --- a/addons/cargo/functions/fnc_loadItem.sqf +++ b/addons/cargo/functions/fnc_loadItem.sqf @@ -1,9 +1,10 @@ /* * Author: Glowbal * Load object into vehicle. + * Objects loaded via classname remain virtual until unloaded. * * Arguments: - * 0: Object + * 0: Item * 1: Vehicle * * Return value: @@ -16,10 +17,9 @@ */ #include "script_component.hpp" +params [["_item","",[objNull,""]], ["_vehicle",objNull,[objNull]]]; private ["_loaded", "_space", "_itemSize"]; -params ["_item", "_vehicle"]; - if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false}; _loaded = _vehicle getVariable [QGVAR(loaded), []]; @@ -30,19 +30,10 @@ _space = [_vehicle] call FUNC(getCargoSpaceLeft); _itemSize = [_item] call FUNC(getSizeItem); _vehicle setVariable [QGVAR(space), _space - _itemSize, true]; -detach _item; -_item attachTo [_vehicle,[0,0,100]]; -["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent); - -// show hint -private ["_itemName", "_vehicleName"]; - -_itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName"); -_vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); - -["displayTextStructured", [[localize LSTRING(LoadedItem), _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent); - -// Invoke listenable event -["cargoLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent); +if (typeName _item == "OBJECT") then { + detach _item; + _item attachTo [_vehicle,[0,0,-100]]; + ["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent); +}; true diff --git a/addons/cargo/functions/fnc_onMenuOpen.sqf b/addons/cargo/functions/fnc_onMenuOpen.sqf index 031bea01cc..85557835bf 100644 --- a/addons/cargo/functions/fnc_onMenuOpen.sqf +++ b/addons/cargo/functions/fnc_onMenuOpen.sqf @@ -22,7 +22,7 @@ params ["_display"]; uiNamespace setVariable [QGVAR(menuDisplay), _display]; [{ - private ["_display","_loaded", "_ctrl", "_label"]; + private ["_display","_loaded", "_ctrl", "_class", "_label"]; disableSerialization; _display = uiNamespace getVariable QGVAR(menuDisplay); if (isnil "_display") exitWith { @@ -40,7 +40,8 @@ uiNamespace setVariable [QGVAR(menuDisplay), _display]; lbClear _ctrl; { - _ctrl lbAdd (getText(configfile >> "CfgVehicles" >> typeOf _x >> "displayName")); + _class = if (typeName _x == "STRING") then {_x} else {typeOf _x}; + _ctrl lbAdd (getText(configfile >> "CfgVehicles" >> _class >> "displayName")); true } count _loaded; diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index b4ba50fbb6..1ce5d62407 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -16,16 +16,25 @@ #include "script_component.hpp" params ["_player", "_object"]; +private ["_vehicle", "_size", "_displayName"]; -private ["_nearestVehicle"]; -_nearestVehicle = [_player] call FUNC(findNearestVehicle); +_vehicle = [_player] call FUNC(findNearestVehicle); -if (isNull _nearestVehicle || _nearestVehicle isKindOf "Cargo_Base_F") then { +if (isNull _vehicle || _vehicle isKindOf "Cargo_Base_F") then { { - if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_nearestVehicle = _x}; + if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x}; } foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]); }; -if (isNull _nearestVehicle) exitWith {false}; +if (isNull _vehicle) exitWith {false}; -[_object, _nearestVehicle] call FUNC(loadItem) +// Start progress bar +if ([_object, _vehicle] call FUNC(canLoadItemIn)) then { + _size = [_object] call FUNC(getSizeItem); + + [5 * _size, [_object,_vehicle], "LoadCargo", {}, localize LSTRING(LoadingItem)] call EFUNC(common,progressBar); +} else { + _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName"); + + ["displayTextStructured", [[LSTRING(LoadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent); +}; diff --git a/addons/cargo/functions/fnc_startUnload.sqf b/addons/cargo/functions/fnc_startUnload.sqf index 28ae034167..013de1dc64 100644 --- a/addons/cargo/functions/fnc_startUnload.sqf +++ b/addons/cargo/functions/fnc_startUnload.sqf @@ -20,7 +20,7 @@ private ["_display", "_loaded", "_ctrl", "_selected", "_item"]; disableSerialization; _display = uiNamespace getVariable QGVAR(menuDisplay); -if (isnil "_display") exitWith {}; +if (isNil "_display") exitWith {}; _loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []]; if (count _loaded == 0) exitWith {}; @@ -32,4 +32,17 @@ _selected = (lbCurSel _ctrl) max 0; if (count _loaded <= _selected) exitWith {}; _item = _loaded select _selected; -[_item, GVAR(interactionVehicle)] call FUNC(unloadItem); + +// Start progress bar +private ["_size", "_itemClass", "_displayName"]; + +if ([_item, GVAR(interactionVehicle)] call FUNC(canUnloadItem)) then { + _size = [_item] call FUNC(getSizeItem); + + [5 * _size, [_item, GVAR(interactionVehicle)], "UnloadCargo", {}, localize LSTRING(UnloadingItem)] call EFUNC(common,progressBar); +} else { + _itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item}; + _displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName"); + + ["displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent); +}; diff --git a/addons/cargo/functions/fnc_unloadItem.sqf b/addons/cargo/functions/fnc_unloadItem.sqf index 2630f2104a..81cca7154b 100644 --- a/addons/cargo/functions/fnc_unloadItem.sqf +++ b/addons/cargo/functions/fnc_unloadItem.sqf @@ -3,7 +3,7 @@ * Unload object from vehicle. * * Arguments: - * 0: Object + * 0: Item * 1: Vehicle * * Return value: @@ -16,20 +16,21 @@ */ #include "script_component.hpp" -private ["_loaded", "_space", "_itemSize", "_emptyPos", "_validVehiclestate"]; - params ["_item", "_vehicle"]; +private ["_loaded", "_space", "_itemSize", "_emptyPos", "_validVehiclestate"]; if !([_item, _vehicle] call FUNC(canUnloadItem)) exitWith { false }; +_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item}; + _validVehiclestate = true; _emptyPos = []; if (_vehicle isKindOf "Ship" ) then { if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false}; TRACE_1("SHIP Ground Check", getPosATL _vehicle ); - _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot. + _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, _itemClass]); // TODO: if spot is underwater pick another spot. } else { if (_vehicle isKindOf "Air" ) then { if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false}; @@ -39,38 +40,29 @@ if (_vehicle isKindOf "Ship" ) then { } else { if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false}; TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle); - _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeOf _item]); + _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, _itemClass]); }; }; TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle); if (!_validVehiclestate) exitWith {false}; -if (count _emptyPos == 0) exitWith {false}; //consider displaying text saying there are no safe places to exit the vehicle +if (count _emptyPos == 0) exitWith {false}; _loaded = _vehicle getVariable [QGVAR(loaded), []]; -_loaded = _loaded - [_item]; +_loaded deleteAt (_loaded find _item); _vehicle setVariable [QGVAR(loaded), _loaded, true]; _space = [_vehicle] call FUNC(getCargoSpaceLeft); _itemSize = [_item] call FUNC(getSizeItem); _vehicle setVariable [QGVAR(space), (_space + _itemSize), true]; -detach _item; -_item setPosASL (_emptyPos call EFUNC(common,PositiontoASL)); -["hideObjectGlobal", [_item, false]] call EFUNC(common,serverEvent); - -// show hint -private ["_itemName", "_vehicleName"]; - -_itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName"); -_vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); - -["displayTextStructured", [[localize LSTRING(UnloadedItem), _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent); - -// TOOO maybe drag/carry the unloaded item? - -// Invoke listenable event -["cargoUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent); +if (typeName _item == "OBJECT") then { + detach _item; + _item setPosASL (_emptyPos call EFUNC(common,PositiontoASL)); + ["hideObjectGlobal", [_item, false]] call EFUNC(common,serverEvent); +} else { + createVehicle [_item, _emptyPos, [], 0, ""]; +}; true diff --git a/addons/cargo/functions/fnc_validateCargoSpace.sqf b/addons/cargo/functions/fnc_validateCargoSpace.sqf index 6caf664ca5..7634b131e6 100644 --- a/addons/cargo/functions/fnc_validateCargoSpace.sqf +++ b/addons/cargo/functions/fnc_validateCargoSpace.sqf @@ -24,7 +24,7 @@ _loaded = _vehicle getVariable [QGVAR(loaded), []]; _newLoaded = []; _totalSpaceOccupied = 0; { - if !(isNull _x) then { + if ((typeName _x == "STRING") || {!isNull _x}) then { _newLoaded pushback _x; _totalSpaceOccupied = _totalSpaceOccupied + ([_x] call FUNC(getSizeItem)); }; @@ -35,4 +35,4 @@ if (count _loaded != count _newLoaded) then { _vehicle setVariable [QGVAR(loaded), _newLoaded, true]; }; -_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true]; +_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true]; diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 7f9ac40a15..6902a1aae1 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -95,5 +95,17 @@ 1%<br/>kirakodva ebből:<br/>%2 %1<br/>разгружен из<br/>%2 + + Loading Cargo + + + Unloading Cargo + + + %1<br/>could not be loaded + + + %1<br/>could not be unloaded + From 4521df0a575776a59b0b9db77ce0acc753fdc4cf Mon Sep 17 00:00:00 2001 From: jonpas Date: Mon, 28 Sep 2015 16:17:12 +0200 Subject: [PATCH 045/180] Add synchronizedObjects vehicle support to assignObjectsInList with an optional parameter --- addons/common/functions/fnc_assignObjectsInList.sqf | 12 +++++++++--- .../functions/fnc_moduleAssignMedicalVehicle.sqf | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/addons/common/functions/fnc_assignObjectsInList.sqf b/addons/common/functions/fnc_assignObjectsInList.sqf index eddd792500..a09447a43a 100644 --- a/addons/common/functions/fnc_assignObjectsInList.sqf +++ b/addons/common/functions/fnc_assignObjectsInList.sqf @@ -8,6 +8,7 @@ * 1: Variable Name * 2: Value * 3: Global + * 4: Vehicle (default: false) * * Return Value: * None @@ -19,7 +20,7 @@ */ #include "script_component.hpp" -params ["_list", "_variable", "_setting", "_global"]; +params ["_list", "_variable", "_setting", "_global", ["_vehicle", false]]; if (typeName _list == "STRING") then { _list = [_list, true, true] call FUNC(parseList); @@ -30,8 +31,13 @@ if (typeName _list == "STRING") then { if (!isNil "_x") then { if (typeName _x == typeName objNull) then { if (local _x) then { - _x setVariable [_variable, _setting, _global]; - TRACE_4("Set variable",_x,_variable,_setting,_global); + if (_vehicle) then { + (vehicle _x) setVariable [_variable, _setting, _global]; + TRACE_6("Set variable vehicle",_x,vehicle _x,typeOf (vehicle _x),_variable,_setting,_global); + } else { + _x setVariable [_variable, _setting, _global]; + TRACE_5("Set variable",_x,typeOf _x,_variable,_setting,_global); + }; }; }; }; diff --git a/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf b/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf index 9cbb698c82..2bc6d3a332 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf @@ -22,5 +22,5 @@ if (!isNull _logic) then { _setting = _logic getVariable ["enabled", 0]; [_list, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList); - [synchronizedObjects _logic, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList); + [synchronizedObjects _logic, QGVAR(medicClass), _setting, true, true] call EFUNC(common,assignObjectsInList); }; From c0b78ecf3a5695c60e590330ae746c1181c93e4e Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 29 Sep 2015 11:36:30 -0500 Subject: [PATCH 046/180] Set Default Channel at mission start --- addons/map/ACE_Settings.hpp | 22 ++++++++++++++++++++++ addons/map/CfgVehicles.hpp | 14 ++++++++++++++ addons/map/XEH_postInitClient.sqf | 15 +++++++++++++++ addons/map/functions/fnc_moduleMap.sqf | 3 ++- addons/map/stringtable.xml | 6 ++++++ 5 files changed, 59 insertions(+), 1 deletion(-) diff --git a/addons/map/ACE_Settings.hpp b/addons/map/ACE_Settings.hpp index 4e2a5d5706..c0d2718c1f 100644 --- a/addons/map/ACE_Settings.hpp +++ b/addons/map/ACE_Settings.hpp @@ -2,33 +2,55 @@ class ACE_Settings { class GVAR(BFT_Interval) { value = 1.0; typeName = "SCALAR"; + displayName = CSTRING(BFT_Interval_DisplayName); + description = CSTRING(BFT_Interval_Description); }; class GVAR(BFT_Enabled) { value = 0; typeName = "BOOL"; + displayName = CSTRING(BFT_Enabled_DisplayName); + description = CSTRING(BFT_Enabled_Description); }; class GVAR(BFT_HideAiGroups) { value = 0; typeName = "BOOL"; + displayName = CSTRING(BFT_HideAiGroups_DisplayName); + description = CSTRING(BFT_HideAiGroups_Description); }; class GVAR(mapIllumination) { value = 1; typeName = "BOOL"; + displayName = CSTRING(MapIllumination_DisplayName); + description = CSTRING(MapIllumination_Description); }; class GVAR(mapGlow) { value = 1; typeName = "BOOL"; + displayName = CSTRING(MapGlow_DisplayName); + description = CSTRING(MapGlow_Description); }; class GVAR(mapShake) { value = 1; typeName = "BOOL"; + displayName = CSTRING(MapShake_DisplayName); + description = CSTRING(MapShake_Description); }; class GVAR(mapLimitZoom) { value = 0; typeName = "BOOL"; + displayName = CSTRING(MapLimitZoom_DisplayName); + description = CSTRING(MapLimitZoom_Description); }; class GVAR(mapShowCursorCoordinates) { value = 0; typeName = "BOOL"; + displayName = CSTRING(MapShowCursorCoordinates_DisplayName); + description = CSTRING(MapShowCursorCoordinates_Description); + }; + class GVAR(DefaultChannel) { + value = -1; + typeName = "SCALAR"; + displayName = CSTRING(DefaultChannel_DisplayName); + description = CSTRING(DefaultChannel_Description); }; }; diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index 560453b416..7906de8bb7 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -55,6 +55,20 @@ class CfgVehicles { typeName = "BOOL"; defaultValue = 0; }; + class DefaultChannel { + displayName = CSTRING(DefaultChannel_DisplayName); + description = CSTRING(DefaultChannel_Description); + typeName = "NUMBER"; + class values { + class disable {name = ECSTRING(common,Disabled); value = -1; default = 1;}; + class global {name = "$STR_channel_global"; value = 0;}; + class side {name = "$STR_channel_side"; value = 1;}; + class command {name = "$STR_channel_command"; value = 2;}; + class group {name = "$STR_channel_group"; value = 3;}; + class vehicle {name = "$STR_channel_vehicle"; value = 4;}; + class direct {name = "$STR_channel_direct"; value = 5;}; + }; + }; }; class ModuleDescription { description = CSTRING(Module_Description); diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index 02800c2540..c162f8802d 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -56,6 +56,21 @@ call FUNC(determineZoom); }, 0] call CBA_fnc_addPerFrameHandler; ["SettingsInitialized", { + if (isMultiplayer && {GVAR(DefaultChannel) != -1}) then { + //Set the chat channel once the map has finished loading + [{ + if ((isNull findDisplay 37) && {isNull findDisplay 52} && {isNull findDisplay 53} && {isNull findDisplay 12}) exitWith {}; + [_this select 1] call CBA_fnc_removePerFrameHandler; + + setCurrentChannel GVAR(DefaultChannel); + if (currentChannel == GVAR(DefaultChannel)) then { + // ACE_LOGINFO_1("Channel Set - %1", currentChannel); + } else { + ACE_LOGERROR_2("Failed To Set Channel %1 (is %2)", GVAR(DefaultChannel), currentChannel); + }; + }, 0, []] call CBA_fnc_addPerFrameHandler; + }; + // Start Blue Force Tracking if Enabled if (GVAR(BFT_Enabled)) then { GVAR(BFT_markers) = []; diff --git a/addons/map/functions/fnc_moduleMap.sqf b/addons/map/functions/fnc_moduleMap.sqf index b7db6996d6..605c15127e 100644 --- a/addons/map/functions/fnc_moduleMap.sqf +++ b/addons/map/functions/fnc_moduleMap.sqf @@ -13,7 +13,7 @@ if !(isServer) exitWith {}; -params ["_logic", "_units", "_activated"]; +params ["_logic", "", "_activated"]; if !(_activated) exitWith {}; @@ -22,5 +22,6 @@ if !(_activated) exitWith {}; [_logic, QGVAR(mapShake), "MapShake" ] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(mapLimitZoom), "MapLimitZoom" ] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(mapShowCursorCoordinates), "MapShowCursorCoordinates"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(DefaultChannel), "DefaultChannel" ] call EFUNC(common,readSettingFromModule); ACE_LOGINFO("Map Module Initialized."); diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 8f693ef37a..76055cc45a 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -256,5 +256,11 @@ Snížit jas Reducir brillo + + Set Channel At Start + + + Change the starting marker channel at mission start + \ No newline at end of file From 251437c415444f0472ea2395e1e1a860ee680826 Mon Sep 17 00:00:00 2001 From: gienkov Date: Tue, 29 Sep 2015 20:37:30 +0200 Subject: [PATCH 047/180] pl translation --- addons/map/stringtable.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 76055cc45a..0488a13493 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -258,9 +258,11 @@ Set Channel At Start + Ust. domyślny kanał Change the starting marker channel at mission start + Ustaw domyślny kanał dla markerów przy starcie misji \ No newline at end of file From 88ee846d7d6e48bb80482af3e51902e1b80d5b5e Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Thu, 1 Oct 2015 01:36:27 +0200 Subject: [PATCH 048/180] Update Stringtable, german: "captives" --- addons/captives/stringtable.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 864fa7c437..ed66fb7cf2 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -99,7 +99,7 @@ Cable ties that allow you to restrain prisoners. - Kabelbinder ermöglichen es, Gefangene zu fesseln. + Mit Kabelbindern können Personen gefesselt werden. Opaska zaciskowa pozwala na skrępowanie dłoni u więźnia. Los precintos permiten maniatar prisioneros Les Serflex permettent de menotter les prisonniers. @@ -206,7 +206,7 @@ Skuwanie sojuszników Se puede esposar el bando propio Může spoutat spolubojovníky - Kann Teamkollegen fesseln + Kann Kameraden fesseln Pode algemar o próprio lado Peut libérer sa propre faction Saját oldal megbilincselhető @@ -217,7 +217,7 @@ Czy gracze mogą skuwać sojuszników? Pueden los jugadores esposar unidades en su propio bando Mohou hráči spoutat jednotky na své straně - Können Spieler eigene Einheiten fesseln + Spieler können eigene Einheiten fesseln. Os jogadores podem algemar unidades do seu lado Les joueurs peuvent utiliser les Serflex sur leur propre camp A játékosok megkötözhetik-e a saját oldalukon lévő egységeket @@ -239,7 +239,7 @@ Gracze mogą skapitulować po schowaniu swojej broni do kabury Los jugadores pueden rendirse después de enfundar su arma Hráč se může vzdát poté, co si skryje zbraň - Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben + Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben. Jogadores podem se render depois de guardar sua arma Les joueurs peuvent se rendre après avoir rangé leur arme A játékosok megadhatják magukat a fegyverük elrakása után @@ -247,6 +247,7 @@ Require surrendering + Benötigt Kapitulation Wymagaj kapitulacji Requer rendição Требовать пленения @@ -254,6 +255,7 @@ Require Players to surrender before they can be arrested + Spieler müssen zunächst kapitulieren bevor sie gefangen genommen werden können. Wymagaj od graczy kapitulacji zanim będzie można ich zaaresztować Requer que jogadores se rendam antes de poderem ser presos Требуется, чтобы игрок сдался в плен прежде, чем его можно будет связать @@ -261,6 +263,7 @@ Surrendering only + Nur Kapitulieren. Tylko kapitulacja Somente rendição Только сдавшийся в плен @@ -268,6 +271,7 @@ Surrendering or No weapon + Kapitulieren oder keine Waffe. Kapitulacja lub brak broni Rendição ou desarmado Сдавшийся или безоружный From 66e89143603ed362c54766898063f94d9cc01891 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Thu, 1 Oct 2015 04:38:21 +0200 Subject: [PATCH 049/180] Update stringtable.xml --- addons/captives/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index ed66fb7cf2..0e1714d225 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -99,7 +99,7 @@ Cable ties that allow you to restrain prisoners. - Mit Kabelbindern können Personen gefesselt werden. + Mit Kabelbindern können Gefangene gefesselt werden. Opaska zaciskowa pozwala na skrępowanie dłoni u więźnia. Los precintos permiten maniatar prisioneros Les Serflex permettent de menotter les prisonniers. From 4d867cb4f78470995be722d1f82ef0210746c32f Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 3 Oct 2015 04:36:38 +0200 Subject: [PATCH 050/180] Update README_DE.md --- docs/README_DE.md | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index 9921bf3fc6..e80c5e48da 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -29,16 +29,40 @@ Da die MOD vollkommen als **open-source** Projekt gestaltet ist, steht es jedem Die Mod ist **modular gestaltet** — beinahe jede PBO kann entfernt werden, sodass jede Gemeinschaft ihre eigene Version der Mod unterhalten kann. Dies kann zum Beispiel einige Funktionalitäten ausschließen, da das Feature nicht gewünscht ist, oder es mit einer anderen MOD in Konflikt gerät etc. .Ebenfalls können viele Einstellungen vom Missionsersteller vorgenommen werden (u.a. am medizinischem System), sodass eine individuelle Erfahrung gewährleistet wird. -### Features -- Verbessertes medizinisches System -- Logistik System: U.a. Transport und Fahrzeugreparatur -- Sprengstoffsystem mit unterschiedlichen Zündern +### Hauptmerkmale +- Vollkommen neues 3D Interaktionssystem +- Leistungs- und stabilitätsoptimiert +- Hauptmerkmal auf Modularität und individuelle Anpassungsmöglichkeiten +- Neue, flexible Spieler- und Servereinstellungen +- Verbessertes Sanitätssystem mit unterschiedlichen Stufen (Basis/Erweitert) Spielbarkeit/Realismus +- Echte und stetige Wettersynchronisation +- Ballistik basierend auf vielen Faktoren u.a. Wetter und Wind - Gefangenensystem -- Reale Namen für Arma 3 Fahrzeuge und Waffen -- Realistisches, ballistisches Verhalten (Wind und Luftfeuchtigkeit) -- Simulation der Rückstrahlzone -- Ein Feuerleitsystem für gepanzerte Fahrzeuge und Hubschrauber -***und noch viel mehr...*** +- Sprengtoffmechaniken mit den unterschiedlichsten Auslösern +- Kartenverbesserungen – Setzen von Markierungen ; Kartenwerkzeuge +- Erweitertes Raketenlenksystem + +#### Weitere Mechaniken +- Tragen und Ziehen +- Waffen und Fahrzeuge tragen die Namen ihrer Vorbilder in der echten Welt +- Ein Feuerleitsystem (FLS) für Hubschrauber und Panzer +- Realistische Ballistik/Feuerleitsystem werdeb in C/C++ Erweiterungen berechnet +- Rückstrahlzonen- und Überdrucksimulation +- Einwegwaffen +- Realistische G-Kräfte +- Fahrzeuge abschließen +- Realistische Nacht- und Thermalsicht +- Magazin umpacken +- Realistische Waffen Er- bzw. Überhitzung +- Temporäre Taubheit bei zu lauten Geräuschen +- Verbesserte Ragdollphysik +- Verbesserte Interaktionen für AARs und Munitionsschlepper +- Einstellbare Zielfernrohre +- Keine Ruheanimationen bei gesenkter Waffe +- No talking player avatar +- Über Hindernisse springen, über Mauern klettern, Zäune durchtrennen +- Vector IV, MicroDAGR und Kestrel
+***und noch viel viel mehr...*** #### Anleitungen Du hast ACE3 installiert, hast aber keine Ahnung was und wie alles funktioniert und wo sich was befindet? From 978d00211284dbd978bbfbbabbdfdd36751acf9a Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 3 Oct 2015 04:37:28 +0200 Subject: [PATCH 051/180] Update README_DE.md --- docs/README_DE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index e80c5e48da..c716f0fa22 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -38,7 +38,7 @@ Die Mod ist **modular gestaltet** — beinahe jede PBO kann entfernt werden, sod - Echte und stetige Wettersynchronisation - Ballistik basierend auf vielen Faktoren u.a. Wetter und Wind - Gefangenensystem -- Sprengtoffmechaniken mit den unterschiedlichsten Auslösern +- Sprengtoffmechaniken mit den unterschiedlichsten Zündern - Kartenverbesserungen – Setzen von Markierungen ; Kartenwerkzeuge - Erweitertes Raketenlenksystem From 2afbe36b89067b6a2940ea14f6daec14b2038b73 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 3 Oct 2015 04:39:22 +0200 Subject: [PATCH 052/180] Update README_DE.md --- docs/README_DE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index c716f0fa22..a54bf70e59 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -46,7 +46,7 @@ Die Mod ist **modular gestaltet** — beinahe jede PBO kann entfernt werden, sod - Tragen und Ziehen - Waffen und Fahrzeuge tragen die Namen ihrer Vorbilder in der echten Welt - Ein Feuerleitsystem (FLS) für Hubschrauber und Panzer -- Realistische Ballistik/Feuerleitsystem werdeb in C/C++ Erweiterungen berechnet +- Viele Funktionen werden in C/C++ Erweiterungen berechnet - Rückstrahlzonen- und Überdrucksimulation - Einwegwaffen - Realistische G-Kräfte From 411ddac3b992cd6fe2ed1f413bade6c957a066e7 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 3 Oct 2015 04:53:00 +0200 Subject: [PATCH 053/180] Update README_DE.md --- docs/README_DE.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index a54bf70e59..23be2069d3 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -27,7 +27,7 @@ Da die MOD vollkommen als **open-source** Projekt gestaltet ist, steht es jedem frei Änderungen vorzuschlagen, oder seine eigene, modifizierte Version zu erstellen, solange diese ebenfalls der Öffentlichkeit zugänglich ist und mit GNU General Public License übereinstimmt. (Weitere Informationen ist der Lizenzdatei in diesem Projekt entnehmbar) -Die Mod ist **modular gestaltet** — beinahe jede PBO kann entfernt werden, sodass jede Gemeinschaft ihre eigene Version der Mod unterhalten kann. Dies kann zum Beispiel einige Funktionalitäten ausschließen, da das Feature nicht gewünscht ist, oder es mit einer anderen MOD in Konflikt gerät etc. .Ebenfalls können viele Einstellungen vom Missionsersteller vorgenommen werden (u.a. am medizinischem System), sodass eine individuelle Erfahrung gewährleistet wird. +Die Mod ist **modular gestaltet** — beinahe jede PBO kann entfernt werden, sodass jede Gemeinschaft ihre eigene Version der Mod unterhalten kann. Dies kann zum Beispiel einige Funktionalitäten ausschließen, da das Feature nicht gewünscht ist, oder es mit einer anderen MOD in Konflikt gerät etc..Ebenfalls können viele Einstellungen vom Missionsersteller vorgenommen werden (u.a. am Sanitätssystem), sodass eine individuelle Erfahrung gewährleistet werden kann. ### Hauptmerkmale - Vollkommen neues 3D Interaktionssystem @@ -69,11 +69,11 @@ Du hast ACE3 installiert, hast aber keine Ahnung was und wie alles funktioniert - [Erste Schritte](http://ace3mod.com/wiki/user/getting-started.html). #### Mitwirken -Wenn du bei der Entwicklung der MOD mithelfen möchtest, so kannst du dies tun, indem du nach Fehlern Ausschau hältst, oder neue Funktionen vorschlägst. Um etwas beizutragen, "Forke" einfach dieses Archiv (bzw. repository) und erstelle deine "Pull-Request", welche von anderen Entwicklern und Beiträgern überprüft wird. Bitte trage dich dabei in [`AUTHORS.txt`](https://github.com/acemod/ACE3/blob/master/AUTHORS.txt) mit deinem Nutzernamen und einer gütligen Email-Adresse ein. +Wenn du bei der Entwicklung der MOD mithelfen möchtest kannst du dies tun, indem du nach Fehlern Ausschau hältst oder neue Funktionen vorschlägst. Um etwas beizutragen, "Forke" einfach dieses Archiv (bzw. "repository") und erstelle deine "Pull-Request", welche von anderen Entwicklern und Beiträgern überprüft wird. Bitte trage dich dabei in [`AUTHORS.txt`](https://github.com/acemod/ACE3/blob/master/AUTHORS.txt) mit deinem Nutzernamen und einer gütligen Email-Adresse ein. -Um einen Fehler oder ein Feature zu melden bzw. ein bereits Bestehendes zu ändern - nutze unseren [Issue Tracker](https://github.com/acemod/ACE3/issues). Besuche auch: +Um einen Fehler, Anregungen oder neue Funktionalitäten uns mitzuteilen: Nutze unseren [Issue Tracker](https://github.com/acemod/ACE3/issues). Besuche auch: - [Wie kann ich ein Problem melden](http://ace3mod.com/wiki/user/how-to-report-an-issue.html) -- [Wie kann ich ein Feature Request erstellen](http://ace3mod.com/wiki/user/how-to-make-a-feature-request.html) +- [Wie kann ich ein Wunsch zu einer neuen Funktion mitteilen? ](http://ace3mod.com/wiki/user/how-to-make-a-feature-request.html) #### Testen & MOD erstellen Wenn du die neusten Entwicklungen erleben und uns dabei helfen möchtest bestehende Fehler zu entdecken, lade dir einfach die "Master Branch" herunter. Entweder nutzt du [Git](https://help.github.com/articles/fetching-a-remote/) - wenn die Schritte bekannt sind - oder du lädst es dir direkt über [diesen Link](https://github.com/acemod/ACE3/archive/master.zip) herunter. From e056a3b2cdf773c59b2ef64f396076d923f7c88f Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Sat, 3 Oct 2015 04:54:10 +0200 Subject: [PATCH 054/180] Update README_DE.md --- docs/README_DE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index 23be2069d3..b08dddcc1e 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -59,8 +59,8 @@ Die Mod ist **modular gestaltet** — beinahe jede PBO kann entfernt werden, sod - Verbesserte Interaktionen für AARs und Munitionsschlepper - Einstellbare Zielfernrohre - Keine Ruheanimationen bei gesenkter Waffe -- No talking player avatar - Über Hindernisse springen, über Mauern klettern, Zäune durchtrennen +- Keine "sprechender Charkater" - Vector IV, MicroDAGR und Kestrel
***und noch viel viel mehr...*** From c75d219b65a2c311293a31dfcc236abafdc0f5b6 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 3 Oct 2015 21:34:46 -0500 Subject: [PATCH 055/180] Cleanup Undefined Functions --- addons/common/functions/fnc_dumpArray.sqf | 14 ++--- .../functions/fnc_execPersistentFnc.sqf | 3 +- addons/common/functions/fnc_execRemoteFnc.sqf | 3 +- addons/common/functions/fnc_loadPerson.sqf | 2 +- .../fnc_sendDisplayInformationTo.sqf | 53 ------------------- .../functions/fnc_sendDisplayMessageTo.sqf | 53 ------------------- 6 files changed, 11 insertions(+), 117 deletions(-) delete mode 100644 addons/common/functions/fnc_sendDisplayInformationTo.sqf delete mode 100644 addons/common/functions/fnc_sendDisplayMessageTo.sqf diff --git a/addons/common/functions/fnc_dumpArray.sqf b/addons/common/functions/fnc_dumpArray.sqf index 182c542df2..010736d3a9 100644 --- a/addons/common/functions/fnc_dumpArray.sqf +++ b/addons/common/functions/fnc_dumpArray.sqf @@ -1,22 +1,24 @@ /* * Author: ? - * ? + * Dumps an array to the RPT, showing the depth of each element. * * Arguments: * 0: Array to be dumped - * 1: Depth + * 1: Depth * * Return Value: * None * + * Example: + * [[0, [1,2], [[3]]]] call ace_common_fnc_dumpArray + * * Public: No */ #include "script_component.hpp" -params ["_var", "_depth"]; +params ["_var", ["_depth", 0, [0]]]; -private "_pad"; -_pad = ""; +local _pad = ""; for "_i" from 0 to _depth do { _pad = _pad + toString [9]; @@ -38,5 +40,5 @@ if (IS_ARRAY(_var)) then { diag_log text format ["%1],", _pad]; }; } else { - diag_log text format ["%1%2", _pad, [_var] call FUNC(formatVar)]; + diag_log text format ["%1%2", _pad, _var]; }; diff --git a/addons/common/functions/fnc_execPersistentFnc.sqf b/addons/common/functions/fnc_execPersistentFnc.sqf index dc88a7c3c9..0b7bccb69a 100644 --- a/addons/common/functions/fnc_execPersistentFnc.sqf +++ b/addons/common/functions/fnc_execPersistentFnc.sqf @@ -20,11 +20,10 @@ GVAR(remoteFnc) = _this; params ["_arguments", "_function", "_unit", "_name"]; +TRACE_4("params", _arguments, _function, _unit, _name); _function = call compile _function; -//["Remote", [_arguments, _this select 1, _name], {format ["%1 call %2 id: %3", _this select 0, _this select 1, _this select 2]}, false] call FUNC(log); - // execute function on every currently connected machine [[_arguments, _unit], _this select 1, 2] call FUNC(execRemoteFnc); diff --git a/addons/common/functions/fnc_execRemoteFnc.sqf b/addons/common/functions/fnc_execRemoteFnc.sqf index 6b617bf92f..0dd0653a33 100644 --- a/addons/common/functions/fnc_execRemoteFnc.sqf +++ b/addons/common/functions/fnc_execRemoteFnc.sqf @@ -23,11 +23,10 @@ GVAR(remoteFnc) = _this; params ["_arguments", "_function", ["_unit", 2]]; +TRACE_3("params", _arguments, _function, _unit); _function = call compile _function; -//["Remote", [_arguments, _this select 1, _unit], {format ["%1 call %2 to: %3", _this select 0, _this select 1, _this select 2]}, false] call FUNC(log); - if (typeName _unit == "SCALAR") exitWith { switch (_unit) do { case 0 : { diff --git a/addons/common/functions/fnc_loadPerson.sqf b/addons/common/functions/fnc_loadPerson.sqf index 377412bd4c..da729ed0d7 100644 --- a/addons/common/functions/fnc_loadPerson.sqf +++ b/addons/common/functions/fnc_loadPerson.sqf @@ -21,7 +21,7 @@ private ["_vehicle", "_loadcar", "_loadair", "_loadtank", "_loadboat"]; _vehicle = objNull; -if (!([_caller] call FUNC(canInteract)) || {_caller == _unit}) exitwith {_vehicle}; +if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitwith {_vehicle}; _loadcar = nearestObject [_unit, "Car"]; diff --git a/addons/common/functions/fnc_sendDisplayInformationTo.sqf b/addons/common/functions/fnc_sendDisplayInformationTo.sqf deleted file mode 100644 index aa3dba2365..0000000000 --- a/addons/common/functions/fnc_sendDisplayInformationTo.sqf +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Author: Glowbal - * Sends a display information hint to a receiver - * - * Arguments: - * 0: receiver - * 1: title - * 2: content - * 3: type (optional) - * - * Return Value: - * None - * - * Public: Yes - */ -#include "script_component.hpp" - -params [["_reciever", objNull], ["_title", ""], ["_content", ""], ["_type", 0], ["_parameters", []]]; - -if (isPlayer _reciever) then { - if (!local _reciever) then { - [_this, QFUNC(sendDisplayInformationTo), _reciever, false] call FUNC(execRemoteFnc); - } else { - if (isLocalized _title) then { - _title = localize _title; - }; - - private "_localizationArray"; - _localizationArray = [_title]; - - { - _localizationArray pushback _x; - false - } count _parameters; - - _title = format _localizationArray; - - { - if (isLocalized _x) then { - _localizationArray = [localize _x]; - - { - _localizationArray pushBack _x; - false - } count _parameters; - - _content set [_forEachIndex, format _localizationArray]; - }; - } forEach _content; - - [_title, _content, _type] call FUNC(displayInformation); - }; -}; diff --git a/addons/common/functions/fnc_sendDisplayMessageTo.sqf b/addons/common/functions/fnc_sendDisplayMessageTo.sqf deleted file mode 100644 index 6f16ec8006..0000000000 --- a/addons/common/functions/fnc_sendDisplayMessageTo.sqf +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Author: Glowbal - * Displays a message on locality of receiver - * - * Arguments: - * 0: receiver - * 1: title - * 2: content - * 3: type (optional) - * - * Return Value: - * None - * - * Public: Yes - */ -#include "script_component.hpp" - -params [["_reciever", objNull], ["_title", ""], ["_content", ""], ["_type", 0], ["_parameters", []]]; - -if (isPlayer _reciever) then { - if (!local _reciever) then { - [_this, QFUNC(sendDisplayMessageTo), _reciever, false] call FUNC(execRemoteFnc); - } else { - if (isLocalized _title) then { - _title = localize _title; - }; - - if (isLocalized _content) then { - _content = localize _content; - }; - - private "_localizationArray"; - _localizationArray = [_title]; - - { - _localizationArray pushBack _x; - false - } count _parameters; - - _title = format _localizationArray; - - _localizationArray = [_content]; - - { - _localizationArray pushBack _x; - false - } count _parameters; - - _content = format _localizationArray; - - [_title, _content, _type] call FUNC(displayMessage); - }; -}; From 59da3e1c35ee12c1439df9c9c396fb0264ff8153 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 3 Oct 2015 23:05:46 -0500 Subject: [PATCH 056/180] Optimize PFEH Funcs --- .../common/functions/fnc_getTurretIndex.sqf | 24 +++++++------------ addons/common/functions/fnc_timePFH.sqf | 20 +++++++++------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/addons/common/functions/fnc_getTurretIndex.sqf b/addons/common/functions/fnc_getTurretIndex.sqf index b2f28c5f90..050f3e1c4f 100644 --- a/addons/common/functions/fnc_getTurretIndex.sqf +++ b/addons/common/functions/fnc_getTurretIndex.sqf @@ -8,29 +8,23 @@ * Return Value: * Turret Index * + * Example: + * [ace_player] call ace_common_fnc_getTurretIndex + * * Public: Yes */ #include "script_component.hpp" params ["_unit"]; -private ["_vehicle", "_turrets", "_units", "_index"]; - -_vehicle = vehicle _unit; - +local _vehicle = vehicle _unit; if (_unit == _vehicle) exitWith {[]}; -_turrets = allTurrets [_vehicle, true]; - -_units = []; +scopeName "main"; { - _units pushBack (_vehicle turretUnit _x); - false -} count _turrets; + if (_unit == (_vehicle turretUnit _x)) then {_x breakOut "main"}; + nil +} count allTurrets [_vehicle, true]; -_index = _units find _unit; - -if (_index == -1) exitWith {[]}; - -_turrets select _index; +[] diff --git a/addons/common/functions/fnc_timePFH.sqf b/addons/common/functions/fnc_timePFH.sqf index 4f099ea68c..152eceee3f 100644 --- a/addons/common/functions/fnc_timePFH.sqf +++ b/addons/common/functions/fnc_timePFH.sqf @@ -1,26 +1,26 @@ /* - * Author: ? - * ? + * Author: jaynus + * PFEH to set all Ace Time Variables * * Arguments: - * ? + * None * * Return Value: - * ? + * None * - * Public: ? + * Public: No */ #include "script_component.hpp" -private ["_lastTickTime", "_lastGameTime", "_delta"]; +BEGIN_COUNTER(timePFH); -_lastTickTime = ACE_diagTime; -_lastGameTime = ACE_gameTime; +local _lastTickTime = ACE_diagTime; +local _lastGameTime = ACE_gameTime; ACE_gameTime = time; ACE_diagTime = diag_tickTime; -_delta = ACE_diagTime - _lastTickTime; +local _delta = ACE_diagTime - _lastTickTime; if (ACE_gameTime <= _lastGameTime) then { TRACE_1("paused",_delta); @@ -36,3 +36,5 @@ if (ACE_gameTime <= _lastGameTime) then { ACE_virtualTime = ACE_virtualTime + (_delta * accTime); ACE_time = ACE_virtualTime; }; + +END_COUNTER(timePFH); From 0beaa40fbcd1f55209175501b3d9e382166cd755 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 4 Oct 2015 13:52:54 +0100 Subject: [PATCH 057/180] Add API parameter to allow for unforced spectator Adds an optional boolean paremeter to the setSpectator function for forcing the interface. It is forced by default, so if `false` is passed as the value the spectator will be able to close the interface with the escape button. --- addons/spectator/functions/fnc_setSpectator.sqf | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index efa7000b8f..66344e69c6 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -7,7 +7,8 @@ * The spectator interface will be opened/closed * * Arguments: - * 0: Spectator state of local client + * 0: Spectator state of local client (default: true) + * 1: Force interface (default: true) * * Return Value: * None @@ -20,7 +21,7 @@ #include "script_component.hpp" -params [["_set",true,[true]]]; +params [["_set",true,[true]], ["_force",true,[true]]]; // Only clients can be spectators if (!hasInterface) exitWith {}; @@ -75,7 +76,17 @@ if (_set) then { [{ // Create the display (findDisplay 46) createDisplay QGVAR(interface); - }, []] call EFUNC(common,execNextFrame); + + // If not forced, make esc end spectator + if (_this) then { + (findDisplay 12249) displayAddEventHandler ["KeyDown", { + if (_this select 1 == 1) then { + [false] call ace_spectator_fnc_setSpectator; + true + }; + }]; + }; + }, !_force] call EFUNC(common,execNextFrame); // Cache and disable nametag settings if (["ace_nametags"] call EFUNC(common,isModLoaded)) then { From 616bc9f8a0e4e09f387038aba70b3bd1cddd9f11 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 4 Oct 2015 11:38:31 -0500 Subject: [PATCH 058/180] local-private waitAndXX PFEH --- addons/common/XEH_postInit.sqf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 912acce7c4..032b6148be 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -9,11 +9,11 @@ //Singe PFEH to handle execNextFrame, waitAndExec and waitUntilAndExec: [{ - private ["_entry", "_deleted"]; + BEGIN_COUNTER(waitAndExec); //Handle the waitAndExec array: while {!(GVAR(waitAndExecArray) isEqualTo []) && {GVAR(waitAndExecArray) select 0 select 0 <= ACE_Time}} do { - _entry = GVAR(waitAndExecArray) deleteAt 0; + local _entry = GVAR(waitAndExecArray) deleteAt 0; (_entry select 2) call (_entry select 1); }; @@ -29,7 +29,7 @@ GVAR(nextFrameNo) = diag_frameno + 1; //Handle the waitUntilAndExec array: - _deleted = 0; + local _deleted = 0; { // if condition is satisifed call statement if ((_x select 2) call (_x select 0)) then { @@ -39,6 +39,8 @@ (_x select 2) call (_x select 1); }; } forEach GVAR(waitUntilAndExecArray); + + END_COUNTER(waitAndExec); }, 0, []] call CBA_fnc_addPerFrameHandler; From b1dda86cb2fca4d9f87b050b7d291d6bfe8eaade Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 4 Oct 2015 16:08:42 +0100 Subject: [PATCH 059/180] End spectator interface when the mission ends Fixes #2592 (in theory) by forcing spectator closed on mission end --- addons/spectator/XEH_postInit.sqf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/spectator/XEH_postInit.sqf b/addons/spectator/XEH_postInit.sqf index 35b463837f..a9737868a0 100644 --- a/addons/spectator/XEH_postInit.sqf +++ b/addons/spectator/XEH_postInit.sqf @@ -8,3 +8,6 @@ GVAR(availableModes) = [[0,1,2], [1,2], [0], [1], [2]] select GVAR(restrictModes); GVAR(availableVisions) = [[-2,-1,0,1], [-2,-1], [-2,0,1], [-2]] select GVAR(restrictVisions); }] call EFUNC(common,addEventHandler); + +// Should prevent unending spectator on mission end +addMissionEventHandler ["Ended",{ [false] call FUNC(setSpectator) }]; From f0f822b4bcbdb8d572a1c70afc076cbfb8e152c0 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 4 Oct 2015 16:16:01 +0100 Subject: [PATCH 060/180] Decrease default spectator camera speed --- addons/spectator/XEH_preInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf index e26dc27d07..13f2ba1708 100644 --- a/addons/spectator/XEH_preInit.sqf +++ b/addons/spectator/XEH_preInit.sqf @@ -35,7 +35,7 @@ GVAR(camDistance) = 10; GVAR(camMode) = 0; GVAR(camPan) = 0; GVAR(camPos) = ATLtoASL [worldSize * 0.5, worldSize * 0.5, 20]; -GVAR(camSpeed) = 2.5; +GVAR(camSpeed) = 1.5; GVAR(camTilt) = -10; GVAR(camUnit) = objNull; GVAR(camVision) = -2; From 52d703c2ebb1838518241eb298c7063dd87cf828 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 4 Oct 2015 16:19:47 +0100 Subject: [PATCH 061/180] Improve spectator seagull handling Previously they were only hidden, but this didn't account for the annoying audio they play so now they're entirely staged like a spectator unit would be. --- addons/spectator/functions/fnc_respawnTemplate.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/spectator/functions/fnc_respawnTemplate.sqf b/addons/spectator/functions/fnc_respawnTemplate.sqf index d903e3ecc4..4584a1fc3c 100644 --- a/addons/spectator/functions/fnc_respawnTemplate.sqf +++ b/addons/spectator/functions/fnc_respawnTemplate.sqf @@ -34,7 +34,7 @@ _pos = (getPosATL _unit) vectorAdd [0,0,5]; // Enter/exit spectator based on the respawn type and whether killed/respawned if (alive _unit) then { if (_respawn == 1) then { - [_unit,QGVAR(isSeagull)] call EFUNC(common,hideUnit); + [_unit] call FUNC(stageSpectator); [2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes); [true] call FUNC(setSpectator); } else { From c1dc8a6493b140e74a827c04f97c7d8ad073303a Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 4 Oct 2015 18:15:25 +0100 Subject: [PATCH 062/180] Fix spectator 3D icons not rendering Fixes #2676 as per voiperr's suggestion (working with camera can be really strange, I swear this worked before) --- addons/spectator/functions/fnc_transitionCamera.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/spectator/functions/fnc_transitionCamera.sqf b/addons/spectator/functions/fnc_transitionCamera.sqf index edc7fa23a2..80fe873cb0 100644 --- a/addons/spectator/functions/fnc_transitionCamera.sqf +++ b/addons/spectator/functions/fnc_transitionCamera.sqf @@ -50,6 +50,7 @@ if (_newMode == 0) then { // Free // Preserve camUnit value for consistency when manually changing view _camera cameraEffect ["internal", "back"]; showCinemaBorder false; + cameraEffectEnableHUD true; // Apply the camera zoom _camera camSetFov -(linearConversion [0.01,2,GVAR(camZoom),-2,-0.01,true]); @@ -104,6 +105,7 @@ if (_newMode == 0) then { // Free // Switch to the camera _camera cameraEffect ["internal", "back"]; showCinemaBorder false; + cameraEffectEnableHUD true; // Handle camera orbit movement if (isNil QGVAR(camHandler)) then { GVAR(camHandler) = [FUNC(handleCamera), 0] call CBA_fnc_addPerFrameHandler; }; From 4079ca354ed0209844f1032679c7125d1c051aca Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 4 Oct 2015 18:30:07 +0100 Subject: [PATCH 063/180] Update spectator function headers --- addons/spectator/functions/fnc_interrupt.sqf | 2 +- .../functions/fnc_setCameraAttributes.sqf | 17 +++++++++-------- .../spectator/functions/fnc_stageSpectator.sqf | 4 ++-- addons/spectator/functions/fnc_updateUnits.sqf | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/addons/spectator/functions/fnc_interrupt.sqf b/addons/spectator/functions/fnc_interrupt.sqf index 48cca7d102..72bb3eaa32 100644 --- a/addons/spectator/functions/fnc_interrupt.sqf +++ b/addons/spectator/functions/fnc_interrupt.sqf @@ -4,7 +4,7 @@ * * Arguments: * 0: Reason - * 1: Interrupting + * 1: Interrupting (default: true) * * Return Value: * None diff --git a/addons/spectator/functions/fnc_setCameraAttributes.sqf b/addons/spectator/functions/fnc_setCameraAttributes.sqf index dd8dd3ef6a..f908b30b76 100644 --- a/addons/spectator/functions/fnc_setCameraAttributes.sqf +++ b/addons/spectator/functions/fnc_setCameraAttributes.sqf @@ -1,23 +1,24 @@ /* * Author: SilentSpike * Sets the spectator camera attributes as desired + * All values are optional and default to whatever the current value is * * Arguments: - * 0: Camera mode + * 0: Camera mode * - 0: Free * - 1: Internal * - 2: External - * 1: Camera unit (objNull for random) - * 2: Camera vision + * 1: Camera unit (objNull for random) + * 2: Camera vision * - -2: Normal * - -1: Night vision * - 0: Thermal white hot * - 1: Thermal black hot - * 3: Camera position (ATL) - * 4: Camera pan (0 - 360) - * 5: Camera tilt (-90 - 90) - * 6: Camera zoom (0.01 - 2) - * 7: Camera speed in m/s (0.05 - 10) + * 3: Camera position (ATL) + * 4: Camera pan (0 - 360) + * 5: Camera tilt (-90 - 90) + * 6: Camera zoom (0.01 - 2) + * 7: Camera speed in m/s (0.05 - 10) * * Return Value: * None diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf index 7f0d862719..61445f3dd9 100644 --- a/addons/spectator/functions/fnc_stageSpectator.sqf +++ b/addons/spectator/functions/fnc_stageSpectator.sqf @@ -7,8 +7,8 @@ * Upon unstage, units will be moved to the position they were in upon staging * * Arguments: - * 0: Unit to put into spectator stage - * 1: Spectator stage + * 0: Unit to put into spectator stage (default: player) + * 1: Unit should be staged (default: true) * * Return Value: * None diff --git a/addons/spectator/functions/fnc_updateUnits.sqf b/addons/spectator/functions/fnc_updateUnits.sqf index 0297b31b8d..e5b15b6bc1 100644 --- a/addons/spectator/functions/fnc_updateUnits.sqf +++ b/addons/spectator/functions/fnc_updateUnits.sqf @@ -4,7 +4,7 @@ * * Arguments: * 0: Units to add to the whitelist - * 1: Use blacklist + * 1: Use blacklist (default: false) * * Return Value: * None From 780e0aa27079190dc1237e17038c7f2dea960080 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 4 Oct 2015 19:26:53 +0100 Subject: [PATCH 064/180] Add vision mode support to spectator external cam Since external view is actually another camera, vision modes should also apply to it too. --- .../functions/fnc_handleInterface.sqf | 2 +- .../spectator/functions/fnc_handleToolbar.sqf | 7 ++- .../functions/fnc_transitionCamera.sqf | 47 +++++++++---------- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index 7c961071c3..dcba11d2ec 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -238,7 +238,7 @@ switch (toLower _mode) do { GVAR(camBoom) = -0.5 * GVAR(camSpeed) * ([1, 2] select _shift); }; case 49: { // N - if (GVAR(camMode) == 0) then { + if (GVAR(camMode) != 1) then { if (_ctrl) then { [nil,nil,-1] call FUNC(cycleCamera); } else { diff --git a/addons/spectator/functions/fnc_handleToolbar.sqf b/addons/spectator/functions/fnc_handleToolbar.sqf index 878f3e46de..4e79c172bd 100644 --- a/addons/spectator/functions/fnc_handleToolbar.sqf +++ b/addons/spectator/functions/fnc_handleToolbar.sqf @@ -26,8 +26,13 @@ private ["_name","_vision","_fov","_speed","_mode","_time","_toolbar"]; _toolbar = _display displayCtrl IDC_TOOL; // Find all tool values +if (GVAR(camVision) >= 0) then { + _vision = localize LSTRING(VisionThermal); +} else { + _vision = [localize LSTRING(VisionNight), localize LSTRING(VisionNormal)] select (GVAR(camVision) < -1); +}; + if (GVAR(camMode) == 0) then { - _vision = if (GVAR(camVision) >= 0) then {localize LSTRING(VisionThermal)} else { [localize LSTRING(VisionNight), localize LSTRING(VisionNormal)] select (GVAR(camVision) < -1) }; _fov = format ["%1x", floor(GVAR(camZoom) * 100) * 0.01]; _speed = format ["%1 m/s", floor(GVAR(camSpeed) * 100) * 0.01]; } else { diff --git a/addons/spectator/functions/fnc_transitionCamera.sqf b/addons/spectator/functions/fnc_transitionCamera.sqf index 80fe873cb0..0f6eb3ffc7 100644 --- a/addons/spectator/functions/fnc_transitionCamera.sqf +++ b/addons/spectator/functions/fnc_transitionCamera.sqf @@ -49,8 +49,6 @@ if (_newMode == 0) then { // Free // Preserve camUnit value for consistency when manually changing view _camera cameraEffect ["internal", "back"]; - showCinemaBorder false; - cameraEffectEnableHUD true; // Apply the camera zoom _camera camSetFov -(linearConversion [0.01,2,GVAR(camZoom),-2,-0.01,true]); @@ -64,23 +62,6 @@ if (_newMode == 0) then { // Free GVAR(camAgent) switchCamera "internal"; clearRadio; - - // If new vision isn't available then keep current (unless current also isn't) - if !(_newVision in GVAR(availableVisions)) then { - _newVision = GVAR(availableVisions) select ((GVAR(availableVisions) find GVAR(camVision)) max 0); - }; - - // Vision mode only applies to free cam - if (_newVision < 0) then { - false setCamUseTi 0; - camUseNVG (_newVision >= -1); - } else { - true setCamUseTi _newVision; - }; - GVAR(camVision) = _newVision; - - // Handle camera movement - if (isNil QGVAR(camHandler)) then { GVAR(camHandler) = [FUNC(handleCamera), 0] call CBA_fnc_addPerFrameHandler; }; } else { _camera = GVAR(unitCamera); @@ -104,11 +85,6 @@ if (_newMode == 0) then { // Free } else { // Switch to the camera _camera cameraEffect ["internal", "back"]; - showCinemaBorder false; - cameraEffectEnableHUD true; - - // Handle camera orbit movement - if (isNil QGVAR(camHandler)) then { GVAR(camHandler) = [FUNC(handleCamera), 0] call CBA_fnc_addPerFrameHandler; }; }; // Clear radio if group changed @@ -119,4 +95,27 @@ if (_newMode == 0) then { // Free GVAR(camUnit) = _newUnit; }; +if (_newMode in [0,2]) then { + // Set up camera UI + showCinemaBorder false; + cameraEffectEnableHUD true; + + // Handle camera movement + if (isNil QGVAR(camHandler)) then { GVAR(camHandler) = [FUNC(handleCamera), 0] call CBA_fnc_addPerFrameHandler; }; + + // If new vision isn't available then keep current (unless current also isn't) + if !(_newVision in GVAR(availableVisions)) then { + _newVision = GVAR(availableVisions) select ((GVAR(availableVisions) find GVAR(camVision)) max 0); + }; + + // Vision mode applies to free and external cam + if (_newVision < 0) then { + false setCamUseTi 0; + camUseNVG (_newVision >= -1); + } else { + true setCamUseTi _newVision; + }; + GVAR(camVision) = _newVision; +}; + GVAR(camMode) = _newMode; From e6a5d8c9903475c5c18df0c393347c227954986f Mon Sep 17 00:00:00 2001 From: jonpas Date: Wed, 7 Oct 2015 23:00:35 +0200 Subject: [PATCH 065/180] Remove enable optics in adjusted prone stances --- addons/movement/CfgMoves.hpp | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/addons/movement/CfgMoves.hpp b/addons/movement/CfgMoves.hpp index 50d3e3ab2b..6aa22f1a47 100644 --- a/addons/movement/CfgMoves.hpp +++ b/addons/movement/CfgMoves.hpp @@ -114,31 +114,6 @@ class CfgMovesMaleSdr: CfgMovesBasic { leftHandIKCurve[] = {}; }; - // enable optics in prone left and right stance - class AidlPpneMstpSrasWrflDnon_G0S; - class AadjPpneMstpSrasWrflDleft: AidlPpneMstpSrasWrflDnon_G0S { - enableOptics = 1; - }; - class AadjPpneMstpSrasWrflDright: AidlPpneMstpSrasWrflDnon_G0S { - enableOptics = 1; - }; - class AadjPpneMstpSrasWrflDup; - class AadjPpneMstpSrasWrflDdown: AadjPpneMstpSrasWrflDup { - enableOptics = 1; - }; - - class AidlPpneMstpSrasWpstDnon_G0S; - class AadjPpneMstpSrasWpstDleft: AidlPpneMstpSrasWpstDnon_G0S { - enableOptics = 2; - }; - class AadjPpneMstpSrasWpstDright: AidlPpneMstpSrasWpstDnon_G0S { - enableOptics = 2; - }; - class AadjPpneMstpSrasWpstDup; - class AadjPpneMstpSrasWpstDdown: AadjPpneMstpSrasWpstDup { - enableOptics = 2; - }; - // climb animation class AmovPercMstpSnonWnonDnon: StandBase { ConnectTo[] += {"ACE_Climb",0.02}; From f3c4ff66cad70ed547538900b4d904ca78b5a5ff Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 8 Oct 2015 02:51:54 -0500 Subject: [PATCH 066/180] #2701 - Fix gun smoke on AMV --- addons/realisticnames/CfgWeapons.hpp | 4 ++++ addons/vehicles/CfgVehicles.hpp | 2 +- addons/vehicles/CfgWeapons.hpp | 10 +++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/addons/realisticnames/CfgWeapons.hpp b/addons/realisticnames/CfgWeapons.hpp index 83534a1083..205542dd68 100644 --- a/addons/realisticnames/CfgWeapons.hpp +++ b/addons/realisticnames/CfgWeapons.hpp @@ -530,6 +530,10 @@ class CfgWeapons { displayName = "MAG 58"; }; + class ACE_LMG_coax_APC_Wheeled_01: LMG_coax { + displayName = "MAG 58"; + }; + class ACE_LMG_coax_APC_Tracked_03: LMG_coax { displayName = "L94A1"; }; diff --git a/addons/vehicles/CfgVehicles.hpp b/addons/vehicles/CfgVehicles.hpp index a07781a413..559906074d 100644 --- a/addons/vehicles/CfgVehicles.hpp +++ b/addons/vehicles/CfgVehicles.hpp @@ -281,7 +281,7 @@ class CfgVehicles { class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { class Turrets: Turrets { class MainTurret: MainTurret { - weapons[] = {"autocannon_40mm_CTWS","ACE_LMG_coax_MBT_01"}; + weapons[] = {"autocannon_40mm_CTWS", "ACE_LMG_coax_APC_Wheeled_01"}; magazines[] = {"60Rnd_40mm_GPR_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","2000Rnd_762x51_Belt_Green"}; }; }; diff --git a/addons/vehicles/CfgWeapons.hpp b/addons/vehicles/CfgWeapons.hpp index 76feb1818a..0f5ad77e7a 100644 --- a/addons/vehicles/CfgWeapons.hpp +++ b/addons/vehicles/CfgWeapons.hpp @@ -6,7 +6,15 @@ class CfgWeapons { class LMG_coax; class ACE_LMG_coax_MBT_01: LMG_coax {}; - class ACE_LMG_coax_APC_Tracked_03: LMG_coax {}; + class ACE_LMG_coax_APC_Wheeled_01: LMG_coax { + class GunParticles { + class effect1 { + positionName = "usti hlavne2"; + directionName = "konec hlavne2"; + effectName = "MachineGunCloud"; + }; + }; + }; class LMG_Minigun: LMG_RCWS { magazines[] = {"1000Rnd_65x39_Belt","1000Rnd_65x39_Belt_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Red","1000Rnd_65x39_Belt_Tracer_Yellow","1000Rnd_65x39_Belt_Yellow","2000Rnd_65x39_Belt","2000Rnd_65x39_Belt_Green","2000Rnd_65x39_Belt_Tracer_Green","2000Rnd_65x39_Belt_Tracer_Green_Splash","2000Rnd_65x39_Belt_Tracer_Red","2000Rnd_65x39_Belt_Tracer_Yellow","2000Rnd_65x39_Belt_Tracer_Yellow_Splash","2000Rnd_65x39_Belt_Yellow","2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","200Rnd_65x39_Belt","200Rnd_65x39_Belt_Tracer_Green","200Rnd_65x39_Belt_Tracer_Red","200Rnd_65x39_Belt_Tracer_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt"}; From 7258bc5efc14e8c1851d67bbb46d2a9d88d1ba06 Mon Sep 17 00:00:00 2001 From: jonpas Date: Thu, 8 Oct 2015 17:55:54 +0200 Subject: [PATCH 067/180] Fix link in deploy tool --- tools/deploy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/deploy.py b/tools/deploy.py index ff2d499d9f..c6e96f85f3 100755 --- a/tools/deploy.py +++ b/tools/deploy.py @@ -17,7 +17,7 @@ from pygithub3 import Github TRANSLATIONISSUE = 367 TRANSLATIONBODY = """**How to translate ACE3:** -https://github.com/acemod/ACE3/blob/master/documentation/development/how-to-translate-ace3.md +http://ace3mod.com/wiki/development/how-to-translate-ace3.html {} """ From 8cbd57309317a62ff8fe640ab1c226561ec27c38 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Thu, 8 Oct 2015 19:20:17 +0200 Subject: [PATCH 068/180] Update README_DE.md --- docs/README_DE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index b08dddcc1e..4e09c46108 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -73,7 +73,7 @@ Wenn du bei der Entwicklung der MOD mithelfen möchtest kannst du dies tun, inde Um einen Fehler, Anregungen oder neue Funktionalitäten uns mitzuteilen: Nutze unseren [Issue Tracker](https://github.com/acemod/ACE3/issues). Besuche auch: - [Wie kann ich ein Problem melden](http://ace3mod.com/wiki/user/how-to-report-an-issue.html) -- [Wie kann ich ein Wunsch zu einer neuen Funktion mitteilen? ](http://ace3mod.com/wiki/user/how-to-make-a-feature-request.html) +- [Wie kann ich ein Wunsch zu einer neuen Funktion mitteilen?](http://ace3mod.com/wiki/user/how-to-make-a-feature-request.html) #### Testen & MOD erstellen Wenn du die neusten Entwicklungen erleben und uns dabei helfen möchtest bestehende Fehler zu entdecken, lade dir einfach die "Master Branch" herunter. Entweder nutzt du [Git](https://help.github.com/articles/fetching-a-remote/) - wenn die Schritte bekannt sind - oder du lädst es dir direkt über [diesen Link](https://github.com/acemod/ACE3/archive/master.zip) herunter. From 4b7f281eba530167bc1093e9750fbc25c3df11e3 Mon Sep 17 00:00:00 2001 From: jonpas Date: Thu, 8 Oct 2015 20:30:54 +0200 Subject: [PATCH 069/180] Fix slacking badge links, Add Travis CI build badge --- README.md | 7 +++++-- docs/README_DE.md | 7 +++++-- docs/README_PL.md | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5a01e5d5de..c3d4c1389f 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,11 @@ ACE3 License - - ACE3 Slack + + ACE3 Slack + + + ACE3 CI Status (master branch)

Requires the latest version of CBA A3. Visit us on Facebook | YouTube | Twitter | Reddit

diff --git a/docs/README_DE.md b/docs/README_DE.md index 9921bf3fc6..6f45df8b81 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -17,8 +17,11 @@ ACE3 License - - ACE3 Slack + + ACE3 Slack + + + ACE3 CI Status (master branch)

Benötigt die aktuellste Version von CBA A3. Besucht uns auf Facebook | YouTube | Twitter | Reddit

diff --git a/docs/README_PL.md b/docs/README_PL.md index aa7023a9e4..bf31f0e3b9 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -17,8 +17,11 @@ ACE3 Licencja - - ACE3 Slack + + ACE3 Slack + + + ACE3 CI Status (master branch)

Wymaga najnowszej wersji CBA A3. Odwiedź nas na Facebook | YouTube | Twitter | Reddit

From 7efcc3b8d180f95e2a99abd1b19eff056a34f05b Mon Sep 17 00:00:00 2001 From: jonpas Date: Thu, 8 Oct 2015 20:33:20 +0200 Subject: [PATCH 070/180] Update version and download size --- README.md | 2 +- docs/README_DE.md | 4 ++-- docs/README_PL.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c3d4c1389f..f5a5e5a948 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ACE3 Version - ACE3 Download + ACE3 Download ACE3 Issues diff --git a/docs/README_DE.md b/docs/README_DE.md index 6f45df8b81..849a75a692 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -3,10 +3,10 @@

- ACE3 Version + ACE3 Version - ACE3 Download + ACE3 Download ACE3 Issues diff --git a/docs/README_PL.md b/docs/README_PL.md index bf31f0e3b9..b623d90c11 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -3,10 +3,10 @@

- ACE3 Wersja + ACE3 Wersja - ACE3 Pobierz + ACE3 Pobierz ACE3 Zagadnienia From 7c101bde8757a48d9df44644168799d971c18d78 Mon Sep 17 00:00:00 2001 From: jonpas Date: Thu, 8 Oct 2015 21:01:06 +0200 Subject: [PATCH 071/180] Change build badge tooltip --- README.md | 2 +- docs/README_DE.md | 2 +- docs/README_PL.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f5a5e5a948..fc02b56898 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ ACE3 Slack - ACE3 CI Status (master branch) + ACE3 Build Status

Requires the latest version of CBA A3. Visit us on Facebook | YouTube | Twitter | Reddit

diff --git a/docs/README_DE.md b/docs/README_DE.md index 849a75a692..97dd500019 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -21,7 +21,7 @@ ACE3 Slack - ACE3 CI Status (master branch) + ACE3 Build Status

Benötigt die aktuellste Version von CBA A3. Besucht uns auf Facebook | YouTube | Twitter | Reddit

diff --git a/docs/README_PL.md b/docs/README_PL.md index b623d90c11..13ec07b395 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -21,7 +21,7 @@ ACE3 Slack - ACE3 CI Status (master branch) + ACE3 Build Status

Wymaga najnowszej wersji CBA A3. Odwiedź nas na Facebook | YouTube | Twitter | Reddit

From fc7230359f6da4a8e624012169e191be08e1af4a Mon Sep 17 00:00:00 2001 From: jonpas Date: Thu, 8 Oct 2015 21:58:02 +0200 Subject: [PATCH 072/180] Remove redundant variables (left-over from deploy wiki to gh-pages) --- tools/deploy.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/deploy.py b/tools/deploy.py index c6e96f85f3..0b3a730470 100755 --- a/tools/deploy.py +++ b/tools/deploy.py @@ -26,9 +26,6 @@ REPOUSER = "acemod" REPONAME = "ACE3" REPOPATH = "{}/{}".format(REPOUSER,REPONAME) -USERNAME = "ACE3 Travis" -USEREMAIL = "travis@ace3mod.com" - def update_translations(token): diag = sp.check_output(["python3", "tools/stringtablediag.py", "--markdown"]) From 01a39e7db5438ed7413de77046bf0c3f7441c02d Mon Sep 17 00:00:00 2001 From: jonpas Date: Thu, 8 Oct 2015 23:53:21 +0200 Subject: [PATCH 073/180] Update badges --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fc02b56898..3aa6ae6af7 100644 --- a/README.md +++ b/README.md @@ -6,22 +6,22 @@ ACE3 Version - ACE3 Download + ACE3 Download - ACE3 Issues + ACE3 Issues BIF Thread - ACE3 License + ACE3 License ACE3 Slack - ACE3 Build Status + ACE3 Build Status

Requires the latest version of CBA A3. Visit us on Facebook | YouTube | Twitter | Reddit

From e5a7516ec14137f12f992bec07fdcc4d7829405e Mon Sep 17 00:00:00 2001 From: jonpas Date: Thu, 8 Oct 2015 23:54:44 +0200 Subject: [PATCH 074/180] Non-English as well --- docs/README_DE.md | 8 ++++---- docs/README_PL.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index 97dd500019..5c82cc5097 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -6,22 +6,22 @@ ACE3 Version - ACE3 Download + ACE3 Download - ACE3 Issues + ACE3 Issues BIF Thread - ACE3 License + ACE3 License ACE3 Slack - ACE3 Build Status + ACE3 Build Status

Benötigt die aktuellste Version von CBA A3. Besucht uns auf Facebook | YouTube | Twitter | Reddit

diff --git a/docs/README_PL.md b/docs/README_PL.md index 13ec07b395..6447e4b5b9 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -6,22 +6,22 @@ ACE3 Wersja - ACE3 Pobierz + ACE3 Pobierz - ACE3 Zagadnienia + ACE3 Zagadnienia Temat BIF - ACE3 Licencja + ACE3 Licencja ACE3 Slack - ACE3 Build Status + ACE3 Build Status

Wymaga najnowszej wersji CBA A3. Odwiedź nas na Facebook | YouTube | Twitter | Reddit

From 36895d2e305de104e14f217e769b52601e330f0c Mon Sep 17 00:00:00 2001 From: jonpas Date: Fri, 9 Oct 2015 00:23:36 +0200 Subject: [PATCH 075/180] Update more version numbers --- docs/README_DE.md | 2 +- docs/README_PL.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index 5c82cc5097..24be427392 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -5,7 +5,7 @@ ACE3 Version - + ACE3 Download diff --git a/docs/README_PL.md b/docs/README_PL.md index 6447e4b5b9..b12f574b6f 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -5,7 +5,7 @@ ACE3 Wersja - + ACE3 Pobierz From 326d5495104ae02caeee04a05c11c7e7a3dcad14 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 8 Oct 2015 20:32:14 -0500 Subject: [PATCH 076/180] #2696 - Rangecard check bounds before select --- .../functions/fnc_calculateAmmoTemperatureVelocityShift.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf index 8b0c78e86c..fefdbb16e4 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf @@ -18,7 +18,8 @@ private ["_muzzleVelocityShiftTableUpperLimit", "_temperatureIndexFunction", "_temperatureIndexA", "_temperatureIndexB", "_interpolationRatio"]; params["_muzzleVelocityShiftTable", "_temperature"]; -// Check if muzzleVelocityShiftTable is Larger Than 11 Entrys +// Check if muzzleVelocityShiftTable is Less Than 11 Entrys +if ((count _muzzleVelocityShiftTable) < 11) exitWith {0}; _muzzleVelocityShiftTableUpperLimit = _muzzleVelocityShiftTable select 10; if (isNil "_muzzleVelocityShiftTableUpperLimit") exitWith { 0 }; From f8ca3693fd49d92ef43e8be66d9952b683d9cf7c Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 8 Oct 2015 21:22:00 -0500 Subject: [PATCH 077/180] #2709 - Fix AB handleFired _muzzleVelocityShift --- .../functions/fnc_handleFired.sqf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index d97c9b952a..8d9cb73509 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -24,12 +24,12 @@ if (!hasInterface) exitWith {}; if (!GVAR(enabled)) exitWith {}; // Parameterization -private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_barrelTwist", "_stabilityFactor"]; +private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletLength", "_barrelTwist", "_stabilityFactor", "_aceTimeSecond", "_barrelVelocityShift", "_ammoTemperatureVelocityShift"]; + params ["_unit", "_weapon", "", "_mode", "_ammo", "_magazine", "_bullet"]; _abort = false; - if (!(_ammo isKindOf "BulletBase")) exitWith {}; if (!alive _bullet) exitWith {}; if (!([_unit] call EFUNC(common,isPlayer))) exitWith {}; @@ -75,22 +75,22 @@ _WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"]; _bulletVelocity = velocity _bullet; _muzzleVelocity = vectorMagnitude _bulletVelocity; +_barrelVelocityShift = 0; if (GVAR(barrelLengthInfluenceEnabled)) then { - _barrelVelocityShift = uiNamespace getVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],nil]; - if (isNil "_barrelVelocityShift") then { - _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift); - uiNamespace setVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],_muzzleVelocityShift]; - }; + _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift); }; +_ammoTemperatureVelocityShift = 0; if (GVAR(ammoTemperatureEnabled)) then { _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); - _temperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift)); + _ammoTemperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift)); }; if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then { + _muzzleVelocityShift = _barrelVelocityShift + _ammoTemperatureVelocityShift; + TRACE_4("shift",_muzzleVelocity,_muzzleVelocityShift, _barrelVelocityShift, _ammoTemperatureVelocityShift); if (_muzzleVelocityShift != 0) then { - _muzzleVelocity = _muzzleVelocity + (_barrelVelocityShift + _ammoTemperatureVelocityShift); + _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift)); _bullet setVelocity _bulletVelocity; }; From f2c66240caaac717bb75fde2b1962356bfe006d2 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 8 Oct 2015 22:32:07 -0500 Subject: [PATCH 078/180] #2717 - Cleanup Coax Weapon Mempoints --- addons/realisticnames/CfgWeapons.hpp | 10 ++++------ addons/vehicles/CfgVehicles.hpp | 14 +++++++------- addons/vehicles/CfgWeapons.hpp | 14 ++++++++++++-- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/addons/realisticnames/CfgWeapons.hpp b/addons/realisticnames/CfgWeapons.hpp index 205542dd68..2adff28a41 100644 --- a/addons/realisticnames/CfgWeapons.hpp +++ b/addons/realisticnames/CfgWeapons.hpp @@ -525,16 +525,14 @@ class CfgWeapons { class LMG_coax: LMG_RCWS { displayName = "PKT"; }; - - class ACE_LMG_coax_MBT_01: LMG_coax { + // class ACE_LMG_coax_PKT_mem2: LMG_coax {}; + class ACE_LMG_coax_MAG58_mem2: LMG_coax { displayName = "MAG 58"; }; - - class ACE_LMG_coax_APC_Wheeled_01: LMG_coax { + class ACE_LMG_coax_MAG58_mem3: LMG_coax { displayName = "MAG 58"; }; - - class ACE_LMG_coax_APC_Tracked_03: LMG_coax { + class ACE_LMG_coax_L94A1_mem3: LMG_coax { displayName = "L94A1"; }; diff --git a/addons/vehicles/CfgVehicles.hpp b/addons/vehicles/CfgVehicles.hpp index 559906074d..e1f7295865 100644 --- a/addons/vehicles/CfgVehicles.hpp +++ b/addons/vehicles/CfgVehicles.hpp @@ -91,7 +91,7 @@ class CfgVehicles { class O_APC_Tracked_02_cannon_F: O_APC_Tracked_02_base_F { class Turrets: Turrets { class MainTurret: MainTurret { - weapons[] = {"autocannon_30mm_CTWS","ACE_LMG_coax_MBT_01","missiles_titan"}; + weapons[] = {"autocannon_30mm_CTWS","ACE_LMG_coax_PKT_mem2","missiles_titan"}; magazines[] = {"140Rnd_30mm_MP_shells_Tracer_Green","60Rnd_30mm_APFSDS_shells_Tracer_Green","2000Rnd_762x51_Belt_Green","2Rnd_GAT_missiles"}; }; }; @@ -101,7 +101,7 @@ class CfgVehicles { fuelCapacity = 660 * FUEL_FACTOR; class Turrets: Turrets { class MainTurret: MainTurret { - weapons[] = {"autocannon_30mm","ACE_LMG_coax_APC_Tracked_03"}; + weapons[] = {"autocannon_30mm","ACE_LMG_coax_L94A1_mem3"}; magazines[] = {"140Rnd_30mm_MP_shells_Tracer_Yellow","60Rnd_30mm_APFSDS_shells_Tracer_Yellow","1000Rnd_762x51_Belt_Yellow","1000Rnd_762x51_Belt_Yellow"}; class Turrets: Turrets { class CommanderOptics: CommanderOptics {}; @@ -114,7 +114,7 @@ class CfgVehicles { fuelCapacity = 550 * FUEL_FACTOR; class Turrets: Turrets { class MainTurret: MainTurret { - weapons[] = {"cannon_120mm_long","ACE_LMG_coax_MBT_01"}; + weapons[] = {"cannon_120mm_long","ACE_LMG_coax_MAG58_mem3"}; magazines[] = {"28Rnd_120mm_APFSDS_shells_Tracer_Yellow","14Rnd_120mm_HE_shells_Tracer_Yellow","2000Rnd_762x51_Belt_Yellow","2000Rnd_762x51_Belt_Yellow"}; class Turrets: Turrets { class CommanderOptics: CommanderOptics {}; @@ -127,7 +127,7 @@ class CfgVehicles { fuelCapacity = 500 * FUEL_FACTOR; class Turrets: Turrets { class MainTurret: MainTurret { - weapons[] = {"cannon_120mm","ACE_LMG_coax_MBT_01"}; + weapons[] = {"cannon_120mm","ACE_LMG_coax_MAG58_mem2"}; magazines[] = {"32Rnd_120mm_APFSDS_shells_Tracer_Red","16Rnd_120mm_HE_shells_Tracer_Red","2000Rnd_762x51_Belt_Green","2000Rnd_762x51_Belt_Green"}; class Turrets: Turrets { class CommanderOptics: CommanderOptics {}; @@ -281,7 +281,7 @@ class CfgVehicles { class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { class Turrets: Turrets { class MainTurret: MainTurret { - weapons[] = {"autocannon_40mm_CTWS", "ACE_LMG_coax_APC_Wheeled_01"}; + weapons[] = {"autocannon_40mm_CTWS", "ACE_LMG_coax_MAG58_mem2"}; magazines[] = {"60Rnd_40mm_GPR_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","2000Rnd_762x51_Belt_Green"}; }; }; @@ -301,7 +301,7 @@ class CfgVehicles { class B_MBT_01_TUSK_F: B_MBT_01_cannon_F { class Turrets: Turrets { class MainTurret: MainTurret { - weapons[] = {"cannon_105mm","ACE_LMG_coax_MBT_01"}; + weapons[] = {"cannon_105mm","ACE_LMG_coax_MAG58_mem2"}; magazines[] = {"40Rnd_105mm_APFSDS_T_Red","20Rnd_105mm_HEAT_MP_T_Red","2000Rnd_762x51_Belt_Green","2000Rnd_762x51_Belt_Green"}; class Turrets: Turrets { class CommanderOptics: CommanderOptics {}; @@ -326,7 +326,7 @@ class CfgVehicles { class I_APC_Wheeled_03_cannon_F: I_APC_Wheeled_03_base_F { class Turrets: Turrets { class MainTurret: MainTurret { - weapons[] = {"autocannon_30mm_CTWS","ACE_LMG_coax_MBT_01","missiles_titan"}; + weapons[] = {"autocannon_30mm_CTWS","ACE_LMG_coax_MAG58_mem2","missiles_titan"}; magazines[] = {"140Rnd_30mm_MP_shells_Tracer_Yellow","60Rnd_30mm_APFSDS_shells_Tracer_Yellow","2000Rnd_762x51_Belt_Yellow","2Rnd_GAT_missiles"}; }; }; diff --git a/addons/vehicles/CfgWeapons.hpp b/addons/vehicles/CfgWeapons.hpp index 0f5ad77e7a..5cb30518d9 100644 --- a/addons/vehicles/CfgWeapons.hpp +++ b/addons/vehicles/CfgWeapons.hpp @@ -5,8 +5,18 @@ class CfgWeapons { class LMG_RCWS: MGun {}; class LMG_coax; - class ACE_LMG_coax_MBT_01: LMG_coax {}; - class ACE_LMG_coax_APC_Wheeled_01: LMG_coax { + class ACE_LMG_coax_L94A1_mem3: LMG_coax {}; + class ACE_LMG_coax_PKT_mem2: LMG_coax { + class GunParticles { + class effect1 { + positionName = "usti hlavne2"; + directionName = "konec hlavne2"; + effectName = "MachineGunCloud"; + }; + }; + }; + class ACE_LMG_coax_MAG58_mem3: LMG_coax {}; + class ACE_LMG_coax_MAG58_mem2: LMG_coax { class GunParticles { class effect1 { positionName = "usti hlavne2"; From 15cba66b9b3ca3f04ee9d39ab929f7c3522f826c Mon Sep 17 00:00:00 2001 From: jonpas Date: Fri, 9 Oct 2015 20:49:23 +0200 Subject: [PATCH 079/180] Fix spelling of separate in LICENSE --- LICENSE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 01832682d7..037f1df2f3 100644 --- a/LICENSE +++ b/LICENSE @@ -22,13 +22,13 @@ source code of the individual modules. When publishing a derivative of this product you may not use a name that might create the impression that your version is an official release. -Some folders of this project may contain a seperate LICENSE file. Should +Some folders of this project may contain a separate LICENSE file. Should that be the case, everything in that folder and all subfolders is subject to that license instead. ============================================================================ - Full Gnu General Public License Text + Full GNU General Public License Text ============================================================================ From 53f833b68cafb9d29629d98984f7657374873e58 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 10 Oct 2015 00:19:09 -0500 Subject: [PATCH 080/180] #2702 - Cargo: Make "Supply Box" pallets heavy --- addons/cargo/CfgVehicles.hpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index ccc23a99aa..1fae56749f 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -218,6 +218,24 @@ class CfgVehicles { GVAR(size) = 2; // 1 = small, 2 = large GVAR(canLoad) = 1; }; + //"Supply Box" - Small Pallets + class B_supplyCrate_F: ReammoBox_F { + GVAR(size) = 6; + }; + class O_supplyCrate_F: ReammoBox_F { + GVAR(size) = 6; + }; + class I_supplyCrate_F: ReammoBox_F { + GVAR(size) = 6; + }; + class IG_supplyCrate_F: ReammoBox_F { + GVAR(size) = 6; + }; + class C_supplyCrate_F: ReammoBox_F { + GVAR(size) = 6; + }; + + class Scrapyard_base_F; class Land_PaperBox_closed_F: Scrapyard_base_F { @@ -425,5 +443,5 @@ class CfgVehicles { selection = ""; }; }; - }; + }; }; From 4ba0d72bfd9ba9ebc997f5612fe932166c28e8e3 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 10 Oct 2015 23:09:52 -0500 Subject: [PATCH 081/180] #2580 (1) - Fix bandages always created at terrain level. --- addons/medical/functions/fnc_createLitter.sqf | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index c234574abc..54fd6694dd 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -45,12 +45,9 @@ _createLitter = { if(surfaceIsWater (getPos _unit)) exitWith { false }; _position = getPosATL _unit; - _position params ["_posX", "_posY"]; - _position = if (random(1) >= 0.5) then { - [_posX + random 1, _posY + random 1, 0] - } else { - [_posX - random 1, _posY - random 1, 0]; - }; + _position params ["_posX", "_posY", "_posZ"]; + _position = [_posX + (random 2) - 1, _posY + (random 2) - 1, _posZ]; + _direction = (random 360); // Create the litter, and timeout the event based on the cleanup delay From 33be10126ee7e74411b1b542b095b37414f8e6c6 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 11 Oct 2015 15:01:02 +0200 Subject: [PATCH 082/180] Improve travis yml - Add slack integration - Change the deploy.py to only run on pushes to the master branch - Change email notifications to only mail once on failure --- .travis.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0aadd9cd0b..0506cc0952 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,13 +3,26 @@ branches: - master language: python python: - - "3.4" +- '3.4' before_script: - - pip install pygithub - - pip install pygithub3 +- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then + pip install pygithub; + pip install pygithub3; + fi script: - - python3 tools/deploy.py - - python3 tools/sqf_validator.py +- python3 tools/sqf_validator.py +- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then + python3 tools/deploy.py; + fi env: global: - - secure: "KcJQbknBOdC5lA4nFGKPXVRVIGLDXDRzC8XkHuXJCE9pIR/wbxbkvx8fHKcC6SC9eHgzneC3+o4m4+CjIbVvIwDgslRbJ8Y59i90ncONmdoRx1HUYHwuYWVZm9HJFjCsIbrEqhSyyKS+PB3WZVOLbErtNHsgS8f43PTh5Ujg7Vg=" + - secure: KcJQbknBOdC5lA4nFGKPXVRVIGLDXDRzC8XkHuXJCE9pIR/wbxbkvx8fHKcC6SC9eHgzneC3+o4m4+CjIbVvIwDgslRbJ8Y59i90ncONmdoRx1HUYHwuYWVZm9HJFjCsIbrEqhSyyKS+PB3WZVOLbErtNHsgS8f43PTh5Ujg7Vg= +notifications: + slack: + secure: aWYF/YX7vxEdXJ5w1jhYJQ2TtTP2NRdnXzJDMYXTv2dlXYhO9qp2qjxDGW3dezuPY7B1mPBgebfSKRx3Robkt1rAfEwPWivOiEztL30rwzOy+5Q1wpORv1JkvTC/q2wqQzxQCU/FPVjD2GkF1wtq1Rnx3ESWD8gbvzYoMNdIw1g= + on_success: change + on_failure: always + on_start: never + email: + on_success: never + on_failure: change From 8e9c2754fdb2e1bc72384bf5adf36c7330e6d86f Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 11 Oct 2015 15:01:31 +0200 Subject: [PATCH 083/180] Change translation guide link in translations issue to markdown - Change from @Jonpas --- tools/deploy.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/deploy.py b/tools/deploy.py index 0b3a730470..2bc894176d 100755 --- a/tools/deploy.py +++ b/tools/deploy.py @@ -16,8 +16,7 @@ from pygithub3 import Github TRANSLATIONISSUE = 367 -TRANSLATIONBODY = """**How to translate ACE3:** -http://ace3mod.com/wiki/development/how-to-translate-ace3.html +TRANSLATIONBODY = """**[ACE3 Translation Guide](http://ace3mod.com/wiki/development/how-to-translate-ace3.html)** {} """ From fe7f8e66f73268f9f33491f174a41e3aedb41cef Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 11 Oct 2015 15:23:22 +0200 Subject: [PATCH 084/180] Add slack notification for ace3public dev channel --- .travis.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0506cc0952..6063d59b34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,16 @@ branches: only: - - master + - master language: python python: - '3.4' before_script: -- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then - pip install pygithub; - pip install pygithub3; - fi +- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" + == "false" ]; then pip install pygithub; pip install pygithub3; fi script: - python3 tools/sqf_validator.py -- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then - python3 tools/deploy.py; - fi +- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" + == "false" ]; then python3 tools/deploy.py; fi env: global: - secure: KcJQbknBOdC5lA4nFGKPXVRVIGLDXDRzC8XkHuXJCE9pIR/wbxbkvx8fHKcC6SC9eHgzneC3+o4m4+CjIbVvIwDgslRbJ8Y59i90ncONmdoRx1HUYHwuYWVZm9HJFjCsIbrEqhSyyKS+PB3WZVOLbErtNHsgS8f43PTh5Ujg7Vg= @@ -23,6 +20,8 @@ notifications: on_success: change on_failure: always on_start: never + rooms: + secure: MvxmqL1NGwiGTVv6uIVTM7jeNLQH95KYtTgSWlXaSw4jdjnf4cmrb/ofHQ3FHhhNVdhRN6W8n0cJfTC3DBZ90bionVh+528qw2mDnDbKljVdIwmoFSexBcH7H1uTLF3gsEz0tbrHtLcnAyTMxdjsdIXDLZ5hwxABNmW5/03jOgs= email: on_success: never on_failure: change From 51c4b2b89518ccf58bba7610c2826d179e7dbd7d Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 11 Oct 2015 15:26:06 +0200 Subject: [PATCH 085/180] Fix formatting of script --- .travis.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6063d59b34..313b0a11c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,12 +5,15 @@ language: python python: - '3.4' before_script: -- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" - == "false" ]; then pip install pygithub; pip install pygithub3; fi +- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then + pip install pygithub; + pip install pygithub3; + fi script: - python3 tools/sqf_validator.py -- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" - == "false" ]; then python3 tools/deploy.py; fi +- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then + python3 tools/deploy.py; + fi env: global: - secure: KcJQbknBOdC5lA4nFGKPXVRVIGLDXDRzC8XkHuXJCE9pIR/wbxbkvx8fHKcC6SC9eHgzneC3+o4m4+CjIbVvIwDgslRbJ8Y59i90ncONmdoRx1HUYHwuYWVZm9HJFjCsIbrEqhSyyKS+PB3WZVOLbErtNHsgS8f43PTh5Ujg7Vg= From afb28d01eab012adbd81b32f4a110254894a5cf4 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 11 Oct 2015 17:25:53 +0200 Subject: [PATCH 086/180] Improve sqf validator - fix not all string cases were caught - add basic semi column validation after code blocks - Improve print output - Fix a dot in file path when reporting an error --- tools/sqf_validator.py | 94 +++++++++++++++++++++++++++++++++--------- 1 file changed, 75 insertions(+), 19 deletions(-) diff --git a/tools/sqf_validator.py b/tools/sqf_validator.py index e4af90f50f..7d1780c5e0 100644 --- a/tools/sqf_validator.py +++ b/tools/sqf_validator.py @@ -6,6 +6,16 @@ import ntpath import sys import argparse +def validKeyWordAfterCode(content, index): + keyWords = ["for", "do", "count", "each", "forEach", "else", "and", "not", "isEqualTo", "in", "call", "spawn", "execVM", "catch"]; + for word in keyWords: + try: + subWord = content.index(word, index, index+len(word)) + return True; + except: + pass + return False + def check_sqf_syntax(filepath): bad_count_file = 0 def pushClosing(t): @@ -17,61 +27,96 @@ def check_sqf_syntax(filepath): with open(filepath, 'r') as file: content = file.read() + + # Store all brackets we find in this file, so we can validate everything on the end brackets_list = [] + # To check if we are in a comment block isInCommentBlock = False checkIfInComment = False + # Used in case we are in a line comment (//) ignoreTillEndOfLine = False + # Used in case we are in a comment block (/* */). This is true if we detect a * inside a comment block. + # If the next character is a /, it means we end our comment block. checkIfNextIsClosingBlock = False - isInString = False + # We ignore everything inside a string + isInString = False + # Used to store the starting type of a string, so we can match that to the end of a string + inStringType = ''; + + lastIsCurlyBrace = False + checkForSemiColumn = False + + # Extra information so we know what line we find errors at lineNumber = 0 + indexOfCharacter = 0 + # Parse all characters in the content of this file to search for potential errors for c in content: - if c == '\n': + if (lastIsCurlyBrace): + lastIsCurlyBrace = False + checkForSemiColumn = True + + if c == '\n': # Keeping track of our line numbers lineNumber += 1 # so we can print accurate line number information when we detect a possible error - if (isInString): + if (isInString): # while we are in a string, we can ignore everything else, except the end of the string if (c == inStringType): isInString = False - elif (isInCommentBlock == False): # if we are not in a comment block, we will check if we are at the start of one or count the () {} and [] - if (checkIfInComment): # This means we have encountered a /, so we are now checking if this is an inline comment or a comment block + # if we are not in a comment block, we will check if we are at the start of one or count the () {} and [] + elif (isInCommentBlock == False): + + # This means we have encountered a /, so we are now checking if this is an inline comment or a comment block + if (checkIfInComment): checkIfInComment = False if c == '*': # if the next character after / is a *, we are at the start of a comment block isInCommentBlock = True - if (c == '/'): # Otherwise, will check if we are in an line comment + elif (c == '/'): # Otherwise, will check if we are in an line comment ignoreTillEndOfLine = True # and an line comment is a / followed by another / (//) We won't care about anything that comes after it + if (isInCommentBlock == False): if (ignoreTillEndOfLine): # we are in a line comment, just continue going through the characters until we find an end of line if (c == '\n'): ignoreTillEndOfLine = False - else: - if (c == '"'): + else: # validate brackets + if (c == '"' or c == "'"): isInString = True inStringType = c + elif (c == '#'): + ignoreTillEndOfLine = True elif (c == '/'): checkIfInComment = True elif (c == '('): brackets_list.append('(') elif (c == ')'): if (brackets_list[-1] in ['{', '[']): - print("Possible missing round bracket ')' detected at {0} Line number: {1}".format(filepath,lineNumber)) + print("ERROR: Possible missing round bracket ')' detected at {0} Line number: {1}".format(filepath,lineNumber)) bad_count_file += 1 brackets_list.append(')') elif (c == '['): brackets_list.append('[') elif (c == ']'): if (brackets_list[-1] in ['{', '(']): - print("Possible missing square bracket ']' detected at {0} Line number: {1}".format(filepath,lineNumber)) + print("ERROR: Possible missing square bracket ']' detected at {0} Line number: {1}".format(filepath,lineNumber)) bad_count_file += 1 brackets_list.append(']') elif (c == '{'): brackets_list.append('{') elif (c == '}'): + lastIsCurlyBrace = True if (brackets_list[-1] in ['(', '[']): - print("Possible missing curly brace '}}' detected at {0} Line number: {1}".format(filepath,lineNumber)) + print("ERROR: Possible missing curly brace '}}' detected at {0} Line number: {1}".format(filepath,lineNumber)) bad_count_file += 1 brackets_list.append('}') - else: + + if (checkForSemiColumn): + if (c not in [' ', '\t', '\n', '/']): # keep reading until no white space or comments + checkForSemiColumn = False + if (c not in [']', ')', '}', ';', ',', '&', '!', '|', '='] and not validKeyWordAfterCode(content, indexOfCharacter)): # , 'f', 'd', 'c', 'e', 'a', 'n', 'i']): + print("ERROR: Possible missing semi-column ':' detected at {0} Line number: {1}".format(filepath,lineNumber)) + bad_count_file += 1 + + else: # Look for the end of our comment block if (c == '*'): checkIfNextIsClosingBlock = True; elif (checkIfNextIsClosingBlock): @@ -79,39 +124,50 @@ def check_sqf_syntax(filepath): isInCommentBlock = False elif (c != '*'): checkIfNextIsClosingBlock = False + indexOfCharacter += 1 if brackets_list.count('[') != brackets_list.count(']'): - print("A possible missing square bracket [ or ] in file {0} [ = {1} ] = {2}".format(filepath,brackets_list.count('['),brackets_list.count(']'))) + print("ERROR: A possible missing square bracket [ or ] in file {0} [ = {1} ] = {2}".format(filepath,brackets_list.count('['),brackets_list.count(']'))) bad_count_file += 1 if brackets_list.count('(') != brackets_list.count(')'): - print("A possible missing round bracket ( or ) in file {0} ( = {1} ) = {2}".format(filepath,brackets_list.count('('),brackets_list.count(')'))) + print("ERROR: A possible missing round bracket ( or ) in file {0} ( = {1} ) = {2}".format(filepath,brackets_list.count('('),brackets_list.count(')'))) bad_count_file += 1 if brackets_list.count('{') != brackets_list.count('}'): - print("A possible missing curly brace {{ or }} in file {0} {{ = {1} }} = {2}".format(filepath,brackets_list.count('{'),brackets_list.count('}'))) + print("ERROR: A possible missing curly brace {{ or }} in file {0} {{ = {1} }} = {2}".format(filepath,brackets_list.count('{'),brackets_list.count('}'))) bad_count_file += 1 return bad_count_file def main(): print("#########################") - print("# Validate SQF files missing brackets #") + print("# Validate SQF #") print("#########################") sqf_list = [] bad_count = 0 parser = argparse.ArgumentParser() - parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default=".") + parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default="") args = parser.parse_args() - for root, dirnames, filenames in os.walk('../addons' + '/' + args.module): + # Allow running from root directory as well as from inside the tools directory + rootDir = "../addons" + if (os.path.exists("addons")): + rootDir = "addons" + + for root, dirnames, filenames in os.walk(rootDir + '/' + args.module): for filename in fnmatch.filter(filenames, '*.sqf'): sqf_list.append(os.path.join(root, filename)) for filename in sqf_list: bad_count = bad_count + check_sqf_syntax(filename) - print("Bad Count {0}".format(bad_count)) + print("Checked {0} files. Errors detected {1}.".format(len(sqf_list), bad_count)) + if (bad_count == 0): + print("Sqf validation passed") + else: + print("Sqf validation failed") + return bad_count if __name__ == "__main__": From d6ab43d77ea7467abc3ed709f3b39d34f0132cb9 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 11 Oct 2015 17:35:55 +0200 Subject: [PATCH 087/180] Possible fix for travis build failure --- tools/sqf_validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/sqf_validator.py b/tools/sqf_validator.py index 7d1780c5e0..6cfa3e4db3 100644 --- a/tools/sqf_validator.py +++ b/tools/sqf_validator.py @@ -25,7 +25,7 @@ def check_sqf_syntax(filepath): def popClosing(): closing << closingStack.pop() - with open(filepath, 'r') as file: + with open(filepath, 'r', encoding='utf-8', errors='ignore') as file: content = file.read() # Store all brackets we find in this file, so we can validate everything on the end From b524c28d53cfd3accc2120fab30947d8fc2eb844 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 11 Oct 2015 18:31:39 +0200 Subject: [PATCH 088/180] Improved output text - Capitalized SQF everywhere - Break checked files and errors into multiple lines - Add a break by line between reported errors and result - Fix incorrect report message for semi-columns - Change excessive usage of # prints on start --- tools/sqf_validator.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/sqf_validator.py b/tools/sqf_validator.py index 6cfa3e4db3..d76434f81d 100644 --- a/tools/sqf_validator.py +++ b/tools/sqf_validator.py @@ -113,7 +113,7 @@ def check_sqf_syntax(filepath): if (c not in [' ', '\t', '\n', '/']): # keep reading until no white space or comments checkForSemiColumn = False if (c not in [']', ')', '}', ';', ',', '&', '!', '|', '='] and not validKeyWordAfterCode(content, indexOfCharacter)): # , 'f', 'd', 'c', 'e', 'a', 'n', 'i']): - print("ERROR: Possible missing semi-column ':' detected at {0} Line number: {1}".format(filepath,lineNumber)) + print("ERROR: Possible missing semi-column ';' detected at {0} Line number: {1}".format(filepath,lineNumber)) bad_count_file += 1 else: # Look for the end of our comment block @@ -139,9 +139,7 @@ def check_sqf_syntax(filepath): def main(): - print("#########################") - print("# Validate SQF #") - print("#########################") + print("Validating SQF") sqf_list = [] bad_count = 0 @@ -162,11 +160,12 @@ def main(): for filename in sqf_list: bad_count = bad_count + check_sqf_syntax(filename) - print("Checked {0} files. Errors detected {1}.".format(len(sqf_list), bad_count)) + + print("------\nChecked {0} files\nErrors detected: {1}".format(len(sqf_list), bad_count)) if (bad_count == 0): - print("Sqf validation passed") + print("SQF validation PASSED") else: - print("Sqf validation failed") + print("SQF validation FAILED") return bad_count From d926a4a52a6ac1acf0341f0d8d92f14e44855d61 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sun, 11 Oct 2015 23:20:56 +0200 Subject: [PATCH 089/180] Add shebang line to specify python version to SQF validator and replace slash with backslash --- tools/sqf_validator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/sqf_validator.py b/tools/sqf_validator.py index d76434f81d..8af8e08a61 100644 --- a/tools/sqf_validator.py +++ b/tools/sqf_validator.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import fnmatch import os @@ -149,11 +150,11 @@ def main(): args = parser.parse_args() # Allow running from root directory as well as from inside the tools directory - rootDir = "../addons" + rootDir = "..\\addons" if (os.path.exists("addons")): rootDir = "addons" - for root, dirnames, filenames in os.walk(rootDir + '/' + args.module): + for root, dirnames, filenames in os.walk(rootDir + '\\' + args.module): for filename in fnmatch.filter(filenames, '*.sqf'): sqf_list.append(os.path.join(root, filename)) From 7062f60f0a667cc3a3e59859d75eaca4e2bd4d35 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 12 Oct 2015 01:07:20 -0500 Subject: [PATCH 090/180] Fix UBC from #2726 --- addons/cargo/CfgVehicles.hpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index 1fae56749f..111c4d9956 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -222,12 +222,6 @@ class CfgVehicles { class B_supplyCrate_F: ReammoBox_F { GVAR(size) = 6; }; - class O_supplyCrate_F: ReammoBox_F { - GVAR(size) = 6; - }; - class I_supplyCrate_F: ReammoBox_F { - GVAR(size) = 6; - }; class IG_supplyCrate_F: ReammoBox_F { GVAR(size) = 6; }; From 5d76395914271470ed09b22ccc31676902ffab67 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 12 Oct 2015 11:27:38 -0500 Subject: [PATCH 091/180] #2734 - Map effects / flashlights for TrippleHead --- addons/map/functions/fnc_simulateMapLight.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/map/functions/fnc_simulateMapLight.sqf b/addons/map/functions/fnc_simulateMapLight.sqf index 9554409e15..ec08f14d4c 100644 --- a/addons/map/functions/fnc_simulateMapLight.sqf +++ b/addons/map/functions/fnc_simulateMapLight.sqf @@ -22,7 +22,7 @@ _hmd = hmd ACE_player; _flashlight = GVAR(flashlightInUse); //map width (on screen) in pixels -_screenSize = 640 * safeZoneW; +_screenSize = 640 * safeZoneWAbs; //resolution params (every frame in case resolution change) getResolution params ["_resX", "_resY", "_viewPortX", "_viewPortY", "", "_uiScale"]; @@ -58,7 +58,7 @@ if (_flashlight == "") then { if !(_colour in ["white", "red", "green", "blue", "yellow"]) then {_colour = "white"}; _size = getNumber (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Size"); _flashTex = format[QUOTE(PATHTOF_SYS(ace,flashlights,UI\Flashlight_Beam_%1_ca.paa)), _colour]; - _beamSize = _screenSize / _size; + _beamSize = (safeZoneW/safeZoneWAbs) * _screenSize / _size; //after 5x zoom, it's simulated to be fixed (it actually gets bigger relative to zoom) if (_mapScale < 0.2) then {_beamSize = _beamSize / (_mapScale * (1 / 0.2))}; From 3e4906fa7e1768ff974e48fafc338dbbca333e4a Mon Sep 17 00:00:00 2001 From: Glowbal Date: Mon, 12 Oct 2015 21:29:50 +0200 Subject: [PATCH 092/180] Revert the backslash in sqf validator - Use a forward slash in path for travis to work properly --- tools/sqf_validator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/sqf_validator.py b/tools/sqf_validator.py index 8af8e08a61..7e7c0183d6 100644 --- a/tools/sqf_validator.py +++ b/tools/sqf_validator.py @@ -150,11 +150,11 @@ def main(): args = parser.parse_args() # Allow running from root directory as well as from inside the tools directory - rootDir = "..\\addons" + rootDir = "../addons" if (os.path.exists("addons")): rootDir = "addons" - for root, dirnames, filenames in os.walk(rootDir + '\\' + args.module): + for root, dirnames, filenames in os.walk(rootDir + '/' + args.module): for filename in fnmatch.filter(filenames, '*.sqf'): sqf_list.append(os.path.join(root, filename)) From d091fcbdbce63cf5c04ad653bacb805cb65d99dc Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 12 Oct 2015 16:14:35 -0500 Subject: [PATCH 093/180] #2706 - Local privates to search_privates.py --- tools/search_privates.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/search_privates.py b/tools/search_privates.py index 207c6403e0..7c6b042c1a 100644 --- a/tools/search_privates.py +++ b/tools/search_privates.py @@ -16,7 +16,7 @@ def get_private_declare(content): priv_dec_str = ''.join(priv_srch_declared) - srch = re.compile('(? Date: Tue, 13 Oct 2015 02:01:59 -0500 Subject: [PATCH 094/180] #2528 - Medical Menu Work (1) Verify target is valid and in reasonable range --- addons/medical_menu/ACE_Settings.hpp | 4 ++++ addons/medical_menu/XEH_postInit.sqf | 11 ++++++++--- .../medical_menu/functions/fnc_canOpenMenu.sqf | 10 ++++++---- .../functions/fnc_getTreatmentOptions.sqf | 3 ++- .../functions/fnc_handleUI_DisplayOptions.sqf | 12 +++++++----- .../fnc_handleUI_dropDownTriageCard.sqf | 2 +- addons/medical_menu/functions/fnc_module.sqf | 2 +- .../medical_menu/functions/fnc_onMenuClose.sqf | 3 ++- .../medical_menu/functions/fnc_onMenuOpen.sqf | 18 ++++++++++-------- addons/medical_menu/functions/fnc_openMenu.sqf | 4 ++-- .../functions/fnc_updateActivityLog.sqf | 4 ++-- .../functions/fnc_updateBodyImage.sqf | 9 +++++---- .../medical_menu/functions/fnc_updateIcons.sqf | 4 ++-- .../functions/fnc_updateInformationLists.sqf | 4 ++-- .../functions/fnc_updateQuickViewLog.sqf | 4 ++-- .../functions/fnc_updateUIInfo.sqf | 14 ++++++++------ 16 files changed, 64 insertions(+), 44 deletions(-) diff --git a/addons/medical_menu/ACE_Settings.hpp b/addons/medical_menu/ACE_Settings.hpp index 42bd80044f..82430cd661 100644 --- a/addons/medical_menu/ACE_Settings.hpp +++ b/addons/medical_menu/ACE_Settings.hpp @@ -24,4 +24,8 @@ class ACE_Settings { isClientSettable = 1; category = ECSTRING(medical,Category_Medical); }; + class GVAR(maxRange) { + value = 4; + typeName = "SCALAR"; + }; }; diff --git a/addons/medical_menu/XEH_postInit.sqf b/addons/medical_menu/XEH_postInit.sqf index eaf356f608..4435511b8f 100644 --- a/addons/medical_menu/XEH_postInit.sqf +++ b/addons/medical_menu/XEH_postInit.sqf @@ -2,6 +2,10 @@ if (!hasInterface) exitwith {}; +GVAR(MenuPFHID) = -1; +GVAR(lastOpenedOn) = -1; +GVAR(pendingReopen) = false; + ["medical_treatmentSuccess", { if (GVAR(openAfterTreatment) && {GVAR(pendingReopen)}) then { @@ -15,8 +19,9 @@ if (!hasInterface) exitwith {}; ["ACE3 Common", QGVAR(displayMenuKeyPressed), localize LSTRING(DisplayMenuKey), { - _target = cursorTarget; - if (!(_target isKindOf "CAManBase") || ACE_player distance _target > 10) then {_target = ACE_player}; + local _target = cursorTarget; + if (!((_target isKindOf "CAManBase") && {[ACE_player, _target] call FUNC(canOpenMenu)})) then {_target = ACE_player}; + // Conditions: canInteract if !([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, _target] call FUNC(canOpenMenu)) exitwith {false}; @@ -27,7 +32,7 @@ if (!hasInterface) exitwith {}; }, { if (ACE_time - GVAR(lastOpenedOn) > 0.5) exitWith { - [ObjNull] call FUNC(openMenu); + [objNull] call FUNC(openMenu); }; false }, diff --git a/addons/medical_menu/functions/fnc_canOpenMenu.sqf b/addons/medical_menu/functions/fnc_canOpenMenu.sqf index 9b7c3bcbff..818d165e12 100644 --- a/addons/medical_menu/functions/fnc_canOpenMenu.sqf +++ b/addons/medical_menu/functions/fnc_canOpenMenu.sqf @@ -10,7 +10,7 @@ * Can open * * Example: - * [] call ace_medical_menu_canOpenMenu + * [player, cursorTarget] call ace_medical_menu_fnc_canOpenMenu * * Public: No */ @@ -18,7 +18,9 @@ params ["_caller", "_target"]; -if !(GVAR(allow) == 1 || (GVAR(allow) == 2 && {vehicle _caller != _caller || vehicle _target != _target} && {alive ACE_player})) exitwith {false}; -if !(GVAR(useMenu) == 1 || (GVAR(useMenu) == 2 && {vehicle _caller != _caller || vehicle _target != _target} && {alive ACE_player})) exitwith {false}; +(alive _caller) +&& {!isNull _target} +&& {(_caller distance _target) < GVAR(maxRange)} +&& {(GVAR(allow) == 1) || {(GVAR(allow) == 2) && {vehicle _caller != _caller || vehicle _target != _target}}} +&& {(GVAR(useMenu) == 1) || {(GVAR(useMenu) == 2) && {vehicle _caller != _caller || vehicle _target != _target}}} -true diff --git a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf index 4b03d27970..2bb4499753 100644 --- a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf +++ b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf @@ -17,9 +17,10 @@ */ #include "script_component.hpp" -private "_actions"; params ["_player", "_target", "_name"]; +private ["_actions", "_collectedActions", "_bodyPart"]; + if (!([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitwith {[]}; _actions = if (EGVAR(medical,level) == 2) then { diff --git a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf index dafd72d54d..e5b49e58bc 100644 --- a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf +++ b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf @@ -9,7 +9,7 @@ * None * * Example: - * ["some category"] call ace_medical_menu_handleUI_DisplayOptions + * ["some category"] call ace_medical_menu_fnc_handleUI_DisplayOptions * * Public: No */ @@ -21,7 +21,7 @@ if (!hasInterface) exitwith{}; -private ["_entries", "_display", "_newTarget", "_card", "_ctrl", "_code"]; +private ["_entries", "_display", "_newTarget", "_ctrl", "_code"]; params ["_name"]; @@ -31,9 +31,11 @@ _display = uiNamespace getVariable QGVAR(medicalMenu); if (isNil "_display") exitwith {}; // no valid dialog present if (_name isEqualTo "toggle") exitwith { - if (GVAR(INTERACTION_TARGET) != ACE_player) then { - _newTarget = ACE_player; - } else { + _newTarget = ACE_player; + //If we are on the player, and only if our old target is still valid, switch to it: + if ((GVAR(INTERACTION_TARGET) == ACE_player) && + {[ACE_player, GVAR(INTERACTION_TARGET_PREVIOUS), ["isNotInside"]] call EFUNC(common,canInteractWith)} && + {[ACE_player, GVAR(INTERACTION_TARGET_PREVIOUS)] call FUNC(canOpenMenu)}) then { _newTarget = GVAR(INTERACTION_TARGET_PREVIOUS); }; diff --git a/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf b/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf index fb924fc40b..33b82e5d78 100644 --- a/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf +++ b/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf @@ -9,7 +9,7 @@ * None * * Example: - * [] call ace_medical_menu_handleUI_dropDownTriageCard + * [] call ace_medical_menu_fnc_handleUI_dropDownTriageCard * * Public: No */ diff --git a/addons/medical_menu/functions/fnc_module.sqf b/addons/medical_menu/functions/fnc_module.sqf index d95110c200..666440e208 100644 --- a/addons/medical_menu/functions/fnc_module.sqf +++ b/addons/medical_menu/functions/fnc_module.sqf @@ -15,7 +15,7 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic", "", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/medical_menu/functions/fnc_onMenuClose.sqf b/addons/medical_menu/functions/fnc_onMenuClose.sqf index 4300089a4a..656336eb4e 100644 --- a/addons/medical_menu/functions/fnc_onMenuClose.sqf +++ b/addons/medical_menu/functions/fnc_onMenuClose.sqf @@ -9,7 +9,7 @@ * None * * Example: - * call ace_medical_menu_onMenuClosed + * call ace_medical_menu_fnc_onMenuClosed * * Public: No */ @@ -19,3 +19,4 @@ if (EGVAR(interact_menu,menuBackground)==1) then {[QGVAR(id), false] call EFUNC( if (EGVAR(interact_menu,menuBackground)==2) then {(uiNamespace getVariable [QEGVAR(interact_menu,menuBackground), displayNull]) closeDisplay 0;}; [GVAR(MenuPFHID)] call CBA_fnc_removePerFrameHandler; +GVAR(MenuPFHID) = -1; diff --git a/addons/medical_menu/functions/fnc_onMenuOpen.sqf b/addons/medical_menu/functions/fnc_onMenuOpen.sqf index fb64865b89..2b47312453 100644 --- a/addons/medical_menu/functions/fnc_onMenuOpen.sqf +++ b/addons/medical_menu/functions/fnc_onMenuOpen.sqf @@ -9,7 +9,7 @@ * None * * Example: - * [medical_menu] call ace_medical_menu_onMenuOpen + * [medical_menu] call ace_medical_menu_fnc_onMenuOpen * * Public: No */ @@ -64,6 +64,8 @@ disableSerialization; (_display displayCtrl 1) ctrlSetText format ["%1", [_target] call EFUNC(common,getName)]; setMousePosition [0.4, 0.4]; +if (GVAR(MenuPFHID) != -1) exitWith {ERROR("PFID already running");}; + GVAR(MenuPFHID) = [{ (_this select 0) params ["_display"]; @@ -74,15 +76,15 @@ GVAR(MenuPFHID) = [{ [GVAR(INTERACTION_TARGET)] call FUNC(updateIcons); [GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions); - _status = [GVAR(INTERACTION_TARGET)] call EFUNC(medical,getTriageStatus); - (_display displayCtrl 2000) ctrlSetText (_status select 0); - (_display displayCtrl 2000) ctrlSetBackgroundColor (_status select 2); - - if (ACE_player distance _target > MAX_DISTANCE) exitwith { + //Check that it's valid to stay open: + if !(([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith)) && {[ACE_player, _target] call FUNC(canOpenMenu)}) then { closeDialog 314412; - ["displayTextStructured", [ACE_player], [[ELSTRING(medical,DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player]] call EFUNC(common,targetEvent); + //If we failed because of distance check, show UI message: + if ((ACE_player distance GVAR(INTERACTION_TARGET)) > GVAR(maxRange)) then { + ["displayTextStructured", [ACE_player], [[ELSTRING(medical,DistanceToFar), [GVAR(INTERACTION_TARGET)] call EFUNC(common,getName)], 1.75, ACE_player]] call EFUNC(common,targetEvent); + }; }; }, 0, [_display]] call CBA_fnc_addPerFrameHandler; - ["Medical_onMenuOpen", [ACE_player, _interactionTarget]] call EFUNC(common,localEvent); +["Medical_onMenuOpen", [ACE_player, _target]] call EFUNC(common,localEvent); diff --git a/addons/medical_menu/functions/fnc_openMenu.sqf b/addons/medical_menu/functions/fnc_openMenu.sqf index 067e7bda13..1c77da6a5a 100644 --- a/addons/medical_menu/functions/fnc_openMenu.sqf +++ b/addons/medical_menu/functions/fnc_openMenu.sqf @@ -9,7 +9,7 @@ * If action was taken * * Example: - * [some_player] call ace_medical_menu_openMenu + * [some_player] call ace_medical_menu_fnc_openMenu * * Public: No */ @@ -17,7 +17,7 @@ params ["_interactionTarget"]; -if (dialog || isNull _interactionTarget) exitwith { +if (dialog || {isNull _interactionTarget}) exitwith { disableSerialization; private ["_display", "_handled"]; diff --git a/addons/medical_menu/functions/fnc_updateActivityLog.sqf b/addons/medical_menu/functions/fnc_updateActivityLog.sqf index 335aea0c58..92e8474b4b 100644 --- a/addons/medical_menu/functions/fnc_updateActivityLog.sqf +++ b/addons/medical_menu/functions/fnc_updateActivityLog.sqf @@ -10,7 +10,7 @@ * None * * Example: - * [some_display, log] call ace_medical_menu_updateActivityLog + * [some_display, log] call ace_medical_menu_fnc_updateActivityLog * * Public: No */ @@ -24,7 +24,7 @@ _logCtrl = _display displayCtrl 214; lbClear _logCtrl; { - _x params ["_message", "_moment", "_dummy", "_arguments"]; + _x params ["_message", "_moment", "", "_arguments"]; if (isLocalized _message) then { _message = localize _message; diff --git a/addons/medical_menu/functions/fnc_updateBodyImage.sqf b/addons/medical_menu/functions/fnc_updateBodyImage.sqf index 34b2f450c8..afe84a59d3 100644 --- a/addons/medical_menu/functions/fnc_updateBodyImage.sqf +++ b/addons/medical_menu/functions/fnc_updateBodyImage.sqf @@ -4,22 +4,23 @@ * * Arguments: * 0: selection bloodloss - * 1: display + * 1: damaged (array of bools) + * 2: display * * Return Value: * None * * Example: - * [0.3, some_display] call ace_medical_menu_updateBodyImage + * [0.3, some_display] call ace_medical_menu_fnc_updateBodyImage * * Public: No */ #include "script_component.hpp" -params ["_selectionBloodLoss", "_display"]; +params ["_selectionBloodLoss", "_damaged", "_display"]; // Handle the body image coloring -_availableSelections = [50, 51, 52, 53, 54, 55]; +local _availableSelections = [50, 51, 52, 53, 54, 55]; { private ["_red", "_green", "_blue"]; diff --git a/addons/medical_menu/functions/fnc_updateIcons.sqf b/addons/medical_menu/functions/fnc_updateIcons.sqf index f9d3fc5ab4..b309938476 100644 --- a/addons/medical_menu/functions/fnc_updateIcons.sqf +++ b/addons/medical_menu/functions/fnc_updateIcons.sqf @@ -9,7 +9,7 @@ * None * * Example: - * [] call ace_medical_menu_updateIcons + * [] call ace_medical_menu_fnc_updateIcons * * Public: No */ @@ -18,7 +18,7 @@ #define START_IDC 111 #define END_IDC 118 -private ["_display", "_idc", "_options", "_name", "_amount"]; +private ["_display", "_idc", "_options", "_amount"]; disableSerialization; diff --git a/addons/medical_menu/functions/fnc_updateInformationLists.sqf b/addons/medical_menu/functions/fnc_updateInformationLists.sqf index ecd700e43a..82c0a13746 100644 --- a/addons/medical_menu/functions/fnc_updateInformationLists.sqf +++ b/addons/medical_menu/functions/fnc_updateInformationLists.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -private "_lbCtrl"; +private ["_lbCtrl", "_amountOfGeneric"]; params ["_display", "_genericMessages", "_allInjuryTexts"]; @@ -28,7 +28,7 @@ lbClear _lbCtrl; _amountOfGeneric = count _genericMessages; { - _x params ["_add", "_Color"]; + _x params ["_add", "_color"]; _lbCtrl lbAdd _add; _lbCtrl lbSetColor [_forEachIndex + _amountOfGeneric, _color]; } forEach _allInjuryTexts; diff --git a/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf b/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf index 8ca81f28ed..49da12e7f4 100644 --- a/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf +++ b/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf @@ -10,7 +10,7 @@ * None * * Example: - * [some_display, log] call ace_medical_menu_updateQuickViewLog + * [some_display, log] call ace_medical_menu_fnc_updateQuickViewLog * * Public: No */ @@ -24,7 +24,7 @@ _logCtrl = _display displayCtrl 215; lbClear _logCtrl; { - _x params ["_message", "_moment", "_dummy", "_arguments"]; + _x params ["_message", "_moment", "", "_arguments"]; if (isLocalized _message) then { _message = localize _message; diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf index b493b5026e..e8633b7fb7 100644 --- a/addons/medical_menu/functions/fnc_updateUIInfo.sqf +++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf @@ -10,18 +10,20 @@ * None * * Example: - * [some_player, some_display] call ace_medical_menu_updateUIInfo + * [some_player, some_display] call ace_medical_menu_fnc_updateUIInfo * * Public: No */ #include "script_component.hpp" -private ["_genericMessages", "_totalIvVolume", "_damaged", "_selectionBloodLoss", "_allInjuryTexts"]; - params ["_target", "_display"]; +private["_allInjuryTexts", "_bandagedwounds", "_damaged", "_genericMessages", "_logs", "_openWounds", "_part", "_partText", "_pointDamage", "_selectionBloodLoss", "_selectionN", "_severity", "_totalIvVolume", "_triageStatus"]; + +if (isNull _display) exitWith {ERROR("bad display");}; + _selectionN = GVAR(selectedBodyPart); -if (_selectionN < 0 || _selectionN > 5) exitwith {}; +if (_selectionN < 0 || {_selectionN > 5}) exitwith {}; _genericMessages = []; _partText = [ELSTRING(medical,Head), ELSTRING(medical,Torso), ELSTRING(medical,LeftArm) ,ELSTRING(medical,RightArm) ,ELSTRING(medical,LeftLeg), ELSTRING(medical,RightLeg)] select _selectionN; @@ -109,7 +111,7 @@ if (EGVAR(medical,level) >= 2) then { { _selectionBloodLoss set [_forEachIndex, _x]; - if (_x > 0 && _forEachIndex == _selectionN) then { + if ((_x > 0) && {_forEachIndex == _selectionN}) then { _pointDamage = _x; _severity = switch (true) do { case (_pointDamage > 0.5): {localize ELSTRING(medical,HeavilyWounded)}; @@ -129,7 +131,7 @@ if (EGVAR(medical,level) >= 2) then { } forEach (_target getvariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0]]); }; -[_selectionBloodLoss, _display] call FUNC(updateBodyImage); +[_selectionBloodLoss, _damaged, _display] call FUNC(updateBodyImage); [_display, _genericMessages, _allInjuryTexts] call FUNC(updateInformationLists); _logs = _target getVariable [QEGVAR(medical,logFile_activity_view), []]; From 8ffe1b4e01fc497129bd0b005c0b7f740accdbaf Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 13 Oct 2015 02:20:19 -0500 Subject: [PATCH 095/180] #2528 (2) - Integrate Dragging --- .../functions/fnc_collectActions.sqf | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/addons/medical_menu/functions/fnc_collectActions.sqf b/addons/medical_menu/functions/fnc_collectActions.sqf index ad189139ea..88f52c417a 100644 --- a/addons/medical_menu/functions/fnc_collectActions.sqf +++ b/addons/medical_menu/functions/fnc_collectActions.sqf @@ -20,7 +20,7 @@ _configBasic = (configFile >> "ACE_Medical_Actions" >> "Basic"); _configAdvanced = (configFile >> "ACE_Medical_Actions" >> "Advanced"); _fnc_compileActionsLevel = { - private ["_entryCount", "_actions", "_displayName", "_condition", "_category", "_statement"]; + private ["_actions", "_displayName", "_condition", "_category", "_statement"]; params ["_config"]; _actions = []; @@ -40,3 +40,26 @@ _fnc_compileActionsLevel = { GVAR(actionsBasic) = [_configBasic] call _fnc_compileActionsLevel; GVAR(actionsAdvanced) = [_configAdvanced] call _fnc_compileActionsLevel; + +//Manually add the drag actions, if dragging exists. +if (["ace_dragging"] call EFUNC(common,isModLoaded)) then { + _condition = { + (ACE_player != GVAR(INTERACTION_TARGET)) && {[ACE_player, GVAR(INTERACTION_TARGET)] call EFUNC(dragging,canDrag)} + }; + _statement = { + GVAR(pendingReopen) = false; //No medical_treatmentSuccess event after drag, so don't want this true + [ACE_player, GVAR(INTERACTION_TARGET)] call EFUNC(dragging,startDrag); + }; + GVAR(actionsBasic) pushBack [localize ELSTRING(dragging,Drag), "drag", _condition, _statement]; + GVAR(actionsAdvanced) pushBack [localize ELSTRING(dragging,Drag), "drag", _condition, _statement]; + + _condition = { + (ACE_player != GVAR(INTERACTION_TARGET)) && {[ACE_player, GVAR(INTERACTION_TARGET)] call EFUNC(dragging,canCarry)} + }; + _statement = { + GVAR(pendingReopen) = false; //No medical_treatmentSuccess event after drag, so don't want this true + [ACE_player, GVAR(INTERACTION_TARGET)] call EFUNC(dragging,startCarry); + }; + GVAR(actionsBasic) pushBack [localize ELSTRING(dragging,Carry), "drag", _condition, _statement]; + GVAR(actionsAdvanced) pushBack [localize ELSTRING(dragging,Carry), "drag", _condition, _statement]; +}; From 680f52cd270f2198938e103d1501e3dec9f13d5a Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 13 Oct 2015 13:40:16 -0500 Subject: [PATCH 096/180] Handle Distance when mounted --- addons/medical_menu/ACE_Settings.hpp | 4 +++- addons/medical_menu/functions/fnc_canOpenMenu.sqf | 7 +++---- addons/medical_menu/functions/fnc_updateUIInfo.sqf | 2 +- addons/medical_menu/ui/menu.hpp | 12 ++++++------ 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/addons/medical_menu/ACE_Settings.hpp b/addons/medical_menu/ACE_Settings.hpp index 82430cd661..d74a6bdfe0 100644 --- a/addons/medical_menu/ACE_Settings.hpp +++ b/addons/medical_menu/ACE_Settings.hpp @@ -25,7 +25,9 @@ class ACE_Settings { category = ECSTRING(medical,Category_Medical); }; class GVAR(maxRange) { - value = 4; + //for ref: 3d interaction (MEDICAL_ACTION_DISTANCE) is 1.75 + value = 3; typeName = "SCALAR"; + category = ECSTRING(medical,Category_Medical); }; }; diff --git a/addons/medical_menu/functions/fnc_canOpenMenu.sqf b/addons/medical_menu/functions/fnc_canOpenMenu.sqf index 818d165e12..1ef7dccf5b 100644 --- a/addons/medical_menu/functions/fnc_canOpenMenu.sqf +++ b/addons/medical_menu/functions/fnc_canOpenMenu.sqf @@ -20,7 +20,6 @@ params ["_caller", "_target"]; (alive _caller) && {!isNull _target} -&& {(_caller distance _target) < GVAR(maxRange)} -&& {(GVAR(allow) == 1) || {(GVAR(allow) == 2) && {vehicle _caller != _caller || vehicle _target != _target}}} -&& {(GVAR(useMenu) == 1) || {(GVAR(useMenu) == 2) && {vehicle _caller != _caller || vehicle _target != _target}}} - +&& {((_caller distance _target) < GVAR(maxRange)) || {(vehicle _caller) == (vehicle _target)}} //for now, ignore range when in same vehicle +&& {(GVAR(allow) == 1) || {(GVAR(allow) == 2) && {(vehicle _caller != _caller) || {vehicle _target != _target}}}} +&& {(GVAR(useMenu) == 1) || {(GVAR(useMenu) == 2) && {(vehicle _caller != _caller) || {vehicle _target != _target}}}} diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf index e8633b7fb7..bcc9811905 100644 --- a/addons/medical_menu/functions/fnc_updateUIInfo.sqf +++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf @@ -20,7 +20,7 @@ params ["_target", "_display"]; private["_allInjuryTexts", "_bandagedwounds", "_damaged", "_genericMessages", "_logs", "_openWounds", "_part", "_partText", "_pointDamage", "_selectionBloodLoss", "_selectionN", "_severity", "_totalIvVolume", "_triageStatus"]; -if (isNull _display) exitWith {ERROR("bad display");}; +if (isNil "_display" || {isNull _display}) exitWith {ERROR("No display");}; _selectionN = GVAR(selectedBodyPart); if (_selectionN < 0 || {_selectionN > 5}) exitwith {}; diff --git a/addons/medical_menu/ui/menu.hpp b/addons/medical_menu/ui/menu.hpp index 342f0230a2..29247b6071 100644 --- a/addons/medical_menu/ui/menu.hpp +++ b/addons/medical_menu/ui/menu.hpp @@ -325,7 +325,7 @@ class GVAR(medicalMenu) { animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.0)"; animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.0)"; animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.0)"; - action = QUOTE(GVAR(selectedBodyPart) = 0; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + action = QUOTE(GVAR(selectedBodyPart) = 0;); }; class selectTorso : selectHead { idc = 302; @@ -333,7 +333,7 @@ class GVAR(medicalMenu) { y = "5.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; w = "2.2 * (((safezoneW / safezoneH) min 1.2) / 40)"; h = "4.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - action = QUOTE(GVAR(selectedBodyPart) = 1; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + action = QUOTE(GVAR(selectedBodyPart) = 1;); }; class selectLeftArm: selectHead{ idc = 303; @@ -341,12 +341,12 @@ class GVAR(medicalMenu) { y = "5.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; w = "1.1 * (((safezoneW / safezoneH) min 1.2) / 40)"; h = "4.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - action = QUOTE(GVAR(selectedBodyPart) = 3; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + action = QUOTE(GVAR(selectedBodyPart) = 3;); }; class selectRightArm: selectLeftArm{ idc = 304; x = "20.6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - action = QUOTE(GVAR(selectedBodyPart) = 2; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + action = QUOTE(GVAR(selectedBodyPart) = 2;); }; class selectLeftLeg :selectHead { idc = 305; @@ -354,12 +354,12 @@ class GVAR(medicalMenu) { y = "9.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; w = "1.1 * (((safezoneW / safezoneH) min 1.2) / 40)"; h = "6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - action = QUOTE(GVAR(selectedBodyPart) = 5; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + action = QUOTE(GVAR(selectedBodyPart) = 5;); }; class selectRightLeg :selectLeftLeg { idc = 306; x = "19.6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - action = QUOTE(GVAR(selectedBodyPart) = 4; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + action = QUOTE(GVAR(selectedBodyPart) = 4;); }; From f7fe0c08e0af57d2529731d348b31ffd5e64caa6 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 14 Oct 2015 11:15:44 -0500 Subject: [PATCH 097/180] #2391 - Use AGL for sitting setPos --- addons/sitting/functions/fnc_sit.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf index 5e9c36947e..b6c853f645 100644 --- a/addons/sitting/functions/fnc_sit.sqf +++ b/addons/sitting/functions/fnc_sit.sqf @@ -58,8 +58,8 @@ _sitRotation = if (isNumber (_configFile >> QGVAR(sitRotation))) then {getNumber // Set direction and position _player setDir _sitDirection; -// No need for ATL/ASL as modelToWorld returns in format position -_player setPos (_seat modelToWorld _sitPosition); +//modelToWorld returns AGL +_player setPosASL (AGLtoASL (_seat modelToWorld _sitPosition)); // Set variables _player setVariable [QGVAR(isSitting), true]; From 38be666b37681affff13d2c8d4b286b8b5650447 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Fri, 16 Oct 2015 18:34:31 +0200 Subject: [PATCH 098/180] Use "flat-square" badge style --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ecbc0dd01d..538dc09b08 100644 --- a/README.md +++ b/README.md @@ -3,25 +3,25 @@

- ACE3 Version + ACE3 Version - ACE3 Download + ACE3 Download - ACE3 Issues + ACE3 Issues - BIF Thread + BIF Thread - ACE3 License + ACE3 License - ACE3 Slack + ACE3 Slack - ACE3 Build Status + ACE3 Build Status

Requires the latest version of CBA A3. Visit us on Facebook | YouTube | Twitter | Reddit

From b3032da51cb973d416709428eb68ac7554e09b8e Mon Sep 17 00:00:00 2001 From: bux578 Date: Sat, 17 Oct 2015 11:48:12 +0200 Subject: [PATCH 099/180] reorder badges, social networks --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ecbc0dd01d..0089dca494 100644 --- a/README.md +++ b/README.md @@ -8,23 +8,24 @@ ACE3 Download - - ACE3 Issues - - - BIF Thread - ACE3 License + + ACE3 Issues + ACE3 Slack ACE3 Build Status + + BIF Thread +

-

Requires the latest version of CBA A3. Visit us on Facebook | YouTube | Twitter | Reddit

+

Requires the latest version of CBA A3.
+Visit us on Twitter | Facebook | YouTube | Reddit

**ACE3** is a joint effort by the teams behind **ACE2**, **AGM** and **CSE** to improve the realism and authenticity of Arma 3. @@ -43,6 +44,7 @@ The mod is **built modularly**, so almost any included PBO can be easily removed - Captivity system - Explosives system, including different trigger types - Map screen improvements – marker placement and map tools +- Logistics - Advanced missile guidance and laser designation #### Additional features From b6dd7b941fa2b2c2e3a395de3d22368cb6004fc3 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sat, 17 Oct 2015 13:20:00 +0100 Subject: [PATCH 100/180] Reduce overhead of spectator map icons Fixes #2514 by only rendering individual unit icons when zoomed in and only rendering the units currently within the screen bounds. Behaves as expected, but whether or not it has a significant performance increase under scaled up testing conditions remains to be seen. --- addons/spectator/functions/fnc_handleMap.sqf | 28 +++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/addons/spectator/functions/fnc_handleMap.sqf b/addons/spectator/functions/fnc_handleMap.sqf index fd084f9967..b83ccdcd7d 100644 --- a/addons/spectator/functions/fnc_handleMap.sqf +++ b/addons/spectator/functions/fnc_handleMap.sqf @@ -18,12 +18,32 @@ #include "script_component.hpp" params ["_map"]; -private ["_cachedVehicles","_unit","_color","_icon","_txt"]; +private ["_center","_radius","_scaled","_drawVehicles","_leader","_color","_cachedVehicles","_unit","_icon","_txt"]; if (GVAR(camMode) == 0) then { _map drawIcon ["\A3\UI_F\Data\GUI\Rsc\RscDisplayMissionEditor\iconcamera_ca.paa",[0,0,0,1],GVAR(freeCamera),20,20,GVAR(camPan)]; }; +_center = _map ctrlMapScreenToWorld [0.5,0.5]; +_radius = (_map ctrlMapScreenToWorld [safeZoneX,safeZoneY]) distance2D _center; +_scaled = (ctrlMapScale _map) > 0.2; + +// Draw only group icons when scaled out +_drawVehicles = []; +{ + _leader = leader _x; + if (_scaled) then { + _color = GETVAR(_x,GVAR(gColor),[ARR_4(0,0,0,0)]); + _map drawIcon ["\A3\ui_f\data\map\markers\nato\b_inf.paa", _color, _leader, 20, 20, 0, "", 0, 0]; + } else { + if ((_leader distance2D _center) < _radius) then { + _drawVehicles append (units _x); + }; + }; + nil +} count GVAR(groupList); + +// Draw units when group leader is within screen bounds _cachedVehicles = []; { _unit = vehicle _x; @@ -41,7 +61,7 @@ _cachedVehicles = []; _icon = GETVAR(_unit,GVAR(uIcon),""); _txt = ["", GETVAR(_x,GVAR(uName),"")] select (isPlayer _x); - _map drawIcon [_icon, _color, _unit, 19, 19, getDir _unit, _txt, 1, 0.03]; + _map drawIcon [_icon, _color, _unit, 19, 19, getDir _unit, _txt, 1, 0.04]; }; - false -} count GVAR(unitList); + nil +} count (_drawVehicles arrayIntersect GVAR(unitList)); From 26c051d397b9d63213c82dd8015b5a23f6beadc2 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 18 Oct 2015 11:48:21 -0500 Subject: [PATCH 101/180] Sitting - Fix missing semicolon --- addons/sitting/CfgEventHandlers.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sitting/CfgEventHandlers.hpp b/addons/sitting/CfgEventHandlers.hpp index da7efe1601..3481fa1fb5 100644 --- a/addons/sitting/CfgEventHandlers.hpp +++ b/addons/sitting/CfgEventHandlers.hpp @@ -22,7 +22,7 @@ class Extended_Killed_EventHandlers { class Extended_InitPost_EventHandlers { class ThingX { class ADDON { - init = QUOTE(_this call DFUNC(addSitActions)) + init = QUOTE(_this call DFUNC(addSitActions)); }; }; }; From 16180686d25f6419baf5b5fb64a5afc772118768 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 18 Oct 2015 18:49:03 -0500 Subject: [PATCH 102/180] PV GVAR(settings) after modules, add error debug --- addons/common/XEH_postInit.sqf | 5 ++++ .../fnc_loadSettingsLocalizedText.sqf | 13 ++++++++- .../functions/fnc_loadSettingsOnServer.sqf | 2 -- addons/common/functions/fnc_setSetting.sqf | 28 +++++++++++++------ 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 032b6148be..ac1a162137 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -197,6 +197,11 @@ call FUNC(checkFiles); // Event so that ACE_Modules have their settings loaded: ["InitSettingsFromModules", []] call FUNC(localEvent); + if (isServer) then { + // Publish all settings data after all configs and modules are read + publicVariable QGVAR(settings); + }; + // Load user settings from profile if (hasInterface) then { call FUNC(loadSettingsFromProfile); diff --git a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf index 1e43359379..62ba120ff9 100644 --- a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf +++ b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf @@ -35,12 +35,23 @@ _fnc_parseConfigForDisplayNames = { _values set [_forEachIndex, _text]; }; } forEach _values; + + if (!(_values isEqualTo [])) then { + if (_typeOf != "SCALAR") then { + ACE_LOGWARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf); + } else { + local _value = missionNamespace getVariable [_name, -1]; + if ((_value < 0) || {_value >= (count _values)}) then { + ACE_LOGWARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)(", _name, _value, count _values); + }; + }; + }; true }; // Iterate through settings { - _x params ["_name"]; + _x params ["_name", "_typeOf"]; if !([configFile >> "ACE_Settings" >> _name] call _fnc_parseConfigForDisplayNames) then { if !([configFile >> "ACE_ServerSettings" >> _name] call _fnc_parseConfigForDisplayNames) then { diff --git a/addons/common/functions/fnc_loadSettingsOnServer.sqf b/addons/common/functions/fnc_loadSettingsOnServer.sqf index ea8257ec23..cdf8b48041 100644 --- a/addons/common/functions/fnc_loadSettingsOnServer.sqf +++ b/addons/common/functions/fnc_loadSettingsOnServer.sqf @@ -51,8 +51,6 @@ _fnc_parseConfigForSettings = { // mission side settings [missionConfigFile >> "ACE_Settings"] call _fnc_parseConfigForSettings; -// Publish all settings data -publicVariable QGVAR(settings); // Publish all setting values { publicVariable (_x select 0); diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf index 60b64e31d4..4162e7443f 100644 --- a/addons/common/functions/fnc_setSetting.sqf +++ b/addons/common/functions/fnc_setSetting.sqf @@ -13,27 +13,37 @@ * Return Value: * None * + * Example: + * ["ace_map_gestures_enabled", true, false, true] call ace_common_fnc_setSetting + * * Public: No */ #include "script_component.hpp" params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]]; -private ["_settingData", "_failed"]; - -_settingData = [_name] call FUNC(getSettingData); +local _settingData = [_name] call FUNC(getSettingData); // Exit if the setting does not exist -if (count _settingData == 0) exitWith {}; +if (_settingData isEqualTo []) exitWith {}; + +_settingData params ["", "_typeName", "_isClientSetable", "", "", "", "_isForced"]; // Exit if the setting is already forced -if (_settingData select 6) exitWith {}; +if (_isForced) exitWith { + ACE_LOGINFO_1("SetSetting [%1] Trying to set forced setting", _name); +}; + +//This does NOT broadcast changes to GVAR(settings), so clients would not get updated force status +if ((missionNamespace getVariable [QEGVAR(modules,serverModulesRead), false]) && {!(_isForced isEqualTo _force)}) then { + ACE_LOGWARNING_3("SetSetting [%1] attempting to broadcast a change to force (%2 to %3)", _name, _isForced, _force); +}; // If the type is not equal, try to cast it -_failed = false; +local _failed = false; if (typeName _value != _settingData select 1) then { _failed = true; - if (_settingData select 1 == "BOOL" && typeName _value == "SCALAR") then { + if ((_typeName == "BOOL") && {typeName _value == "SCALAR"}) then { // If value is not 0 or 1 consider it invalid and don't set anything if (_value isEqualTo 0) then { _value = false; @@ -44,12 +54,12 @@ if (typeName _value != _settingData select 1) then { _failed = false; }; }; - if (_settingData select 1 == "COLOR" && typeName _value == "ARRAY") then { + if ((_typeName == "COLOR") && {typeName _value == "ARRAY"}) then { _failed = false; }; }; -if (_failed) exitWith {}; +if (_failed) exitWith {ACE_LOGERROR_3("SetSetting [%1] bad data type expected %2 got %3", _name, _typeName, typeName _value);}; // Force it if it was required _settingData set [6, _force]; From 64de91ed06fe5c4608fc3887a290a58a8caf3d41 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 18 Oct 2015 23:34:11 -0500 Subject: [PATCH 103/180] Add warning for duplicate setting modules. --- addons/captives/CfgVehicles.hpp | 1 + addons/cargo/CfgVehicles.hpp | 1 + addons/common/CfgVehicles.hpp | 1 + addons/common/functions/fnc_setSetting.sqf | 4 +++- addons/explosives/CfgModule.hpp | 1 + addons/finger/CfgVehicles.hpp | 1 + addons/hearing/CfgVehicles.hpp | 1 + addons/interaction/CfgVehicles.hpp | 1 + addons/map/CfgVehicles.hpp | 2 ++ addons/map_gestures/CfgVehicles.hpp | 1 + addons/medical/CfgVehicles.hpp | 3 +++ addons/medical_menu/CfgVehicles.hpp | 1 + addons/microdagr/CfgVehicles.hpp | 1 + addons/mk6mortar/CfgVehicles.hpp | 1 + addons/modules/XEH_postInit.sqf | 25 +++++++++++++--------- addons/nametags/CfgVehicles.hpp | 1 + addons/optionsmenu/CfgVehicles.hpp | 1 + addons/repair/CfgVehicles.hpp | 1 + addons/sitting/CfgVehicles.hpp | 1 + addons/vehiclelock/CfgVehicles.hpp | 1 + addons/viewdistance/CfgVehicles.hpp | 1 + addons/weather/CfgVehicles.hpp | 1 + addons/winddeflection/CfgVehicles.hpp | 1 + addons/zeus/CfgVehicles.hpp | 1 + 24 files changed, 43 insertions(+), 11 deletions(-) diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index afda86cfda..de6a757bf3 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -176,6 +176,7 @@ class CfgVehicles { scope = 2; icon = QUOTE(PATHTOF(UI\Icon_Module_settings_ca.paa)); isGlobal = 1; + isSingular = 1; class Arguments { class allowHandcuffOwnSide { displayName = CSTRING(ModuleSettings_handcuffSide_name); diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index 111c4d9956..90fc439b60 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -8,6 +8,7 @@ class CfgVehicles { function = QFUNC(moduleSettings); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp index 7c5c9295f9..de1f7f7cf4 100644 --- a/addons/common/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -35,6 +35,7 @@ class CfgVehicles { function = QFUNC(moduleCheckPBOs); scope = 2; isGlobal = 1; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa)); class Arguments { class Action { diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf index 4162e7443f..e37f4b6ff7 100644 --- a/addons/common/functions/fnc_setSetting.sqf +++ b/addons/common/functions/fnc_setSetting.sqf @@ -25,7 +25,9 @@ params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]]; local _settingData = [_name] call FUNC(getSettingData); // Exit if the setting does not exist -if (_settingData isEqualTo []) exitWith {}; +if (_settingData isEqualTo []) exitWith { + ACE_LOGERROR_1("SetSetting [%1] setting does not exist", _name); +}; _settingData params ["", "_typeName", "_isClientSetable", "", "", "", "_isForced"]; diff --git a/addons/explosives/CfgModule.hpp b/addons/explosives/CfgModule.hpp index a27efae704..b651903f59 100644 --- a/addons/explosives/CfgModule.hpp +++ b/addons/explosives/CfgModule.hpp @@ -6,6 +6,7 @@ class ACE_ModuleExplosive: ACE_Module { function = QUOTE(FUNC(module)); scope = 2; isGlobal = 1; + isSingular = 1; icon = PATHTOF(UI\Icon_Module_Explosives_ca.paa); class Arguments { class RequireSpecialist { diff --git a/addons/finger/CfgVehicles.hpp b/addons/finger/CfgVehicles.hpp index 99d9713f00..e78ef50123 100644 --- a/addons/finger/CfgVehicles.hpp +++ b/addons/finger/CfgVehicles.hpp @@ -7,6 +7,7 @@ class CfgVehicles { icon = QUOTE(PATHTOF(UI\Icon_Module_finger_ca.paa)); function = QFUNC(moduleSettings); isGlobal = 0; + isSingular = 1; author = ECSTRING(common,ACETeam); class Arguments { class enabled { diff --git a/addons/hearing/CfgVehicles.hpp b/addons/hearing/CfgVehicles.hpp index 2273653c3a..72377ca970 100644 --- a/addons/hearing/CfgVehicles.hpp +++ b/addons/hearing/CfgVehicles.hpp @@ -101,6 +101,7 @@ class CfgVehicles { function = QFUNC(moduleHearing); scope = 2; isGlobal = 1; + isSingular = 1; icon = PATHTOF(UI\Icon_Module_Hearing_ca.paa); class Arguments { class EnableCombatDeafness { diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 56fb06a85b..dfe4f2025e 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -8,6 +8,7 @@ class CfgVehicles { function = "ACE_Interaction_fnc_moduleInteraction"; scope = 2; isGlobal = 1; + isSingular = 1; icon = PATHTOF(UI\Icon_Module_Interaction_ca.paa); class Arguments { diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index 7906de8bb7..720d4e8a7b 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -23,6 +23,7 @@ class CfgVehicles { function = QFUNC(moduleMap); scope = 2; isGlobal = 1; + isSingular = 1; icon = PATHTOF(UI\Icon_Module_Map_ca.paa); class Arguments { class MapIllumination { @@ -82,6 +83,7 @@ class CfgVehicles { function = QFUNC(blueForceTrackingModule); scope = 2; isGlobal = 0; + isSingular = 1; icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa); class Arguments { class Enabled { diff --git a/addons/map_gestures/CfgVehicles.hpp b/addons/map_gestures/CfgVehicles.hpp index f5c2ae8f38..c03fb34992 100644 --- a/addons/map_gestures/CfgVehicles.hpp +++ b/addons/map_gestures/CfgVehicles.hpp @@ -6,6 +6,7 @@ class CfgVehicles { displayName = CSTRING(moduleSettings_displayName); function = QFUNC(moduleSettings); isGlobal = 0; + isSingular = 1; author = ECSTRING(common,ACETeam); icon = PATHTOF(ui\icon_module_map_gestures_ca.paa); class Arguments { diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index 3a675e9258..351d285c7e 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -17,6 +17,7 @@ class CfgVehicles { function = QUOTE(DFUNC(moduleMedicalSettings)); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); @@ -153,6 +154,7 @@ class CfgVehicles { function = QUOTE(FUNC(moduleAdvancedMedicalSettings)); functionPriority = 10; isGlobal = 2; + isSingular = 1; isTriggerActivated = 0; isDisposable = 0; author = ECSTRING(common,ACETeam); @@ -274,6 +276,7 @@ class CfgVehicles { function = QUOTE(DFUNC(moduleReviveSettings)); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); diff --git a/addons/medical_menu/CfgVehicles.hpp b/addons/medical_menu/CfgVehicles.hpp index 7bbe7db2ad..d2bbf55fd1 100644 --- a/addons/medical_menu/CfgVehicles.hpp +++ b/addons/medical_menu/CfgVehicles.hpp @@ -10,6 +10,7 @@ class CfgVehicles { function = QUOTE(DFUNC(module)); functionPriority = 1; isGlobal = 0; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); class Arguments { diff --git a/addons/microdagr/CfgVehicles.hpp b/addons/microdagr/CfgVehicles.hpp index ee16870fe0..3fcf92beaa 100644 --- a/addons/microdagr/CfgVehicles.hpp +++ b/addons/microdagr/CfgVehicles.hpp @@ -38,6 +38,7 @@ class CfgVehicles { function = QFUNC(moduleMapFill); scope = 2; isGlobal = 0; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_microDAGR_ca.paa)); functionPriority = 0; class Arguments { diff --git a/addons/mk6mortar/CfgVehicles.hpp b/addons/mk6mortar/CfgVehicles.hpp index b351e440b4..481687f89f 100644 --- a/addons/mk6mortar/CfgVehicles.hpp +++ b/addons/mk6mortar/CfgVehicles.hpp @@ -52,6 +52,7 @@ class CfgVehicles { function = QFUNC(moduleInit); scope = 2; isGlobal = 0; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_mk6_ca.paa)); functionPriority = 0; class Arguments { diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index 62d16f42ce..d4857af57f 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -4,27 +4,32 @@ ["InitSettingsFromModules", { // TODO This is a basic and limited implementation that mimics some of the functionality from the A3 module framework, but not all of it. // We have to execute this in the postInit XEH because on object init, the parameters of the modules are not yet available. They are if we execute it at the start of postInit execution. + + local _uniqueModulesHandled = []; { [_x] call { - private ["_logic", "_logicType", "_config", "_isGlobal", "_isDisposable", "_isPersistent","_function"]; - _logic = _this select 0; - _logicType = typeof _logic; + params ["_logic"]; + local _logicType = typeof _logic; _logic hideobject true; if (_logic getvariable [QGVAR(initalized), false]) exitwith {}; - _config = (configFile >> "CfgVehicles" >> _logicType); + local _config = (configFile >> "CfgVehicles" >> _logicType); if !(isClass _config) exitwith {}; - // isGlobal = 1; - _isGlobal = getNumber (_config >> "isGlobal") > 0; - _isDisposable = getNumber (_config >> "isDisposable") > 0; - _isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1; - _function = getText (_config >> "function"); + local _isGlobal = getNumber (_config >> "isGlobal") > 0; + local _isDisposable = getNumber (_config >> "isDisposable") > 0; + local _isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1; + local _isSingular = getNumber (_config >> "isSingular") > 0; + local _function = getText (_config >> "function"); if (isnil _function) then { _function = compile _function; } else { _function = missionNamespace getvariable _function; }; + if (_isSingular && {_logicType in _uniqueModulesHandled}) then { //ToDo: should this be an exit? + ACE_LOGWARNING_1("Module [%1] - More than 1 singular module placed", _logicType); + }; + if (_isSingular) then {_uniqueModulesHandled pushBack _logicType;}; if (_isGlobal || isServer) then { [_logic, (synchronizedObjects _logic), true] call _function; @@ -38,7 +43,7 @@ deleteVehicle _logic; }; }; - }foreach GVAR(moduleInitCollection); + } forEach GVAR(moduleInitCollection); if (isServer) then { GVAR(serverModulesRead) = true; diff --git a/addons/nametags/CfgVehicles.hpp b/addons/nametags/CfgVehicles.hpp index f6e28095b4..7ca13b5aeb 100644 --- a/addons/nametags/CfgVehicles.hpp +++ b/addons/nametags/CfgVehicles.hpp @@ -7,6 +7,7 @@ class CfgVehicles { function = QFUNC(moduleNameTags); scope = 2; isGlobal = 1; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_NameTags_ca.paa)); class Arguments { class showPlayerNames { diff --git a/addons/optionsmenu/CfgVehicles.hpp b/addons/optionsmenu/CfgVehicles.hpp index 1357417add..cbe03a4cfb 100644 --- a/addons/optionsmenu/CfgVehicles.hpp +++ b/addons/optionsmenu/CfgVehicles.hpp @@ -8,6 +8,7 @@ class CfgVehicles { function = QUOTE(DFUNC(moduleAllowConfigExport)); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); class Arguments { diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index ee31e2c873..85abce4028 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -25,6 +25,7 @@ class CfgVehicles { function = QFUNC(moduleRepairSettings); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(Common,ACETeam); class Arguments { diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp index 4ac0d0edb7..cb2422bd6d 100644 --- a/addons/sitting/CfgVehicles.hpp +++ b/addons/sitting/CfgVehicles.hpp @@ -7,6 +7,7 @@ class CfgVehicles { function = QFUNC(moduleInit); scope = 2; isGlobal = 1; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_Sitting_ca.paa)); class Arguments { class enable { diff --git a/addons/vehiclelock/CfgVehicles.hpp b/addons/vehiclelock/CfgVehicles.hpp index 9e6f155616..873c875f09 100644 --- a/addons/vehiclelock/CfgVehicles.hpp +++ b/addons/vehiclelock/CfgVehicles.hpp @@ -74,6 +74,7 @@ class CfgVehicles { function = QFUNC(moduleInit); scope = 2; isGlobal = 0; + isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_VehicleLock_ca.paa)); functionPriority = 0; class Arguments { diff --git a/addons/viewdistance/CfgVehicles.hpp b/addons/viewdistance/CfgVehicles.hpp index 8e4e30d266..86d906bfce 100644 --- a/addons/viewdistance/CfgVehicles.hpp +++ b/addons/viewdistance/CfgVehicles.hpp @@ -7,6 +7,7 @@ class CfgVehicles { displayName = CSTRING(Module_DisplayName); scope = 2; isGlobal = 1; + isSingular = 1; //icon = ""; // needs an icon class Arguments { class moduleViewDistanceEnabled { diff --git a/addons/weather/CfgVehicles.hpp b/addons/weather/CfgVehicles.hpp index ebdd65c30d..f37a62449a 100644 --- a/addons/weather/CfgVehicles.hpp +++ b/addons/weather/CfgVehicles.hpp @@ -8,6 +8,7 @@ class CfgVehicles { function = QUOTE(DFUNC(initModuleSettings)); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); class Arguments { diff --git a/addons/winddeflection/CfgVehicles.hpp b/addons/winddeflection/CfgVehicles.hpp index 2694bb1b34..c52949e1fc 100644 --- a/addons/winddeflection/CfgVehicles.hpp +++ b/addons/winddeflection/CfgVehicles.hpp @@ -8,6 +8,7 @@ class CfgVehicles { function = QUOTE(DFUNC(initModuleSettings)); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); class Arguments { diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 35c43b0e84..f5144e60e6 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -23,6 +23,7 @@ class CfgVehicles { function = QFUNC(moduleZeusSettings); functionPriority = 1; isGlobal = 1; + isSingular = 1; isTriggerActivated = 0; author = "SilentSpike"; class Arguments { From af80635a3f58aca94d154b331eb4b93454f7ae95 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 18 Oct 2015 23:59:40 -0500 Subject: [PATCH 104/180] ST Map Gesture Force Color Settings --- addons/map_gestures/CfgVehicles.hpp | 11 ++++---- addons/map_gestures/XEH_postInit.sqf | 5 ++++ .../functions/fnc_moduleSettings.sqf | 22 +++++++++------ addons/map_gestures/stringtable.xml | 28 ++----------------- 4 files changed, 27 insertions(+), 39 deletions(-) diff --git a/addons/map_gestures/CfgVehicles.hpp b/addons/map_gestures/CfgVehicles.hpp index c03fb34992..d4c88883e6 100644 --- a/addons/map_gestures/CfgVehicles.hpp +++ b/addons/map_gestures/CfgVehicles.hpp @@ -12,6 +12,7 @@ class CfgVehicles { class Arguments { class enabled { displayName = CSTRING(enabled_DisplayName); + description = CSTRING(enabled_description); typeName = "BOOL"; defaultValue = 1; }; @@ -19,7 +20,7 @@ class CfgVehicles { displayName = CSTRING(maxRange_displayName); description = CSTRING(maxRange_description); typeName = "NUMBER"; - defaultValue = 4; + defaultValue = 7; }; class interval { displayName = CSTRING(interval_displayName); @@ -31,13 +32,13 @@ class CfgVehicles { displayName = CSTRING(defaultLeadColor_displayName); description = CSTRING(defaultLeadColor_description); typeName = "STRING"; - defaultValue = "0,0,0,0"; + defaultValue = "1,0.88,0,0.95"; }; class defaultColor { displayName = CSTRING(defaultColor_displayName); description = CSTRING(defaultColor_description); typeName = "STRING"; - defaultValue = "0,0,0,0"; + defaultValue = "1,0.88,0,0.7"; }; }; }; @@ -54,13 +55,13 @@ class CfgVehicles { displayName = CSTRING(leadColor_displayName); description = CSTRING(leadColor_description); typeName = "STRING"; - defaultValue = "0,0,0,0"; + defaultValue = "1,0.88,0,0.95"; }; class color { displayName = CSTRING(color_displayName); description = CSTRING(color_description); typeName = "STRING"; - defaultValue = "0,0,0,0"; + defaultValue = "1,0.88,0,0.7"; }; }; }; diff --git a/addons/map_gestures/XEH_postInit.sqf b/addons/map_gestures/XEH_postInit.sqf index 777463e86a..233ee23c04 100644 --- a/addons/map_gestures/XEH_postInit.sqf +++ b/addons/map_gestures/XEH_postInit.sqf @@ -1,8 +1,13 @@ #include "script_component.hpp" +if (["STMapGestures"] call EFUNC(common,isModLoaded)) exitWith { + ACE_LOGWARNING("st_map_gestures is installed - exiting [remove st_map_gestures.pbo to allow ace version]"); +}; + if (!hasInterface) exitWith {}; ["SettingsInitialized", { + if (!GVAR(enabled)) exitWith {}; [{ if (isNull (findDisplay 12)) exitWith {}; diff --git a/addons/map_gestures/functions/fnc_moduleSettings.sqf b/addons/map_gestures/functions/fnc_moduleSettings.sqf index 99583074fc..3e580493c9 100644 --- a/addons/map_gestures/functions/fnc_moduleSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleSettings.sqf @@ -17,8 +17,6 @@ */ #include "script_component.hpp" -private ["_defaultColor", "_defaultLeadColor"]; - params ["_logic", "", "_activated"]; if (!_activated || !isServer) exitWith {}; @@ -27,11 +25,19 @@ if (!_activated || !isServer) exitWith {}; [_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(interval), "interval"] call EFUNC(common,readSettingFromModule); -_defaultLeadColor = call compile ("[" + (_logic getVariable ["defaultLeadColor", ""]) + "]"); -if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")}; +//For default fallback colors, setting to empty ("") will not force on clients +local _defaultLeadColor = _logic getVariable ["defaultLeadColor", ""]; +if (_defaultLeadColor != "") then { + _defaultLeadColor = call compile ("[" + _defaultLeadColor + "]"); + if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")}; + [QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting); +}; -_defaultColor = call compile ("[" + (_logic getVariable ["defaultColor", ""]) + "]"); -if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")}; +local _defaultColor = _logic getVariable ["defaultColor", ""]; +if (_defaultColor != "") then { + _defaultColor = call compile ("[" + _defaultColor + "]"); + if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")}; + [QGVAR(defaultColor), _defaultColor, true, true] call EFUNC(common,setSetting); +}; -[QGVAR(defaultLeadColor), _defaultLeadColor, false, true] call EFUNC(common,setSetting); -[QGVAR(defaultColor), _defaultColor, false, true] call EFUNC(common,setSetting); +ACE_LOGINFO("Map Gestures Module Initialized."); diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index e5eab426a3..3da02aa2b0 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -13,41 +13,17 @@ Max range between players to show the map gesture indicator [default: 7 meters] - - Lead Default Alpha - - - Fallback Alpha value for group leaders. - - - Default Alpha - - - Fallback Alpha value. - Lead Default Color - Fallback Color value for group leaders. + Fallback Color value for group leaders when there is no group setting. [Module: leave blank to not force on clients] Default Color - Fallback Color value. - - - Lead Alpha - - - Alpha value for group leaders of groups synced with this module. - - - Alpha - - - Alpha value for group members of groups synced with this module. + Fallback Color value when there is no group setting. [Module: leave blank to not force on clients] Lead Color From 602832cc0c0d3f0c9bdf43bd9b213ea96d6ab062 Mon Sep 17 00:00:00 2001 From: bux578 Date: Mon, 19 Oct 2015 07:29:02 +0200 Subject: [PATCH 105/180] adjust german translations --- addons/captives/stringtable.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 0e1714d225..0ab6cb457d 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -255,7 +255,7 @@ Require Players to surrender before they can be arrested - Spieler müssen zunächst kapitulieren bevor sie gefangen genommen werden können. + Spieler müssen sich erst ergeben, bevor sie gefangen genommen werden können Wymagaj od graczy kapitulacji zanim będzie można ich zaaresztować Requer que jogadores se rendam antes de poderem ser presos Требуется, чтобы игрок сдался в плен прежде, чем его можно будет связать @@ -263,7 +263,7 @@ Surrendering only - Nur Kapitulieren. + Nur Ergeben Tylko kapitulacja Somente rendição Только сдавшийся в плен @@ -271,7 +271,7 @@ Surrendering or No weapon - Kapitulieren oder keine Waffe. + Ergeben oder keine Waffe Kapitulacja lub brak broni Rendição ou desarmado Сдавшийся или безоружный From a873481c361e9871c27a21f237d4e650a6072227 Mon Sep 17 00:00:00 2001 From: bux578 Date: Mon, 19 Oct 2015 07:37:14 +0200 Subject: [PATCH 106/180] improve german readme --- docs/README_DE.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index 07af1a092c..dc571fe9b2 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -30,24 +30,24 @@ Da die MOD vollkommen als **open-source** Projekt gestaltet ist, steht es jedem frei Änderungen vorzuschlagen, oder seine eigene, modifizierte Version zu erstellen, solange diese ebenfalls der Öffentlichkeit zugänglich ist und mit GNU General Public License übereinstimmt. (Weitere Informationen ist der Lizenzdatei in diesem Projekt entnehmbar) -Die Mod ist **modular gestaltet** — beinahe jede PBO kann entfernt werden, sodass jede Gemeinschaft ihre eigene Version der Mod unterhalten kann. Dies kann zum Beispiel einige Funktionalitäten ausschließen, da das Feature nicht gewünscht ist, oder es mit einer anderen MOD in Konflikt gerät etc..Ebenfalls können viele Einstellungen vom Missionsersteller vorgenommen werden (u.a. am Sanitätssystem), sodass eine individuelle Erfahrung gewährleistet werden kann. +Die Mod ist **modular aufgebaut**. Beinahe jede PBO kann entfernt werden, sodass jede Gemeinschaft ihre eigene Version der Mod unterhalten kann. Dies kann zum Beispiel einige Funktionalitäten ausschließen, wenn gewisse Features nicht gewünscht sind, oder es mit einer anderen Mod in Konflikt gerät. Ebenfalls können viele Einstellungen vom Missionsersteller vorgenommen werden (u.a. am Sanitätssystem), sodass eine individuelle Erfahrung gewährleistet werden kann. ### Hauptmerkmale -- Vollkommen neues 3D Interaktionssystem +- Vollkommen neues 3D-Interaktionssystem - Leistungs- und stabilitätsoptimiert - Hauptmerkmal auf Modularität und individuelle Anpassungsmöglichkeiten - Neue, flexible Spieler- und Servereinstellungen -- Verbessertes Sanitätssystem mit unterschiedlichen Stufen (Basis/Erweitert) Spielbarkeit/Realismus +- Verbessertes Sanitätssystem mit unterschiedlichen Stufen (Basis/Erweitert) - Echte und stetige Wettersynchronisation - Ballistik basierend auf vielen Faktoren u.a. Wetter und Wind - Gefangenensystem -- Sprengtoffmechaniken mit den unterschiedlichsten Zündern -- Kartenverbesserungen – Setzen von Markierungen ; Kartenwerkzeuge -- Erweitertes Raketenlenksystem +- Sprengtoffmechaniken mit unterschiedlichen Zündern +- Kartenverbesserungen – Setzen von Markierungen / Kartenwerkzeuge +- Erweitertes Raketenlenksystem #### Weitere Mechaniken - Tragen und Ziehen -- Waffen und Fahrzeuge tragen die Namen ihrer Vorbilder in der echten Welt +- Waffen und Fahrzeuge tragen die Namen ihrer Vorbilder aus der echten Welt - Ein Feuerleitsystem (FLS) für Hubschrauber und Panzer - Viele Funktionen werden in C/C++ Erweiterungen berechnet - Rückstrahlzonen- und Überdrucksimulation @@ -55,11 +55,11 @@ Die Mod ist **modular gestaltet** — beinahe jede PBO kann entfernt werden, sod - Realistische G-Kräfte - Fahrzeuge abschließen - Realistische Nacht- und Thermalsicht -- Magazin umpacken +- Magazine umpacken - Realistische Waffen Er- bzw. Überhitzung -- Temporäre Taubheit bei zu lauten Geräuschen -- Verbesserte Ragdollphysik -- Verbesserte Interaktionen für AARs und Munitionsschlepper +- Temporäre Taubheit bei zu lauten Geräuschen +- Verbesserte Ragdoll-Physik +- Verbesserte Interaktionen für MG2s und Munitionsschlepper - Einstellbare Zielfernrohre - Keine Ruheanimationen bei gesenkter Waffe - Über Hindernisse springen, über Mauern klettern, Zäune durchtrennen @@ -72,12 +72,12 @@ Du hast ACE3 installiert, hast aber keine Ahnung was und wie alles funktioniert - [Erste Schritte](http://ace3mod.com/wiki/user/getting-started.html). #### Mitwirken -Wenn du bei der Entwicklung der MOD mithelfen möchtest kannst du dies tun, indem du nach Fehlern Ausschau hältst oder neue Funktionen vorschlägst. Um etwas beizutragen, "Forke" einfach dieses Archiv (bzw. "repository") und erstelle deine "Pull-Request", welche von anderen Entwicklern und Beiträgern überprüft wird. Bitte trage dich dabei in [`AUTHORS.txt`](https://github.com/acemod/ACE3/blob/master/AUTHORS.txt) mit deinem Nutzernamen und einer gütligen Email-Adresse ein. +Wenn du bei der Entwicklung von ACE3 mithelfen möchtest, kannst du dies tun, indem du nach Fehlern Ausschau hältst oder neue Funktionen vorschlägst. Um etwas beizutragen, "Forke" dieses Repository und erstelle deine "Pull-Requests", welche von anderen Entwicklern und Beiträgern überprüft werden. Bitte trage dich dabei in [`AUTHORS.txt`](https://github.com/acemod/ACE3/blob/master/AUTHORS.txt) mit deinem Nutzernamen und einer gültigen Email-Adresse ein. -Um einen Fehler, Anregungen oder neue Funktionalitäten uns mitzuteilen: Nutze unseren [Issue Tracker](https://github.com/acemod/ACE3/issues). Besuche auch: +Um uns einen Fehler, Anregungen oder neue Funktionalitäten mitzuteilen: Nutze unseren [Issue Tracker](https://github.com/acemod/ACE3/issues). Besuche auch: - [Wie kann ich ein Problem melden](http://ace3mod.com/wiki/user/how-to-report-an-issue.html) - [Wie kann ich ein Wunsch zu einer neuen Funktion mitteilen?](http://ace3mod.com/wiki/user/how-to-make-a-feature-request.html) -#### Testen & MOD erstellen -Wenn du die neusten Entwicklungen erleben und uns dabei helfen möchtest bestehende Fehler zu entdecken, lade dir einfach die "Master Branch" herunter. Entweder nutzt du [Git](https://help.github.com/articles/fetching-a-remote/) - wenn die Schritte bekannt sind - oder du lädst es dir direkt über [diesen Link](https://github.com/acemod/ACE3/archive/master.zip) herunter. -Wie du deine eigene Entwicklungsumgebung und eine Testversion von ACE3 erstellst folge [dieser Anleitung](https://github.com/acemod/ACE3/blob/master/documentation/development/setting-up-the-development-environment.md). +#### Testen & Mod erstellen +Wenn du die neusten Entwicklungen erleben und uns dabei helfen möchtest bestehende Fehler zu entdecken, lade dir die "Master Branch" herunter. Entweder nutzt du [Git](https://help.github.com/articles/fetching-a-remote/) - wenn die Schritte bekannt sind - oder du lädst es dir direkt über [diesen Link](https://github.com/acemod/ACE3/archive/master.zip) herunter. +Wie du deine eigene Entwicklungsumgebung und eine Testversion von ACE3 erstellst, folge [dieser Anleitung](https://github.com/acemod/ACE3/blob/master/documentation/development/setting-up-the-development-environment.md). From aad6cab8964df46774706de4c799a384d972d191 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 19 Oct 2015 01:20:11 -0500 Subject: [PATCH 107/180] #2765 - Fix location check when set to disabled --- addons/medical/ACE_Settings.hpp | 4 ++-- addons/medical/functions/fnc_canTreat.sqf | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index b17610b0e3..02b5375e96 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -154,13 +154,13 @@ class ACE_Settings { category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 3; - values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"}; + values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)}; }; class GVAR(useLocation_SurgicalKit) { category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 2; - values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"}; + values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)}; }; class GVAR(useCondition_PAK) { category = CSTRING(Category_Medical); diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index ba6ced0486..60685ee20a 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -11,6 +11,9 @@ * ReturnValue: * Can Treat * + * Example: + * [player, cursorTarget, "Head", "SurgicalKit"] call ace_medical_fnc_canTreat + * * Public: Yes */ @@ -85,10 +88,11 @@ _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isI _val = missionNamespace getvariable _x; if (typeName _val == "SCALAR") then { _return = switch (_val) do { - case 0: {true}; - case 1: _medVeh; - case 2: _medFacility; - case 3: {call _medFacility || call _medVeh}; + case 0: {true}; //AdvancedMedicalSettings_anywhere + case 1: {call _medVeh}; //AdvancedMedicalSettings_vehicle + case 2: {call _medFacility}; //AdvancedMedicalSettings_facility + case 3: {(call _medFacility) || {call _medVeh}}; //AdvancedMedicalSettings_vehicleAndFacility + default {false}; //Disabled }; }; }; From cfde11d2fa9c87c67ac1c2a14a657506f8a806cb Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 19 Oct 2015 01:45:30 -0500 Subject: [PATCH 108/180] Fix medic treatment location check as well --- addons/medical/functions/fnc_treatment.sqf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index 5e97e31501..2d0e44d488 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -100,10 +100,11 @@ if ("All" in _locations) then { _val = missionNamespace getvariable _x; if (typeName _val == "SCALAR") then { _return = switch (_val) do { - case 0: {true}; - case 1: _medVeh; - case 2: _medFacility; - case 3: {call _medFacility || call _medVeh}; + case 0: {true}; //AdvancedMedicalSettings_anywhere + case 1: {call _medVeh}; //AdvancedMedicalSettings_vehicle + case 2: {call _medFacility}; //AdvancedMedicalSettings_facility + case 3: {(call _medFacility) || {call _medVeh}}; //AdvancedMedicalSettings_vehicleAndFacility + default {false}; //Disabled }; }; }; From c5fd41b9a1993677b62ac0766aabcb7ffa54af0f Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Mon, 19 Oct 2015 09:44:40 +0200 Subject: [PATCH 109/180] Add flat badges to other READMEs --- docs/README_DE.md | 14 +++++++------- docs/README_PL.md | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index 24be427392..7fa29c7489 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -3,25 +3,25 @@

- ACE3 Version + ACE3 Version - ACE3 Download + ACE3 Download - ACE3 Issues + ACE3 Issues - BIF Thread + BIF Thread - ACE3 License + ACE3 License - ACE3 Slack + ACE3 Slack - ACE3 Build Status + ACE3 Build Status

Benötigt die aktuellste Version von CBA A3. Besucht uns auf Facebook | YouTube | Twitter | Reddit

diff --git a/docs/README_PL.md b/docs/README_PL.md index b12f574b6f..4d7f5d1e09 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -3,25 +3,25 @@

- ACE3 Wersja + ACE3 Wersja - ACE3 Pobierz + ACE3 Pobierz - ACE3 Zagadnienia + ACE3 Zagadnienia - Temat BIF + Temat BIF - ACE3 Licencja + ACE3 Licencja - ACE3 Slack + ACE3 Slack - ACE3 Build Status + ACE3 Build Status

Wymaga najnowszej wersji CBA A3. Odwiedź nas na Facebook | YouTube | Twitter | Reddit

From 5db3f6111336418ff9759d86072659b4fae4a455 Mon Sep 17 00:00:00 2001 From: bux578 Date: Mon, 19 Oct 2015 10:59:48 +0200 Subject: [PATCH 110/180] add back the flat-square styles --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0a13712be1..a407f5a299 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ ACE3 Download - ACE3 Issues + ACE3 Issues - BIF Thread + BIF Thread ACE3 License From 9c28ea500423b056237ad984f609b3e4a8468c66 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Mon, 19 Oct 2015 17:21:54 +0200 Subject: [PATCH 111/180] Readme_DE.md, small grammar fix --- docs/README_DE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index 9f85287589..a51c562de8 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -63,7 +63,7 @@ Die Mod ist **modular aufgebaut**. Beinahe jede PBO kann entfernt werden, sodass - Einstellbare Zielfernrohre - Keine Ruheanimationen bei gesenkter Waffe - Über Hindernisse springen, über Mauern klettern, Zäune durchtrennen -- Keine "sprechender Charkater" +- Kein "sprechender Charkater" - Vector IV, MicroDAGR und Kestrel
***und noch viel viel mehr...*** From c227f05f8a0b20b6b5929b89d239c2d06935b344 Mon Sep 17 00:00:00 2001 From: BaerMitUmlaut Date: Mon, 19 Oct 2015 23:28:50 +0200 Subject: [PATCH 112/180] Deprecated isWater --- addons/common/XEH_preInit.sqf | 1 + addons/common/functions/fnc_inWater.sqf | 22 ++++----------- addons/common/functions/fnc_isUnderwater.sqf | 29 ++++++++++++++++++++ 3 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 addons/common/functions/fnc_isUnderwater.sqf diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index e1cc807bdc..9516e4cb5b 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -115,6 +115,7 @@ PREP(isInBuilding); PREP(isModLoaded); PREP(isPlayer); PREP(isTurnedOut); +PREP(isUnderwater); PREP(letterToCode); PREP(lightIntensityFromObject); PREP(loadPerson); diff --git a/addons/common/functions/fnc_inWater.sqf b/addons/common/functions/fnc_inWater.sqf index 7c8e2eee21..3b323469fc 100644 --- a/addons/common/functions/fnc_inWater.sqf +++ b/addons/common/functions/fnc_inWater.sqf @@ -1,29 +1,19 @@ /* * Author: Glowbal - * Check if unit is underwater + * Check if unit's head is underwater * * Arguments: * 0: Unit * * Return Value: - * if unit is in the water (BOOLEAN) + * If unit's head is underwater * * Public: Yes + * + * Deprecated */ #include "script_component.hpp" -params ["_unit"]; +ACE_DEPRECATED("ace_common_fnc_inWater","3.5.0","ace_common_fnc_isUnderwater"); -private "_return"; -_return = false; - -if (surfaceIsWater getPosASL _unit) then { - private "_pos"; - _pos = _unit modelToWorldVisual (_unit selectionPosition "head"); - - if (_pos select 2 < 0) then { - _return = true; - }; -}; - -_return +_this call FUNC(isUnderwater) diff --git a/addons/common/functions/fnc_isUnderwater.sqf b/addons/common/functions/fnc_isUnderwater.sqf new file mode 100644 index 0000000000..d2f399b770 --- /dev/null +++ b/addons/common/functions/fnc_isUnderwater.sqf @@ -0,0 +1,29 @@ +/* + * Author: Glowbal + * Check if unit's head is underwater + * + * Arguments: + * 0: Unit + * + * Return Value: + * If unit's head is underwater + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_unit"]; + +private "_return"; +_return = false; + +if (surfaceIsWater getPosASL _unit) then { + private "_pos"; + _pos = _unit modelToWorldVisual (_unit selectionPosition "head"); + + if (_pos select 2 < 0) then { + _return = true; + }; +}; + +_return From 349447c5ea6795bb382cd809563cd7890592f8c4 Mon Sep 17 00:00:00 2001 From: jonpas Date: Tue, 20 Oct 2015 19:37:49 +0200 Subject: [PATCH 113/180] Readd prone down optics removal --- addons/movement/CfgMoves.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/movement/CfgMoves.hpp b/addons/movement/CfgMoves.hpp index 6aa22f1a47..a828c5278c 100644 --- a/addons/movement/CfgMoves.hpp +++ b/addons/movement/CfgMoves.hpp @@ -114,6 +114,16 @@ class CfgMovesMaleSdr: CfgMovesBasic { leftHandIKCurve[] = {}; }; + // enable optics in prone down stance + class AadjPpneMstpSrasWrflDup; + class AadjPpneMstpSrasWrflDdown: AadjPpneMstpSrasWrflDup { + enableOptics = 1; + }; + class AadjPpneMstpSrasWpstDup; + class AadjPpneMstpSrasWpstDdown: AadjPpneMstpSrasWpstDup { + enableOptics = 2; + }; + // climb animation class AmovPercMstpSnonWnonDnon: StandBase { ConnectTo[] += {"ACE_Climb",0.02}; From 7db5a34b249eef43c3d02b999b0344dc7ec92a8b Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 20 Oct 2015 13:26:42 -0500 Subject: [PATCH 114/180] Interaction Menu - Add setting for animation speed --- addons/interact_menu/ACE_Settings.hpp | 9 +++ addons/interact_menu/functions/fnc_render.sqf | 63 ++++++++----------- .../functions/fnc_renderMenu.sqf | 6 +- addons/interact_menu/stringtable.xml | 6 ++ 4 files changed, 43 insertions(+), 41 deletions(-) diff --git a/addons/interact_menu/ACE_Settings.hpp b/addons/interact_menu/ACE_Settings.hpp index 381405987c..2d516ee6e3 100644 --- a/addons/interact_menu/ACE_Settings.hpp +++ b/addons/interact_menu/ACE_Settings.hpp @@ -96,4 +96,13 @@ class ACE_Settings { displayName = CSTRING(addBuildingActions); description = CSTRING(addBuildingActionsDescription); }; + class GVAR(menuAnimationSpeed) { + value = 0; + typeName = "SCALAR"; + isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); + displayName = CSTRING(menuAnimationSpeed); + description = CSTRING(menuAnimationSpeed_Description); + values[] = {"$str_speed_normal", "2x", "3x (gotta go fast)"}; + }; }; diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf index 54f197a2a3..0addd42483 100644 --- a/addons/interact_menu/functions/fnc_render.sqf +++ b/addons/interact_menu/functions/fnc_render.sqf @@ -14,13 +14,12 @@ BEGIN_COUNTER(fnc_render); -private ["_cursorPos2", "_p1", "_p2", "_forEachIndex", "_x", "_cursorScreenPos", "_closestDistance", "_closestSelection", "_sPos", "_disSq", "_closest", "_cTime", "_delta", "_foundTarget", "_misMatch", "_hoverPath", "_i", "_actionData", "_player", "_target"]; - -_foundTarget = false; +local _foundTarget = false; if (GVAR(openedMenuType) >= 0) then { - // _cursorPos1 = positionCameraToWorld [0, 0, 2]; - _cursorPos2 = positionCameraToWorld [0, 0, 2]; + BEGIN_COUNTER(fnc_renderMenuOpen); + + local _cursorPos2 = positionCameraToWorld [0, 0, 2]; // Render all available nearby interactions call FUNC(renderActionPoints); @@ -30,27 +29,26 @@ if (GVAR(openedMenuType) >= 0) then { [[0.5,0.5], "\a3\ui_f\data\IGUI\Cfg\Cursors\selected_ca.paa"] call FUNC(renderSelector); }; - _cursorScreenPos = [worldToScreen _cursorPos2, GVAR(cursorPos)] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); + local _cursorScreenPos = [worldToScreen _cursorPos2, GVAR(cursorPos)] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); - _closestDistance = 1000000; - _closestSelection = -1; + local _closestDistance = 1000000; + local _closestSelection = -1; { - _sPos = _x select 1; - _disSq = (((_cursorScreenPos select 0) - (_sPos select 0))^2 + ((_cursorScreenPos select 1) - (_sPos select 1))^2); - if(_disSq < 0.0125 && _disSq < _closestDistance) then { - _closestDistance = _disSq; + _x params ["", "_sPos"]; + local _distanceFromCursor = _cursorScreenPos distance2d _sPos; + if ((_distanceFromCursor < 0.1118) && {_distanceFromCursor < _closestDistance}) then { + _closestDistance = _distanceFromCursor; _closestSelection = _forEachIndex; }; } forEach GVAR(currentOptions); - if(_closestSelection == -1) exitWith {}; - _closest = GVAR(currentOptions) select _closestSelection; + local _closest = GVAR(currentOptions) select _closestSelection; + _closest params ["_action", "_sPos", "_hoverPath"]; - _sPos = _closest select 1; - _cTime = ACE_diagTime; - _delta = _cTime - GVAR(lastTime); + local _cTime = ACE_diagTime; + local _delta = _cTime - GVAR(lastTime); GVAR(lastTime) = _cTime; GVAR(rotationAngle) = (GVAR(rotationAngle) + (270*_delta)) mod 360; @@ -58,28 +56,17 @@ if (GVAR(openedMenuType) >= 0) then { _foundTarget = true; GVAR(actionSelected) = true; - GVAR(selectedAction) = (_closest select 0) select 1; + GVAR(selectedAction) = _action select 1; GVAR(selectedTarget) = (GVAR(selectedAction)) select 2; - _misMatch = false; - _hoverPath = (_closest select 2); + local _misMatch = !(GVAR(lastPath) isEqualTo _hoverPath); - if((count GVAR(lastPath)) != (count _hoverPath)) then { - _misMatch = true; - } else { - { - if !(_x isEqualTo (_hoverPath select _forEachIndex)) exitWith { - _misMatch = true; - }; - } forEach GVAR(lastPath); - }; - - if(_misMatch && {ACE_diagTime-GVAR(expandedTime) > 0.25}) then { + if(_misMatch && {ACE_diagTime-GVAR(expandedTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then { GVAR(startHoverTime) = ACE_diagTime; GVAR(lastPath) = _hoverPath; GVAR(expanded) = false; } else { - if(!GVAR(expanded) && ACE_diagTime-GVAR(startHoverTime) > 0.25) then { + if(!GVAR(expanded) && {ACE_diagTime-GVAR(startHoverTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then { GVAR(expanded) = true; // Start the expanding menu animation only if the user is not going up the menu @@ -89,9 +76,8 @@ if (GVAR(openedMenuType) >= 0) then { GVAR(menuDepthPath) = +GVAR(lastPath); // Execute the current action if it's run on hover - private "_runOnHover"; - _tmp = ((GVAR(selectedAction) select 0) select 9) select 3; - _runOnHover = true; + local _tmp = ((GVAR(selectedAction) select 0) select 9) select 3; + local _runOnHover = true; if ((typeName _tmp) == "CODE" ) then { _runOnHover = call _tmp; } else { @@ -103,14 +89,14 @@ if (GVAR(openedMenuType) >= 0) then { }; if (_runOnHover) then { this = GVAR(selectedTarget); - _player = ACE_Player; - _target = GVAR(selectedTarget); + local _player = ACE_Player; + local _target = GVAR(selectedTarget); // Clear the conditions caches ["clearConditionCaches", []] call EFUNC(common,localEvent); // Check the action conditions - _actionData = GVAR(selectedAction) select 0; + local _actionData = GVAR(selectedAction) select 0; if ([_target, _player, _actionData select 6] call (_actionData select 4)) then { // Call the statement [_target, _player, _actionData select 6] call (_actionData select 3); @@ -121,6 +107,7 @@ if (GVAR(openedMenuType) >= 0) then { }; }; }; + END_COUNTER(fnc_renderMenuOpen); }; if(!_foundTarget && GVAR(actionSelected)) then { diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index 21c434fe03..8b8ae963d9 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -101,9 +101,9 @@ if (GVAR(UseListMenu)) then { }; // Animate menu scale -if (_menuInSelectedPath && (_menuDepth == count _path)) then { - _scaleX = _scaleX * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * 8) min 1)); - _scaleY = _scaleY * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * 8) min 1)); +if (_menuInSelectedPath && {_menuDepth == count _path}) then { + _scaleX = _scaleX * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * linearConversion [0, 2, GVAR(menuAnimationSpeed), 8, 16]) min 1)); + _scaleY = _scaleY * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * linearConversion [0, 2, GVAR(menuAnimationSpeed), 8, 16]) min 1)); }; _target = _actionObject; diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index 42966c43c1..37da2aa95c 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -299,5 +299,11 @@ Menu interakce Menú de interacción + + Interaction Animation Speed + + + Makes menu animations faster and decreases the time needed to hover to show sub actions + From 554c303be07b085430fc1892c545b0d35d55acaf Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 20 Oct 2015 13:31:09 -0500 Subject: [PATCH 115/180] InteractionMenu - Auto Expand First Level --- addons/interact_menu/functions/fnc_keyDown.sqf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 8c8ecf0c20..56c0e6e19c 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -78,6 +78,21 @@ if (GVAR(useCursorMenu)) then { GVAR(selfMenuOffset) = ((positionCameraToWorld [0, 0, 2]) call EFUNC(common,positionToASL)) vectorDiff ((positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL)); +if (GVAR(menuAnimationSpeed) > 0) then { + //Auto expand the first level when self, mounted vehicle or zeus (skips the first animation as there is only one choice) + if (GVAR(openedMenuType) == 0) then { + if (isNull curatorCamera) then { + if (vehicle ACE_player != ACE_player) then { + GVAR(menuDepthPath) = [["ACE_SelfActions", (vehicle ACE_player)]]; + }; + } else { + GVAR(menuDepthPath) = [["ACE_ZeusActions", (getAssignedCuratorLogic player)]]; + }; + } else { + GVAR(menuDepthPath) = [["ACE_SelfActions", ACE_player]]; + }; +}; + ["interactMenuOpened", [_menuType]] call EFUNC(common,localEvent); true From 0936238862e56b7a8d4fcecc50558b96644e545d Mon Sep 17 00:00:00 2001 From: VKing Date: Wed, 21 Oct 2015 21:52:48 +0200 Subject: [PATCH 116/180] Fix lead calculation for vehicle FCS --- addons/fcs/functions/fnc_keyDown.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf index a56e94bbf1..ff382a68f0 100644 --- a/addons/fcs/functions/fnc_keyDown.sqf +++ b/addons/fcs/functions/fnc_keyDown.sqf @@ -22,7 +22,7 @@ _distance = call FUNC(getRange); if !(!GVAR(enabled) && FUNC(canUseFCS)) exitWith {}; GVAR(Enabled) = true; -GVAR(Time) = ACE_time; +GVAR(ACE_time) = ACE_time; if (_distance == 0) then { _distance = [5, 5000, 0] call EFUNC(common,getTargetDistance); // maximum distance: 5000m, 5m precision From a899c74133856b3cbb140b8cd3ce7439be0f3674 Mon Sep 17 00:00:00 2001 From: VKing Date: Wed, 21 Oct 2015 22:17:28 +0200 Subject: [PATCH 117/180] ace_fcs_ace_time -> ace_fcs_time --- addons/fcs/XEH_clientInit.sqf | 2 +- addons/fcs/functions/fnc_keyDown.sqf | 2 +- addons/fcs/functions/fnc_keyUp.sqf | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/addons/fcs/XEH_clientInit.sqf b/addons/fcs/XEH_clientInit.sqf index f5131dd135..3338e739e1 100644 --- a/addons/fcs/XEH_clientInit.sqf +++ b/addons/fcs/XEH_clientInit.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" GVAR(enabled) = false; -GVAR(ACE_time) = 0; +GVAR(time) = 0; GVAR(position) = [0,0,0]; if (!hasInterface) exitWith {}; diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf index ff382a68f0..cea7196570 100644 --- a/addons/fcs/functions/fnc_keyDown.sqf +++ b/addons/fcs/functions/fnc_keyDown.sqf @@ -22,7 +22,7 @@ _distance = call FUNC(getRange); if !(!GVAR(enabled) && FUNC(canUseFCS)) exitWith {}; GVAR(Enabled) = true; -GVAR(ACE_time) = ACE_time; +GVAR(time) = ACE_time; if (_distance == 0) then { _distance = [5, 5000, 0] call EFUNC(common,getTargetDistance); // maximum distance: 5000m, 5m precision diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index 1e831d6df3..ca4b791a7c 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -60,7 +60,7 @@ private ["_movingAzimuth", "_posTarget", "_velocityTarget"]; // MOVING TARGETS _movingAzimuth = 0; -if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) then { +if (ACE_time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then { // calculate speed of target _posTarget = [ (getPos _vehicle select 0) + _distance * (_weaponDirection select 0), @@ -68,9 +68,9 @@ if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) (getPos _vehicle select 2) + _distance * (_weaponDirection select 2) ]; _velocityTarget = [ - ((_posTarget select 0) - (GVAR(position) select 0)) / (ACE_time - GVAR(ACE_time)), - ((_posTarget select 1) - (GVAR(position) select 1)) / (ACE_time - GVAR(ACE_time)), - ((_posTarget select 2) - (GVAR(position) select 2)) / (ACE_time - GVAR(ACE_time)) + ((_posTarget select 0) - (GVAR(position) select 0)) / (ACE_time - GVAR(time)), + ((_posTarget select 1) - (GVAR(position) select 1)) / (ACE_time - GVAR(time)), + ((_posTarget select 2) - (GVAR(position) select 2)) / (ACE_time - GVAR(time)) ]; private ["_magazineType", "_ammoType", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_initSpeedCoef", "_velocityMagnitude"]; @@ -90,7 +90,7 @@ if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) if (_initSpeedCoef > 0) then { _initSpeed = _initSpeedCoef; }; - + if (_simulationStep != 0) then { private ["_posX", "_velocityX", "_velocityY", "_timeToTarget"]; @@ -130,7 +130,7 @@ if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) }; }; GVAR(enabled) = false; -GVAR(ACE_time) = -1; +GVAR(time) = -1; private ["_viewDiff", "_FCSAzimuth", "_FCSMagazines", "_FCSElevation"]; @@ -157,7 +157,7 @@ _FCSElevation = []; _maxElev = getNumber (_turretConfig >> "maxElev"); _initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "airFriction"); - + { private ["_weapon", "_muzzles", "_weaponMagazines", "_muzzleMagazines"]; _weapon = _x; @@ -179,7 +179,7 @@ _FCSElevation = []; }; }; } forEach _weapons; - + _offset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, _angleTarget, _distance]; _offset = parseNumber _offset; @@ -209,4 +209,4 @@ if(_playSound) then { if(_showHint) then { [format ["%1: %2", localize LSTRING(ZeroedTo), _distance]] call EFUNC(common,displayTextStructured); -}; \ No newline at end of file +}; From 069169cc7211d366473f21a1529df91b7c563eb3 Mon Sep 17 00:00:00 2001 From: VKing Date: Wed, 21 Oct 2015 22:52:21 +0200 Subject: [PATCH 118/180] Changed ACE_time back to time in comments where appropriate --- .../functions/fnc_addScrollWheelEventHandler.sqf | 2 +- addons/common/functions/fnc_cachedCall.sqf | 2 +- addons/common/functions/fnc_getDeathAnim.sqf | 2 +- addons/common/functions/fnc_progressBar.sqf | 2 +- addons/common/functions/fnc_setVariablePublic.sqf | 4 ++-- .../common/functions/fnc_throttledPublicVariable.sqf | 2 +- addons/common/functions/fnc_waitAndExecute.sqf | 2 +- addons/disarming/functions/fnc_disarmDropItems.sqf | 2 +- addons/dragging/functions/fnc_startCarry.sqf | 2 +- addons/dragging/functions/fnc_startDrag.sqf | 2 +- addons/dragging/functions/fnc_startDragPFH.sqf | 2 +- addons/explosives/functions/fnc_detonateExplosive.sqf | 2 +- addons/fcs/functions/fnc_keyUp.sqf | 10 +++++----- addons/gforces/functions/fnc_pfhUpdateGForces.sqf | 2 +- addons/grenades/functions/fnc_flashbangExplosionEH.sqf | 2 +- addons/javelin/functions/fnc_onOpticLoad.sqf | 4 ++-- .../functions/fnc_simulateRepackEvents.sqf | 2 +- addons/map/functions/fnc_determineMapLight.sqf | 2 +- addons/medical/XEH_respawn.sqf | 2 +- .../medical/functions/fnc_addHeartRateAdjustment.sqf | 2 +- addons/medical/functions/fnc_onMedicationUsage.sqf | 2 +- addons/medical/functions/fnc_playInjuredSound.sqf | 2 +- addons/medical/functions/fnc_setUnconscious.sqf | 2 +- .../fnc_treatmentAdvanced_medicationLocal.sqf | 2 +- .../functions/fnc_dev_simulateFindSolution.sqf | 2 +- addons/mk6mortar/functions/fnc_dev_simulateShot.sqf | 4 ++-- addons/overheating/functions/fnc_cooldown.sqf | 2 +- .../reloadlaunchers/functions/fnc_reloadLauncher.sqf | 2 +- addons/scopes/functions/fnc_showZeroing.sqf | 2 +- 29 files changed, 36 insertions(+), 36 deletions(-) diff --git a/addons/common/functions/fnc_addScrollWheelEventHandler.sqf b/addons/common/functions/fnc_addScrollWheelEventHandler.sqf index ef60270695..df1601c95a 100644 --- a/addons/common/functions/fnc_addScrollWheelEventHandler.sqf +++ b/addons/common/functions/fnc_addScrollWheelEventHandler.sqf @@ -1,6 +1,6 @@ /* * Author: commy2 - * Add an event handler that executes every ACE_time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games. + * Add an event handler that executes every time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games. * _this will be [Interval] where 'Interval' is a number. * * Arguments: diff --git a/addons/common/functions/fnc_cachedCall.sqf b/addons/common/functions/fnc_cachedCall.sqf index e1e0e16118..59350d0483 100644 --- a/addons/common/functions/fnc_cachedCall.sqf +++ b/addons/common/functions/fnc_cachedCall.sqf @@ -1,6 +1,6 @@ /* * Author: esteldunedain, Jaynus - * Returns the result of the function and caches it up to a given ACE_time or event + * Returns the result of the function and caches it up to a given time or event * * Arguments: * 0: Parameters diff --git a/addons/common/functions/fnc_getDeathAnim.sqf b/addons/common/functions/fnc_getDeathAnim.sqf index c88f89d35f..590418bf25 100644 --- a/addons/common/functions/fnc_getDeathAnim.sqf +++ b/addons/common/functions/fnc_getDeathAnim.sqf @@ -1,6 +1,6 @@ /* * Author: Glowbal, PabstMirror - * Get the death animation for the unit at current ACE_time + * Get the death animation for the unit at current time * * Arguments: * 0: unit diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf index 29db1cd0c6..d93273a0c3 100644 --- a/addons/common/functions/fnc_progressBar.sqf +++ b/addons/common/functions/fnc_progressBar.sqf @@ -4,7 +4,7 @@ * Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode] * * Arguments: - * 0: NUMBER - Total Time (in game "ACE_time" seconds) + * 0: NUMBER - Total Time (in game "time" seconds) * 1: ARRAY - Arguments, passed to condition, fail and finish * 2: CODE or STRING - On Finish: Code called or STRING raised as event. * 3: CODE or STRING - On Failure: Code called or STRING raised as event. diff --git a/addons/common/functions/fnc_setVariablePublic.sqf b/addons/common/functions/fnc_setVariablePublic.sqf index b6fb58b0f4..67dbd5fd2f 100644 --- a/addons/common/functions/fnc_setVariablePublic.sqf +++ b/addons/common/functions/fnc_setVariablePublic.sqf @@ -1,12 +1,12 @@ /* * Author: commy2 and joko // Jonas - * Sets a public variable, but wait a certain amount of ACE_time to transfer the value over the network. Changing the value by calling this function again resets the windup timer. + * Sets a public variable, but wait a certain amount of time to transfer the value over the network. Changing the value by calling this function again resets the windup timer. * * Arguments: * 0: Object the variable should be assigned to * 1: Name of the variable * 2: Value of the variable - * 3: Windup ACE_time (default: 1) + * 3: Windup time (default: 1) * * Return Value: * None diff --git a/addons/common/functions/fnc_throttledPublicVariable.sqf b/addons/common/functions/fnc_throttledPublicVariable.sqf index cdc72f4450..67cfc50f9a 100644 --- a/addons/common/functions/fnc_throttledPublicVariable.sqf +++ b/addons/common/functions/fnc_throttledPublicVariable.sqf @@ -19,7 +19,7 @@ params ["_unit", "_varName", "_maxDelay"]; -// Create the publish scheduler PFH the first ACE_time +// Create the publish scheduler PFH the first time if (isNil QGVAR(publishSchedId)) then { GVAR(publishVarNames) = []; GVAR(publishNextTime) = 1e7; diff --git a/addons/common/functions/fnc_waitAndExecute.sqf b/addons/common/functions/fnc_waitAndExecute.sqf index af59e301f7..6f282ba656 100644 --- a/addons/common/functions/fnc_waitAndExecute.sqf +++ b/addons/common/functions/fnc_waitAndExecute.sqf @@ -1,6 +1,6 @@ /* * Author: esteldunedain - * Executes a code once with a given game ACE_time delay, using a PFH + * Executes a code once with a given game time delay, using a PFH * * Arguments: * 0: Code to execute diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index 91eff1c99d..be2f932028 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -63,7 +63,7 @@ if (isNull _holder) then { if (isNull _holder) exitWith { [_caller, _target, "Debug: Null Holder"] call FUNC(eventTargetFinish); }; -//Make sure only one drop operation at a ACE_time (using PFEH system as a queue) +//Make sure only one drop operation at a time (using PFEH system as a queue) if (_holder getVariable [QGVAR(holderInUse), false]) exitWith { [{ _this call FUNC(disarmDropItems); diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index a95a8f9fb4..3b08de2c9d 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -61,7 +61,7 @@ if (_target isKindOf "CAManBase") then { [_unit, _target, true] call EFUNC(common,claim); -// prevents draging and carrying at the same ACE_time +// prevents draging and carrying at the same time _unit setVariable [QGVAR(isCarrying), true, true]; // required for aborting animation diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index d3e55bdaea..6ad315ce00 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -45,7 +45,7 @@ if (_target isKindOf "CAManBase") then { [_target, "AinjPpneMrunSnonWnonDb_grab", 2, true] call EFUNC(common,doAnimation); }; -// prevents draging and carrying at the same ACE_time +// prevents draging and carrying at the same time _unit setVariable [QGVAR(isDragging), true, true]; [FUNC(startDragPFH), 0.2, [_unit, _target, ACE_time + 5]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dragging/functions/fnc_startDragPFH.sqf b/addons/dragging/functions/fnc_startDragPFH.sqf index 1edbd92a99..14af1575a6 100644 --- a/addons/dragging/functions/fnc_startDragPFH.sqf +++ b/addons/dragging/functions/fnc_startDragPFH.sqf @@ -31,7 +31,7 @@ if (!alive _target || {_unit distance _target > 10}) then { [_idPFH] call CBA_fnc_removePerFrameHandler; }; -// timeout. Do nothing. Quit. ACE_time, because anim length is linked to ingame ACE_time. +// timeout. Do nothing. Quit. ACE_time, because anim length is linked to ingame time. if (ACE_time > _timeOut) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; diff --git a/addons/explosives/functions/fnc_detonateExplosive.sqf b/addons/explosives/functions/fnc_detonateExplosive.sqf index 373e72ac21..74e4dfca11 100644 --- a/addons/explosives/functions/fnc_detonateExplosive.sqf +++ b/addons/explosives/functions/fnc_detonateExplosive.sqf @@ -7,7 +7,7 @@ * 1: Max range (-1 to ignore) * 2: Explosive * 0: Explosive - * 1: Fuse ACE_time + * 1: Fuse time * * Return Value: * None diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index 1e831d6df3..a200bc235a 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -75,7 +75,7 @@ if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) private ["_magazineType", "_ammoType", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_initSpeedCoef", "_velocityMagnitude"]; - // estimate ACE_time to target + // estimate time to target _magazineType = _vehicle currentMagazineTurret _turret; _ammoType = getText (configFile >> "CfgMagazines" >> _magazineType >> "ammo"); _initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazineType >> "initSpeed"); @@ -90,7 +90,7 @@ if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) if (_initSpeedCoef > 0) then { _initSpeed = _initSpeedCoef; }; - + if (_simulationStep != 0) then { private ["_posX", "_velocityX", "_velocityY", "_timeToTarget"]; @@ -157,7 +157,7 @@ _FCSElevation = []; _maxElev = getNumber (_turretConfig >> "maxElev"); _initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "airFriction"); - + { private ["_weapon", "_muzzles", "_weaponMagazines", "_muzzleMagazines"]; _weapon = _x; @@ -179,7 +179,7 @@ _FCSElevation = []; }; }; } forEach _weapons; - + _offset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, _angleTarget, _distance]; _offset = parseNumber _offset; @@ -209,4 +209,4 @@ if(_playSound) then { if(_showHint) then { [format ["%1: %2", localize LSTRING(ZeroedTo), _distance]] call EFUNC(common,displayTextStructured); -}; \ No newline at end of file +}; diff --git a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf index b7173f5742..ee1bc8ca4a 100644 --- a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf +++ b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf @@ -19,7 +19,7 @@ EXPLODE_2_PVT(_this,_params,_pfhId); _interval = ACE_time - GVAR(lastUpdateTime); -// Update the g-forces at constant game ACE_time intervals +// Update the g-forces at constant game time intervals if (_interval < INTERVAL) exitWith {}; if (isNull ACE_player) exitWith {}; diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index b45dc099fc..0ac6502284 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -103,7 +103,7 @@ _affected = _grenade nearEntities ["CAManBase", 20]; GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,(0.8 + _strength) min 1,[1,1,1,0],[0,0,0,1],[0,0,0,0]]; GVAR(flashbangPPEffectCC) ppEffectCommit 0.01; - //PARTIALRECOVERY - start decreasing effect over ACE_time + //PARTIALRECOVERY - start decreasing effect over time [{ params ["_strength"]; diff --git a/addons/javelin/functions/fnc_onOpticLoad.sqf b/addons/javelin/functions/fnc_onOpticLoad.sqf index 895a48c910..cb4eac74f9 100644 --- a/addons/javelin/functions/fnc_onOpticLoad.sqf +++ b/addons/javelin/functions/fnc_onOpticLoad.sqf @@ -2,7 +2,7 @@ #include "script_component.hpp" TRACE_1("enter", _this); -#define __LOCKONTIMERANDOM 2 // Deviation in lock on ACE_time +#define __LOCKONTIMERANDOM 2 // Deviation in lock on time if((count _this) > 0) then { uiNameSpace setVariable ['ACE_RscOptics_javelin',_this select 0]; @@ -29,7 +29,7 @@ uiNameSpace setVariable [QGVAR(arguments), 0, // Run Time 0, // Lock Time 0, // Sound timer - (random __LOCKONTIMERANDOM), // random lock ACE_time addition + (random __LOCKONTIMERANDOM), // random lock time addition -1 ] ]; diff --git a/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf b/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf index 646bd880af..230bdefb4f 100644 --- a/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf +++ b/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf @@ -9,7 +9,7 @@ * 2: Magazine is a belt * * Return Value: - * Array in format [ACE_time, isBullet, array of ammo counts] + * Array in format [time, isBullet, array of ammo counts] * * Example: * [10, [1,2,3,8], false] call ace_magazinerepack_fnc_simulateRepackEvents = diff --git a/addons/map/functions/fnc_determineMapLight.sqf b/addons/map/functions/fnc_determineMapLight.sqf index 8204b4b7f8..01f3882f1f 100644 --- a/addons/map/functions/fnc_determineMapLight.sqf +++ b/addons/map/functions/fnc_determineMapLight.sqf @@ -26,7 +26,7 @@ _fnc_blendColor = { (_c1 select 3) * (1 - _alpha) + (_c2 select 3) * _alpha] }; -// Ambient light tint depending on ACE_time of day +// Ambient light tint depending on time of day _lightTint = switch (true) do { case (sunOrMoon == 1.0) : { [0.5,0.5,0.5,1] }; case (sunOrMoon > 0.80) : {[[1.0 - overcast,0.2,0,1], [1,1,1,1], (sunOrMoon - 0.8)/0.2] call _fnc_blendColor}; diff --git a/addons/medical/XEH_respawn.sqf b/addons/medical/XEH_respawn.sqf index b5b07bf141..438e7396cc 100644 --- a/addons/medical/XEH_respawn.sqf +++ b/addons/medical/XEH_respawn.sqf @@ -10,7 +10,7 @@ if (!(_unit getVariable ["ACE_isUnconscious", false])) then { [_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus); }; -// Remove maximum unconsciousness ACE_time handler +// Remove maximum unconsciousness time handler _maxUnconHandle = _unit getVariable [QGVAR(maxUnconTimeHandle), -1]; if (_maxUnconHandle > 0) then { [_maxUnconHandle] call CBA_fnc_removePerFrameHandler; diff --git a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf index 7171eee275..9f2e7a8bf9 100644 --- a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf +++ b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf @@ -5,7 +5,7 @@ * Arguments: * 0: The unit * 1: value - * 2: ACE_time in seconds + * 2: time in seconds * 3: callback * * Return Value: diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf index db4ba737ea..6bef38fa27 100644 --- a/addons/medical/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical/functions/fnc_onMedicationUsage.sqf @@ -7,7 +7,7 @@ * 1: Medication Treatment classname * 2: The medication treatment variablename * 3: Max dosage - * 4: The ACE_time in the system + * 4: The time in the system * 5: Incompatable medication > * * Return Value: diff --git a/addons/medical/functions/fnc_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf index ddf107c840..4792f879ec 100644 --- a/addons/medical/functions/fnc_playInjuredSound.sqf +++ b/addons/medical/functions/fnc_playInjuredSound.sqf @@ -1,7 +1,7 @@ /* * Author: Glowbal * Play the injured sound for a unit if the unit is damaged. The sound broadcasted across MP. - * Will not play if the unit has already played a sound within to close a ACE_time frame. + * Will not play if the unit has already played a sound within to close a time frame. * Delay: With minimal damage (below 1), the delay is (10 + random(50)) seconds. Otherwise it is 60 seconds / damage. * * Arguments: diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index cb9fff0693..aac48a8641 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -5,7 +5,7 @@ * Arguments: * 0: The unit that will be put in an unconscious state * 1: Set unconsciouns (default: true) - * 2: Minimum unconscious ACE_time (default: (round(random(10)+5))) + * 2: Minimum unconscious time (default: (round(random(10)+5))) * 3: Force AI Unconscious (skip random death chance) (default: false) * * ReturnValue: diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf index 00a4fae8d9..c2797d825d 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf @@ -84,7 +84,7 @@ _resistance = _target getvariable [QGVAR(peripheralResistance), 100]; _resistance = _resistance + _viscosityChange; _target setvariable [QGVAR(peripheralResistance), _resistance max 0]; -// Call back to ensure that the medication is decreased over ACE_time +// Call back to ensure that the medication is decreased over time [_target, _classname, _varName, _maxDose, _timeInSystem, _inCompatableMedication, _viscosityChange, _painReduce] call FUNC(onMedicationUsage); true diff --git a/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf b/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf index 32a5a314a7..d302a40f40 100644 --- a/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf +++ b/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf @@ -51,5 +51,5 @@ while {(_numberOfAttempts < MAX_ATTEMPTS) && {(abs _error) > 0.2}} do { }; if (_numberOfAttempts >= MAX_ATTEMPTS) exitWith {[]}; -//return the elevation and ACE_time required +//return the elevation and time required [_solutionElevation, (_lastTestResult select 1)] diff --git a/addons/mk6mortar/functions/fnc_dev_simulateShot.sqf b/addons/mk6mortar/functions/fnc_dev_simulateShot.sqf index 65f87256fe..0e53807a6b 100644 --- a/addons/mk6mortar/functions/fnc_dev_simulateShot.sqf +++ b/addons/mk6mortar/functions/fnc_dev_simulateShot.sqf @@ -45,7 +45,7 @@ _currentVelocity = [0, (_muzzleVelocity * cos _angleDeg), (_muzzleVelocity * sin _currentTime = 0; _lastPos = _currentPos; -_kCoefficent = -1 * _relDensity * _airFriction; //save ACE_time in the loop and compute once +_kCoefficent = -1 * _relDensity * _airFriction; //save time in the loop and compute once while {((_currentVelocity select 2) > 0) || ((_currentPos select 2) >= _heightOfTarget)} do { _lastPos = _currentPos; @@ -64,7 +64,7 @@ _linConversion = linearConversion [(_lastPos select 2), (_currentPos select 2), _middlePos = (_lastPos vectorMultiply (1 - _linConversion)) vectorAdd (_currentPos vectorMultiply (_linConversion)); // _middlePosOld = (_lastPos vectorAdd _currentPos) vectorMultiply 0.5; -//Same to find travel ACE_time +//Same to find travel time _middleTotalTravelTime = _currentTime - (_timeStep * (1-_linConversion)); //Find shot offset (from crosswind), in degrees diff --git a/addons/overheating/functions/fnc_cooldown.sqf b/addons/overheating/functions/fnc_cooldown.sqf index 9e54d35b56..52052c7251 100644 --- a/addons/overheating/functions/fnc_cooldown.sqf +++ b/addons/overheating/functions/fnc_cooldown.sqf @@ -16,7 +16,7 @@ EXPLODE_3_PVT(_this,_temperature,_barrelMass,_totalTime); -// If a long ACE_time passed since the last shot, there's no need to calculate anything; the weapon should be cool +// If a long time passed since the last shot, there's no need to calculate anything; the weapon should be cool if (_totalTime > 1800) exitWith {0}; private ["_barrelSurface", "_time", "_deltaTime"]; diff --git a/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf index a14e0dfc1f..fc802a025c 100644 --- a/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf +++ b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf @@ -21,5 +21,5 @@ _target selectWeapon _weapon; if (currentWeapon _target != _weapon) exitWith {}; if (currentMagazine _target != "") exitWith {}; -// command is wip, reload ACE_time for launchers is not intended. +// command is wip, reload time for launchers is not intended. _target addWeaponItem [_weapon, _magazine]; diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf index d3d4a38a9d..dd302ff333 100644 --- a/addons/scopes/functions/fnc_showZeroing.sqf +++ b/addons/scopes/functions/fnc_showZeroing.sqf @@ -44,7 +44,7 @@ _horizontal = _display displayCtrl 13; _vertical ctrlSetText (str _elevation); _horizontal ctrlSetText (str _windage); -// Set the ACE_time when to hide the knobs +// Set the time when to hide the knobs GVAR(timeToHide) = ACE_diagTime + 3.0; if !(isNil QGVAR(fadePFH)) exitWith {}; From e340f5164c6a8a566e386a16a6c7f1c00ab572b6 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 22 Oct 2015 20:54:09 -0500 Subject: [PATCH 119/180] Wirecutters - Update Fence Configs, Use faster getModelInfo --- addons/logistics_wirecutter/CfgVehicles.hpp | 12 ++++++------ .../functions/fnc_interactEH.sqf | 2 +- .../functions/fnc_isFence.sqf | 19 +++++-------------- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/addons/logistics_wirecutter/CfgVehicles.hpp b/addons/logistics_wirecutter/CfgVehicles.hpp index 0b584409d3..d9c2943d45 100644 --- a/addons/logistics_wirecutter/CfgVehicles.hpp +++ b/addons/logistics_wirecutter/CfgVehicles.hpp @@ -11,16 +11,16 @@ class CfgVehicles { class Land_Net_Fence_4m_F: Wall_F { GVAR(isFence) = 1; }; class Land_Net_Fence_8m_F: Wall_F { GVAR(isFence) = 1; }; - class Land_Net_FenceD_8m_F: Wall_F { GVAR(isFence) = 1; }; class Land_New_WiredFence_5m_F: Wall_F { GVAR(isFence) = 1; }; - class Land_New_WiredFence_10m_Dam_F: Wall_F { GVAR(isFence) = 1; }; class Land_New_WiredFence_10m_F: Wall_F { GVAR(isFence) = 1; }; - class Land_Pipe_fence_4m_F: Wall_F { GVAR(isFence) = 1; }; - class Land_Pipe_fence_4mNoLC_F: Wall_F { GVAR(isFence) = 1; }; class Land_SportGround_fence_F: Wall_F { GVAR(isFence) = 1; }; class Land_Wired_Fence_4m_F: Wall_F { GVAR(isFence) = 1; }; - class Land_Wired_Fence_4mD_F: Wall_F { GVAR(isFence) = 1; }; class Land_Wired_Fence_8m_F: Wall_F { GVAR(isFence) = 1; }; - class Land_Wired_Fence_8mD_F: Wall_F { GVAR(isFence) = 1; }; + class Land_SportGround_fence_noLC_F: Wall_F { GVAR(isFence) = 1; }; + class Land_Mil_WiredFence_F: Wall_F { GVAR(isFence) = 1; }; + class Land_IndFnc_Corner_F: Wall_F { GVAR(isFence) = 1; }; + class Land_IndFnc_9_F: Wall_F { GVAR(isFence) = 1; }; + class Land_IndFnc_3_Hole_F: Wall_F { GVAR(isFence) = 1; }; + class Land_IndFnc_3_F: Wall_F { GVAR(isFence) = 1; }; class Land_Razorwire_F: NonStrategic { GVAR(isFence) = 1; }; }; diff --git a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf index e93296e44a..e28ff17db6 100644 --- a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf +++ b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf @@ -56,7 +56,7 @@ TRACE_1("Starting wire-cut action PFEH",_interactionType); if ([_x] call FUNC(isFence)) then { _fencesHelped pushBack _x; _helper = "ACE_LogicDummy" createVehicleLocal (getpos _x); - _action = [QGVAR(helperCutFence), (localize LSTRING(CutFence)), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), _fncStatement, _fncCondition, {}, _x, [0,0,0], 5] call EFUNC(interact_menu,createAction); + _action = [QGVAR(helperCutFence), (localize LSTRING(CutFence)), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), _fncStatement, _fncCondition, {}, _x, {[0,0,0]}, 5.5] call EFUNC(interact_menu,createAction); [_helper, 0, [],_action] call EFUNC(interact_menu,addActionToObject); _helper setPosASL ((getPosASL _x) vectorAdd [0,0,1.25]); _addedHelpers pushBack _helper; diff --git a/addons/logistics_wirecutter/functions/fnc_isFence.sqf b/addons/logistics_wirecutter/functions/fnc_isFence.sqf index c1e30a7e6f..449ffd7b77 100644 --- a/addons/logistics_wirecutter/functions/fnc_isFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_isFence.sqf @@ -19,23 +19,14 @@ params ["_object"]; TRACE_1("params",_object); -private ["_typeOf", "_returnValue"]; +local _typeOf = typeOf _object; -_typeOf = typeOf _object; -_returnValue = false; - -if (_typeOf != "") then { +local _returnValue = if (_typeOf != "") then { //If the fence has configEntry we can check it directly - _returnValue = (1 == (getNumber (configFile >> "CfgVehicles" >> _typeOf >> QGVAR(isFence)))); + (1 == (getNumber (configFile >> "CfgVehicles" >> _typeOf >> QGVAR(isFence)))); } else { - //TODO: 1.50 use getModelInfo - _typeOf = toLower (str _object); //something like "123201: wall_indfnc_9.p3d" - { - if ((_typeOf find _x) != -1) exitWith { - _returnValue = true; - }; - nil - } count FENCE_P3DS; + //Check the p3d name against list (in script_component.hpp) + ((getModelInfo _object) select 0) in FENCE_P3DS; }; _returnValue From ef681e4332c176a8fec182de008ef02351712525 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 23 Oct 2015 13:11:11 -0500 Subject: [PATCH 120/180] Captives - Fix adding duplicate animEH --- addons/captives/functions/fnc_setHandcuffed.sqf | 11 ++++++----- addons/captives/functions/fnc_setSurrendered.sqf | 9 ++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index 00122862eb..0bc2e85c52 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -56,8 +56,11 @@ if (_state) then { //Adds an animation changed eh //If we get a change in animation then redo the animation (handles people vaulting to break the animation chain) - private "_animChangedEHID"; - + local _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; + if (_animChangedEHID != -1) then { + TRACE_1("removing animChanged EH",_animChangedEHID); + _unit removeEventHandler ["AnimChanged", _animChangedEHID]; + }; _animChangedEHID = _unit addEventHandler ["AnimChanged", { params ["_unit", "_newAnimation"]; TRACE_2("AnimChanged",_unit,_newAnimation); @@ -67,7 +70,6 @@ if (_state) then { [_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation); }; } else { - _turretPath = []; { _x params ["_xUnit", "", "", "_xTurretPath"]; @@ -90,8 +92,7 @@ if (_state) then { [_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus); //remove AnimChanged EH - private "_animChangedEHID"; - _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; + local _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; TRACE_1("removing animChanged EH",_animChangedEHID); _unit removeEventHandler ["AnimChanged", _animChangedEHID]; _unit setVariable [QGVAR(handcuffAnimEHID), -1]; diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index cdba47a406..171455f3b1 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -48,7 +48,11 @@ if (_state) then { if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then { //Adds an animation changed eh //If we get a change in animation then redo the animation (handles people vaulting to break the animation chain) - private "_animChangedEHID"; + local _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; + if (_animChangedEHID != -1) then { + TRACE_1("removing animChanged EH",_animChangedEHID); + _unit removeEventHandler ["AnimChanged", _animChangedEHID]; + }; _animChangedEHID = _unit addEventHandler ["AnimChanged", { params ["_unit", "_newAnimation"]; if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { @@ -64,8 +68,7 @@ if (_state) then { [_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus); //remove AnimChanged EH - private "_animChangedEHID"; - _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; + local _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; _unit removeEventHandler ["AnimChanged", _animChangedEHID]; _unit setVariable [QGVAR(surrenderAnimEHID), -1]; From 1c26f6c9f5e7093c335f362ddaece8521bb6176d Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 23 Oct 2015 14:17:31 -0500 Subject: [PATCH 121/180] Captives - Module to set handcuffing also add player check for GVAR(requireSurrender) in canApplyHandcuffes --- addons/captives/CfgVehicles.hpp | 22 +++++++++-- .../Icon_Module_Make_Unit_Handcuffed_ca.paa | Bin 0 -> 5625 bytes addons/captives/XEH_preInit.sqf | 1 + addons/captives/config.cpp | 2 +- .../functions/fnc_canApplyHandcuffs.sqf | 3 +- .../functions/fnc_moduleHandcuffed.sqf | 35 ++++++++++++++++++ .../functions/fnc_moduleSurrender.sqf | 27 +++++++------- addons/captives/stringtable.xml | 6 +++ .../Icon_Module_Make_Unit_Handcuffed_ca.png | Bin 0 -> 1293 bytes 9 files changed, 77 insertions(+), 19 deletions(-) create mode 100644 addons/captives/UI/Icon_Module_Make_Unit_Handcuffed_ca.paa create mode 100644 addons/captives/functions/fnc_moduleHandcuffed.sqf create mode 100644 extras/assets/icons/Icon_Module_png/Icon_Module_Make_Unit_Handcuffed_ca.png diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index afda86cfda..eff1cf4c52 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -153,16 +153,32 @@ class CfgVehicles { class GVAR(ModuleSurrender): Module_F { author = ECSTRING(common,ACETeam); category = "ACE"; - displayName = CSTRING(ModuleSurrender_DisplayName); //Make Unit Surrender + displayName = CSTRING(ModuleSurrender_DisplayName); function = QFUNC(moduleSurrender); scope = 2; //show in editor - isGlobal = 1; //run global + isGlobal = 0; //run on server isTriggerActivated = 1; //Wait for triggers icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa)); functionPriority = 0; class Arguments {}; class ModuleDescription: ModuleDescription { - description = CSTRING(ModuleSurrender_Description); //Sync a unit to make them surrender.
Source: ace_captives + description = CSTRING(ModuleSurrender_Description); + sync[] = {"AnyAI"}; + }; + }; + class GVAR(ModuleHandcuffed): Module_F { + author = ECSTRING(common,ACETeam); + category = "ACE"; + displayName = CSTRING(ModuleHandcuffed_DisplayName); + function = QFUNC(moduleHandcuffed); + scope = 2; //show in editor + isGlobal = 0; //run on server + isTriggerActivated = 1; //Wait for triggers + icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Handcuffed_ca.paa)); + functionPriority = 0; + class Arguments {}; + class ModuleDescription: ModuleDescription { + description = CSTRING(ModuleHandcuffed_Description); sync[] = {"AnyAI"}; }; }; diff --git a/addons/captives/UI/Icon_Module_Make_Unit_Handcuffed_ca.paa b/addons/captives/UI/Icon_Module_Make_Unit_Handcuffed_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..85c556cb2ac7c456f369905b44e34450aae5d2b5 GIT binary patch literal 5625 zcmd^@drVVT7{Cvuh`8|3I8b>y9_qxA5yxJ*Ufc$B6RVps#JB}23#hB8+5R%K7g!|z zfm9aElA+z)vWIS?FumC$hEB}_Lcq99!Lp5PfCL#2d1#^K?3`P^)7#s?-6BNeZd$^x z-*>*(`OdlbTtA$Vk+$XejIC*EgwXi-_%4yN)3PXIa#7Am+mKG#hkPl&nx3xX$p1X~ zmWCj7WHCaO4&vN|4 z93PiiEb)g-aoP$GR%=b_>HI6^PZT`!@wV^jkE`%xS^fyAV#o*Lk^5I-ulYuqDmn)2 zVWgF_Xp+fg^_Tnew(mKga(yMn^7(fSVEMbkF-hl(Xw1N}_~(B9N&X}vRzF0VONnRd zf7kqb+9OluVSh%Z1(eo@G=HYM->H;d5_=}n|I^mjr7hK`zf7;MJYTe5-0@7!|Fr&< z?aAXI^`Egm54v1lkN+3bZ0QC4?V`EkgsXz#KuYl__}kW3@T+FwwgbQm`z%@3LVG80 z)G5JWvqZK6&vksWZoeFX-6 z6>NR`^!%PQdhtXN$dlTG9btHaqS!B)zmWaIcZBW#i#|&~GHDmZqI~t=MrTt}#I*I2 z*Ke*lr$^9-laL|)rv~sJj_e(b&)pyrt-GIN{|q*rFLCRy9B~AvNY=+?TFJ~jHa@W( z4{wQlld&qVhOB@0_`A)|>wF?s+1;-Xx;zHOknJ1sb)@XZ!3*TCSOAfcJ{(wn3`gRE zAC3mO$dbos#QPuY@CoYhkOvR4ZAx@P?qne6>x_e*{?RQwgMTuf9(yJBydKlZF@>m{)vF|PS^zV|p+fIoe z!P;7bkXr)vn|B%ODh_kc0Y5|Y69U+NI;d<`K1~Btr`;c+)Sz61N_q1nJin8b1!gWS9kuw`pSQOnt<@LnP?(T}$27O`c;S&Mv-R?pgwv+h$7X4?p7J*-CBE9~yYS;?Lu z(U(udlG7>r6+ItVz~8#wxYR3#?Qa9i^~E$L+fYP9Y50)>@vtS9X>(KZvbTE0o3Y4p z{rPAa7`z5IXEUlbsA-_7MCLZLCX#dIh*HlM=)nrE{_2j;8 OIAw?`3x%Iu(f$Lt=QtYx literal 0 HcmV?d00001 diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf index b59249b937..dcc585ef8e 100644 --- a/addons/captives/XEH_preInit.sqf +++ b/addons/captives/XEH_preInit.sqf @@ -24,6 +24,7 @@ PREP(handlePlayerChanged); PREP(handleRespawn); PREP(handleUnitInitPost); PREP(handleZeusDisplayChanged); +PREP(moduleHandcuffed); PREP(moduleSettings); PREP(moduleSurrender); PREP(setHandcuffed); diff --git a/addons/captives/config.cpp b/addons/captives/config.cpp index cdaf6dc4e4..a9ec2950ee 100644 --- a/addons/captives/config.cpp +++ b/addons/captives/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - units[] = {QGVAR(ModuleSettings), QGVAR(ModuleSurrender)}; + units[] = {QGVAR(ModuleSettings), QGVAR(ModuleSurrender), QGVAR(ModuleHandcuffed)}; weapons[] = {"ACE_CableTie"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ACE_Interaction"}; diff --git a/addons/captives/functions/fnc_canApplyHandcuffs.sqf b/addons/captives/functions/fnc_canApplyHandcuffs.sqf index 368ce3cb7a..f5fa666652 100644 --- a/addons/captives/functions/fnc_canApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_canApplyHandcuffs.sqf @@ -20,11 +20,12 @@ params ["_unit", "_target"]; //Check sides, Player has cableTie, target is alive and not already handcuffed (GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) && -("ACE_CableTie" in (items _unit)) && +{"ACE_CableTie" in (items _unit)} && {alive _target} && {!(_target getVariable [QGVAR(isHandcuffed), false])} && { (_target getVariable ["ACE_isUnconscious", false]) || //isUnconscious + {!([_target] call EFUNC(common,isPlayer))} || //is an AI (not a player) {GVAR(requireSurrender) == 0} || //or don't require surrendering {_target getVariable [QGVAR(isSurrendering), false]} || //or is surrendering {(GVAR(requireSurrender) == 2) && {(currentWeapon _target) == ""}} //or "SurrenderOrNoWeapon" and no weapon diff --git a/addons/captives/functions/fnc_moduleHandcuffed.sqf b/addons/captives/functions/fnc_moduleHandcuffed.sqf new file mode 100644 index 0000000000..4c6cc4c6fc --- /dev/null +++ b/addons/captives/functions/fnc_moduleHandcuffed.sqf @@ -0,0 +1,35 @@ +/* + * Author: PabstMirror + * Module Function to make a unit handcuffed (can be called from editor) + * + * Arguments: + * 0: The Module Logic + * 1: synced objects + * 2: Activated + * + * Return Value: + * Nothing + * + * Example: + * Called from module + * + * Public: No + */ +#include "script_component.hpp" + +params ["_logic", "_units", "_activated"]; + +TRACE_3("params",_logic,_units,_activated); + +if (!_activated) exitWith {}; +if (!isServer) exitWith {}; + +//Modules run before postInit can instal the event handler, so we need to wait a little bit +[{ + params ["_units"]; + { + ["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent); + } forEach _units; +}, [_units], 0.05] call EFUNC(common,waitAndExecute); + +deleteVehicle _logic; diff --git a/addons/captives/functions/fnc_moduleSurrender.sqf b/addons/captives/functions/fnc_moduleSurrender.sqf index bdb0f7c1b5..f5c091a78a 100644 --- a/addons/captives/functions/fnc_moduleSurrender.sqf +++ b/addons/captives/functions/fnc_moduleSurrender.sqf @@ -1,9 +1,9 @@ /* * Author: PabstMirror - * Module Function to make a unit surrender (can be called from editor, or placed with zeus) + * Module Function to make a unit surrender (can be called from editor) * * Arguments: - * 0: The Module Logic Object + * 0: The Module Logic * 1: synced objects * 2: Activated * @@ -17,20 +17,19 @@ */ #include "script_component.hpp" -private ["_bisMouseOver", "_mouseOverObject"]; - params ["_logic", "_units", "_activated"]; +TRACE_3("params",_logic,_units,_activated); + if (!_activated) exitWith {}; +if (!isServer) exitWith {}; -if (local _logic) then { - //Modules run before postInit can instal the event handler, so we need to wait a little bit - [{ - params ["_units"]; - { - ["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent); - } forEach _units; - }, [_units], 0.05]call EFUNC(common,waitAndExecute); +//Modules run before postInit can instal the event handler, so we need to wait a little bit +[{ + params ["_units"]; + { + ["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent); + } forEach _units; +}, [_units], 0.05] call EFUNC(common,waitAndExecute); - deleteVehicle _logic; -}; +deleteVehicle _logic; diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 0ab6cb457d..d4166a495d 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -179,6 +179,12 @@ Egység szinkronizálása, hogy kapituláljon.<br />Forrás: ace_captives Синхронизируйте с юнитами, чтобы сделать их пленными.<br />Источник: ace_captives + + Make Unit Handcuffed + + + Sync a unit to make them handcuffed.<br />Source: ace_captives + Captives Settings Ustawienia więźniów diff --git a/extras/assets/icons/Icon_Module_png/Icon_Module_Make_Unit_Handcuffed_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Make_Unit_Handcuffed_ca.png new file mode 100644 index 0000000000000000000000000000000000000000..e097b6ac7f18eddd66983254e17c060297251d7f GIT binary patch literal 1293 zcmV+o1@iidP)&abeVz~4Haj`qMY#d?_sUO?DNexGv|!^JKs2S{;)Xvvi3e}|G%}@ zxAs1#PLha=x4zgcP?Fid+j@_=!HJhwol1v>i}bop+KfXq;B0_OPVQH%gE0*YQR4|o83@&L<#cHoc9 zEUNPUUnA+bq$83xO4=pqf}{mtdx7V@?ObAfgMW4bFB6-Dj9q?;q@5ay6Oy(E zdb@+Z%LxgwO;TM<8?#P@Zvj>X^%KD7US1EhV2RNDK&J*4c}`Njq!&lg578lMMa&==YoghbzDhCp;xG%@A*sO^eoJ$%GN?IO^fLL2# zE0)5BxCDHL9cckp0LwAAe+i2Nn}8dGF}=VSz>i*E4BQDU40P@S9s+)%G^ZFFBCz;K z%2PTjsYTLE*J+frNYWNbtNiJIofy+0=^05=gSn?lx?j@1gzjnCk$PNgfu!pf7eAbS zgOd>Aj4yt;F}J0Va4-e|G4g=$xH^EH>b@C4|2&rXgwcEtuxo@doxqorrpblM%uGiN z0>Z@PckHM;5@rC4g8Be(xQy@l)uo8ES7gPAK|q+A_5=S!n6n&2$zo$nG7yxTD9!83 z#oRJ<<|pR9JcjQXf*1sZdHgJ3$te1#f$td1LL0GLp=8<{VmfdSrD=6nWoD)$1_Api zy}w_Fo#fK61Y2ka@NLjuz^=d3NSKcOV6rx7>jUkp9Z`M+>Bj# z{ORpWv2()r*!}+}*i$W{#Xs9!2kaL4Zb}yqcCpeH!S-mW@LEZI8j3zihh2&|Dd}<9 z#m2iSVpQZz6kUp)`B!2@{O9ch*!})q?8lEViZ8$xzZ%Od zZ}RqjjMM{IcG*c}O#1%`*8U`ww*h&hMnK*MF)dx+XVH00000NkvXXu0mjf DR3lt> literal 0 HcmV?d00001 From fefe24b7ebd5cc7e5f853b6fd3be4cd299cef6e0 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 24 Oct 2015 19:07:23 -0500 Subject: [PATCH 122/180] Disable debug in parachute --- addons/parachute/functions/fnc_showAltimeter.sqf | 8 +++----- addons/parachute/script_component.hpp | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/addons/parachute/functions/fnc_showAltimeter.sqf b/addons/parachute/functions/fnc_showAltimeter.sqf index 28909f19cd..6f4159e85d 100644 --- a/addons/parachute/functions/fnc_showAltimeter.sqf +++ b/addons/parachute/functions/fnc_showAltimeter.sqf @@ -15,9 +15,7 @@ */ #include "script_component.hpp" -private ["_unit"]; - -_unit = _this select 0; +params ["_unit"]; (["ACE_Altimeter"] call BIS_fnc_rscLayer) cutRsc ["ACE_Altimeter", "PLAIN", 0, true]; if (isNull (uiNamespace getVariable ["ACE_Altimeter", displayNull])) exitWith {}; @@ -27,7 +25,7 @@ GVAR(AltimeterActive) = true; [{ if (!GVAR(AltimeterActive)) exitWith {[_this select 1] call CALLSTACK(cba_fnc_removePerFrameEventHandler)}; disableSerialization; - EXPLODE_4_PVT(_this select 0,_display,_unit,_oldHeight,_prevTime); + (_this select 0) params ["_display", "_unit", "_oldHeight", "_prevTime"]; if !("ACE_Altimeter" in assignedItems _unit) exitWith {[_this select 1] call CALLSTACK(cba_fnc_removePerFrameEventHandler); call FUNC(hideAltimeter)}; private ["_height", "_hour", "_minute", "_descentRate","_HeightText", "_DecendRate", "_TimeText", "_curTime", "_timeDiff"]; @@ -38,7 +36,7 @@ GVAR(AltimeterActive) = true; _hour = floor daytime; _minute = floor ((daytime - _hour) * 60); - _height = (getPosASL _unit) select 2; + _height = ((getPosASL _unit) select 2) + EGVAR(common,mapAltitude); _curTime = ACE_time; _timeDiff = _curTime - _prevTime; _descentRate = if(_timeDiff > 0) then {floor((_oldHeight - _height) / _timeDiff)} else {0}; diff --git a/addons/parachute/script_component.hpp b/addons/parachute/script_component.hpp index 93a3e0d363..5668220421 100644 --- a/addons/parachute/script_component.hpp +++ b/addons/parachute/script_component.hpp @@ -1,4 +1,3 @@ -#define DEBUG_ENABLED_PARACHUTE #define COMPONENT parachute #include "\z\ace\addons\main\script_mod.hpp" From ce5364d7afeebbb1d4f50ba791e3e4e76d3c585c Mon Sep 17 00:00:00 2001 From: Jonathan Pereira Date: Mon, 26 Oct 2015 22:04:03 -0200 Subject: [PATCH 123/180] Added PT-BR translations Added all remaining translations, including dagr, dragging, map, map_gestures, medical, repair, tacticalladder and zeus. --- addons/dagr/stringtable.xml | 6 ++++- addons/dragging/stringtable.xml | 5 ++-- addons/map/stringtable.xml | 2 ++ addons/map_gestures/stringtable.xml | 33 ++++++++++++++++++++++++++- addons/medical/stringtable.xml | 9 +++++++- addons/repair/stringtable.xml | 7 ++++-- addons/tacticalladder/stringtable.xml | 5 ++-- addons/zeus/stringtable.xml | 10 ++++++-- 8 files changed, 66 insertions(+), 11 deletions(-) diff --git a/addons/dagr/stringtable.xml b/addons/dagr/stringtable.xml index 1abd146800..a164ac51f3 100644 --- a/addons/dagr/stringtable.xml +++ b/addons/dagr/stringtable.xml @@ -6,24 +6,28 @@ DAGR DAGR DAGR + DAGR Configure DAGR Konfiguruj DAGR Configurar DAGR Настроить DAGR + Configurar DAGR Toggle DAGR Przełącz DAGR Mostrar DAGR Вкл./выкл. DAGR + Mostrar DAGR Defense Advanced GPS Receiver Defense Advanced GPS Receiver Defense Advanced GPS Receiver Военный многофункциональный GPS-приёмник + Defense Advanced GPS Receiver - + \ No newline at end of file diff --git a/addons/dragging/stringtable.xml b/addons/dragging/stringtable.xml index 4535a8e62e..417493fc75 100644 --- a/addons/dragging/stringtable.xml +++ b/addons/dragging/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -53,6 +53,7 @@ Raise/Lower Heben/Senken Wyżej/Niżej + Levantar/Abaixar - + \ No newline at end of file diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 0488a13493..92547e8632 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -259,10 +259,12 @@ Set Channel At Start Ust. domyślny kanał + Definir canal no início Change the starting marker channel at mission start Ustaw domyślny kanał dla markerów przy starcie misji + Muda o canal do marcador no início da missão \ No newline at end of file diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index e5eab426a3..fe513a4d49 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -3,96 +3,127 @@ Map Gestures + Gestos no mapa Enabled + Ativado Map Gesture Max Range + Distância para gestos no mapa Max range between players to show the map gesture indicator [default: 7 meters] + Distância max. entre os jogadores para mostrar o indicador de gesto no mapa [padrão: 7 metros] Lead Default Alpha + Transparência padrão do líder Fallback Alpha value for group leaders. + Valor de transparência alternativo para líderes de grupo Default Alpha + Transparência padrão Fallback Alpha value. + Valor alternativo de transparência Lead Default Color + Cor padrão para o líder Fallback Color value for group leaders. + Valor de cor alternativa para líderes de grupo Default Color + Cor padrão Fallback Color value. + Valor alternativo de cor Lead Alpha + Transparência do líder Alpha value for group leaders of groups synced with this module. + Valor de transparência para líderes de grupo sincronizados com este módulo. Alpha + Transparência Alpha value for group members of groups synced with this module. + Valor de transparência para membros de grupo sincronizados com este módulo. Lead Color + Cor do líder Color value for group leaders of groups synced with this module. + Valor de cor para líderes de grupo sincronizados com este módulo. Color + Cor Color value for group members of groups synced with this module. + Valor de cor para membros de grupo sincronizados com este módulo. Map Gestures - Group Settings + Gestos no mapa - Definições de Grupo Update Interval + Intervalo de atualizações Time between data updates. + Tempo entre atualização de dados Group color configurations + Configurações de cores de grupo Group color configuration containing arrays of color pairs ([leadColor, color]). + Configuração de cores de grupo contendo arrays com pares de cores ([leadColor, color]). Hash of Group ID mapped to the Group color configuration index. + Hashes de ID de grupos mapeados para o índice de configuração de cor de grupos. GroupID Color configuration mapping + Mapeamento de configuração para cores de GroupID Enables the Map Gestures. + Ativa os gestos no mapa Name Text Color + Cor do texto do nome Color of the name tag text besides the map gestures mark. + Cor do texto da etiqueta de nome que fica embaixo da marcação de gestos no mapa. Map Gestures + Gestos no mapa - + \ No newline at end of file diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 8b4282c555..0a75d67583 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -2105,10 +2105,12 @@ %1 wykonał cykl RKO %1 провел сердечно-легочную реанимацию %1 realicó RCP + %1 realizou RCP %1 used Personal Aid Kit %1 użył apteczki + %1 utilizou KPS Heavily wounded @@ -2223,6 +2225,7 @@ Lecz w pełni zabandażowane hitpointy Curar miembros totalmente vendados Исцелять полностью перебинтованные части тела + Curar hitpoints totalmente enfaixados Pain is only temporarily suppressed @@ -3441,12 +3444,14 @@ Lecz hitpointy Curar puntos de vida Исцелять части тела + Curar hitpoints Heal fully bandaged hitpoints Po bandażowaniu ulecz hitpointy, usuwając z nich ślady krwi i przywracając im pełną sprawność. Curar miembros totalmente vendados Исцелять полностью перебинтованные части тела + Curar totalmente hitpoints enfaixados Pain suppression @@ -3844,12 +3849,14 @@ Ta osoba (%1) jest przytomna i nie może zostać załadowana Esta persona (%1) está despierto y no puede ser cargado Боец (%1) в сознании и не может быть погружен + Esta pessoa (%1) está acordada e não pode ser carregada There is no tourniquet on this body part! Na tej części ciała nie ma stazy! No hay torniquete en esta parte del cuerpo! Нет жгута на этой части тела! + Não existe nenhum torniquete nesta parte do corpo! - + \ No newline at end of file diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml index d4b9527f09..ddbccb7777 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -388,6 +388,7 @@ Ocas Хвост Tail + Cauda Pitot Tube @@ -1000,12 +1001,14 @@ Wym. naprawy kół Requisitos de reparación de ruedas Для ремонта колес требуется + Requerimentos para reparo de rodas Items required to remove/replace wheels Przedmioty potrzebne do wymiany kół Elementos necesarios para quitar/cambiar ruedas Предметы, которые требуются для снятия/замены колес + Itens requeridos para remover/trocar rodas - + \ No newline at end of file diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml index b347c4e2d9..57f03f7600 100644 --- a/addons/tacticalladder/stringtable.xml +++ b/addons/tacticalladder/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -41,6 +41,7 @@ Extend, +Ctrl tilt Ausfahren, +Strg kippen Rozłóż, +Ctrl nachyl + Extender, +Ctrl tilt Position ladder @@ -67,4 +68,4 @@ Pegar escada - + \ No newline at end of file diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 6063f5011a..0281f0a5a0 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -214,15 +214,19 @@ Add Spare Wheel + Adicionar roda sobressalente Adds a Spare Wheel to the vehicle + Adiciona uma roda sobressalente ao veículo Add Spare Track + Adicionar esteira sobressalente Adds a Spare Track to the vehicle + Adiciona uma esteira sobressalente ao veículo Unit must be alive @@ -264,9 +268,11 @@ Unit must be a vehicle with cargo space + Unidade deve ser um veículo com espaço em carga Unit must have cargo space left + Unidade deve conter espaço sobressalente Unit must not be captive @@ -317,4 +323,4 @@ Añadir cualquier objeto creado a todos los directores en la misión - + \ No newline at end of file From 643f4d36dc1115ea7737c123454505381a788c65 Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 28 Oct 2015 08:01:25 +0100 Subject: [PATCH 124/180] add FUNC(hasHatch) --- addons/common/XEH_preInit.sqf | 1 + addons/common/functions/fnc_hasHatch.sqf | 35 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 addons/common/functions/fnc_hasHatch.sqf diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index e1cc807bdc..a9b10c4896 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -223,6 +223,7 @@ PREP(getTurretCopilot); PREP(getDoorTurrets); PREP(getTurretsFFV); PREP(getTurretsOther); +PREP(hasHatch); // missing inventory commands PREP(binocularMagazine); diff --git a/addons/common/functions/fnc_hasHatch.sqf b/addons/common/functions/fnc_hasHatch.sqf new file mode 100644 index 0000000000..59da0938bd --- /dev/null +++ b/addons/common/functions/fnc_hasHatch.sqf @@ -0,0 +1,35 @@ +/* + * Author: commy2 + * Check if unit has a hatch and can turn out. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Unit has a hatch? + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_unit"]; + +local _vehicle = vehicle _unit; + +if (_unit == _vehicle) exitWith {false}; + +local _config = configFile >> "CfgVehicles" >> typeOf _vehicle; + +if (getNumber (_config >> "hideProxyInCombat") != 1) exitWith {false}; + +if (_unit == driver _vehicle) exitWith { + getNumber (_config >> "forceHideDriver") == 0; // return +}; + +local _turret = [_unit] call FUNC(getTurretIndex); + +if (_turret isEqualTo []) exitWith {false}; + +local _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath); + +getNumber (_turretConfig >> "forceHideGunner") == 0; // return From 6ac1d8361d157dd8ececee88f08506b3862bf6d0 Mon Sep 17 00:00:00 2001 From: ColdEvul Date: Wed, 28 Oct 2015 16:00:24 +0100 Subject: [PATCH 125/180] Fixed small UAV carrying allot of cargo. --- addons/cargo/CfgVehicles.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index 111c4d9956..56e3aee2c2 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -171,6 +171,13 @@ class CfgVehicles { GVAR(hasCargo) = 0; }; + // autonomus + class Helicopter_Base_F; + class UAV_01_base_F: Helicopter_Base_F { + GVAR(space) = 0; + GVAR(hasCargo) = 0; + }; + // boats class Ship; class Ship_F: Ship { From 932f09ce60f7b3d060b2e6b79ce75614bcaa8dc4 Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 28 Oct 2015 18:57:47 +0100 Subject: [PATCH 126/180] rename hasHatch to canTurnOut, change description in function header --- addons/common/XEH_preInit.sqf | 2 +- .../common/functions/{fnc_hasHatch.sqf => fnc_canTurnOut.sqf} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename addons/common/functions/{fnc_hasHatch.sqf => fnc_canTurnOut.sqf} (91%) diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index a9b10c4896..bc9f2e96e6 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -223,7 +223,7 @@ PREP(getTurretCopilot); PREP(getDoorTurrets); PREP(getTurretsFFV); PREP(getTurretsOther); -PREP(hasHatch); +PREP(canTurnOut); // missing inventory commands PREP(binocularMagazine); diff --git a/addons/common/functions/fnc_hasHatch.sqf b/addons/common/functions/fnc_canTurnOut.sqf similarity index 91% rename from addons/common/functions/fnc_hasHatch.sqf rename to addons/common/functions/fnc_canTurnOut.sqf index 59da0938bd..c62f1b884a 100644 --- a/addons/common/functions/fnc_hasHatch.sqf +++ b/addons/common/functions/fnc_canTurnOut.sqf @@ -1,6 +1,6 @@ /* * Author: commy2 - * Check if unit has a hatch and can turn out. + * Check if unit is in a vehicle position where unit can turn out. * * Arguments: * 0: Unit From a0bfcdd04c0edba4c0ac8a9c37c2e073ee5c1961 Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 28 Oct 2015 19:01:47 +0100 Subject: [PATCH 127/180] Revert "rename hasHatch to canTurnOut, change description in function header" This reverts commit 932f09ce60f7b3d060b2e6b79ce75614bcaa8dc4. --- addons/common/XEH_preInit.sqf | 2 +- .../common/functions/{fnc_canTurnOut.sqf => fnc_hasHatch.sqf} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename addons/common/functions/{fnc_canTurnOut.sqf => fnc_hasHatch.sqf} (91%) diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index bc9f2e96e6..a9b10c4896 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -223,7 +223,7 @@ PREP(getTurretCopilot); PREP(getDoorTurrets); PREP(getTurretsFFV); PREP(getTurretsOther); -PREP(canTurnOut); +PREP(hasHatch); // missing inventory commands PREP(binocularMagazine); diff --git a/addons/common/functions/fnc_canTurnOut.sqf b/addons/common/functions/fnc_hasHatch.sqf similarity index 91% rename from addons/common/functions/fnc_canTurnOut.sqf rename to addons/common/functions/fnc_hasHatch.sqf index c62f1b884a..59da0938bd 100644 --- a/addons/common/functions/fnc_canTurnOut.sqf +++ b/addons/common/functions/fnc_hasHatch.sqf @@ -1,6 +1,6 @@ /* * Author: commy2 - * Check if unit is in a vehicle position where unit can turn out. + * Check if unit has a hatch and can turn out. * * Arguments: * 0: Unit From 049d40b96e1f22e3161d4622266e9b2374382093 Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 28 Oct 2015 19:02:54 +0100 Subject: [PATCH 128/180] change description in function header --- addons/common/functions/fnc_hasHatch.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/functions/fnc_hasHatch.sqf b/addons/common/functions/fnc_hasHatch.sqf index 59da0938bd..124eed78a5 100644 --- a/addons/common/functions/fnc_hasHatch.sqf +++ b/addons/common/functions/fnc_hasHatch.sqf @@ -1,6 +1,6 @@ /* * Author: commy2 - * Check if unit has a hatch and can turn out. + * Check if unit is in a vehicle position where it can turn in or out. * * Arguments: * 0: Unit From d424eadd48c6602298d71cfaf5dbfc61d003998b Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 28 Oct 2015 19:25:59 +0100 Subject: [PATCH 129/180] delete superfluous space ocd --- addons/vehicles/CfgVehicles.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/vehicles/CfgVehicles.hpp b/addons/vehicles/CfgVehicles.hpp index e1f7295865..49fba3aeed 100644 --- a/addons/vehicles/CfgVehicles.hpp +++ b/addons/vehicles/CfgVehicles.hpp @@ -281,7 +281,7 @@ class CfgVehicles { class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { class Turrets: Turrets { class MainTurret: MainTurret { - weapons[] = {"autocannon_40mm_CTWS", "ACE_LMG_coax_MAG58_mem2"}; + weapons[] = {"autocannon_40mm_CTWS","ACE_LMG_coax_MAG58_mem2"}; magazines[] = {"60Rnd_40mm_GPR_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","2000Rnd_762x51_Belt_Green"}; }; }; From 7d69b7a3f495f9310ad5edb3720f84196761f843 Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 28 Oct 2015 19:48:49 +0100 Subject: [PATCH 130/180] fix merkava, patria tracer color --- addons/vehicles/CfgVehicles.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/vehicles/CfgVehicles.hpp b/addons/vehicles/CfgVehicles.hpp index 49fba3aeed..8834cc1d4d 100644 --- a/addons/vehicles/CfgVehicles.hpp +++ b/addons/vehicles/CfgVehicles.hpp @@ -128,7 +128,7 @@ class CfgVehicles { class Turrets: Turrets { class MainTurret: MainTurret { weapons[] = {"cannon_120mm","ACE_LMG_coax_MAG58_mem2"}; - magazines[] = {"32Rnd_120mm_APFSDS_shells_Tracer_Red","16Rnd_120mm_HE_shells_Tracer_Red","2000Rnd_762x51_Belt_Green","2000Rnd_762x51_Belt_Green"}; + magazines[] = {"32Rnd_120mm_APFSDS_shells_Tracer_Red","16Rnd_120mm_HE_shells_Tracer_Red","2000Rnd_762x51_Belt_Red","2000Rnd_762x51_Belt_Red"}; class Turrets: Turrets { class CommanderOptics: CommanderOptics {}; }; @@ -282,7 +282,7 @@ class CfgVehicles { class Turrets: Turrets { class MainTurret: MainTurret { weapons[] = {"autocannon_40mm_CTWS","ACE_LMG_coax_MAG58_mem2"}; - magazines[] = {"60Rnd_40mm_GPR_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","2000Rnd_762x51_Belt_Green"}; + magazines[] = {"60Rnd_40mm_GPR_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","2000Rnd_762x51_Belt_Red"}; }; }; }; @@ -302,7 +302,7 @@ class CfgVehicles { class Turrets: Turrets { class MainTurret: MainTurret { weapons[] = {"cannon_105mm","ACE_LMG_coax_MAG58_mem2"}; - magazines[] = {"40Rnd_105mm_APFSDS_T_Red","20Rnd_105mm_HEAT_MP_T_Red","2000Rnd_762x51_Belt_Green","2000Rnd_762x51_Belt_Green"}; + magazines[] = {"40Rnd_105mm_APFSDS_T_Red","20Rnd_105mm_HEAT_MP_T_Red","2000Rnd_762x51_Belt_Red","2000Rnd_762x51_Belt_Red"}; class Turrets: Turrets { class CommanderOptics: CommanderOptics {}; }; From de90960127bcd50a8874c533302f078f2139f720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brostr=C3=B6m=2EA=20=7C=20Evul?= Date: Thu, 29 Oct 2015 22:51:06 +0100 Subject: [PATCH 131/180] Update AUTHORS.txt --- AUTHORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.txt b/AUTHORS.txt index 8c22096033..f4ebd317eb 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -44,6 +44,7 @@ BlackPixxel BlackQwar Brakoviejo Brisse +Brostrom.A | Evul BullHorn Clon1998 Codingboy From a432687552167660c346f6705f9561bb1ebe662d Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 29 Oct 2015 21:07:33 -0500 Subject: [PATCH 132/180] make.py - fix last input spacing no blocking on import --- tools/make.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make.py b/tools/make.py index f8a4c80886..adaecf269e 100644 --- a/tools/make.py +++ b/tools/make.py @@ -1440,4 +1440,4 @@ if __name__ == "__main__": main(sys.argv) d,h,m,s = Fract_Sec(timeit.default_timer() - start_time) print("\nTotal Program time elapsed: {0:2}h {1:2}m {2:4.5f}s".format(h,m,s)) -input("Press Enter to continue...") + input("Press Enter to continue...") From 998f3e996c085474c26cb7677bc018aeef705ee9 Mon Sep 17 00:00:00 2001 From: jonpas Date: Fri, 30 Oct 2015 21:59:46 +0100 Subject: [PATCH 133/180] Cleanup macro definitions --- addons/main/script_debug.hpp | 26 ++++++++++---------------- addons/main/script_macros.hpp | 16 ---------------- addons/main/script_mod.hpp | 4 +--- 3 files changed, 11 insertions(+), 35 deletions(-) diff --git a/addons/main/script_debug.hpp b/addons/main/script_debug.hpp index 578d76cc91..315a26a65f 100644 --- a/addons/main/script_debug.hpp +++ b/addons/main/script_debug.hpp @@ -6,22 +6,16 @@ STACK TRACING //#define DEBUG_EVENTS #ifdef ENABLE_CALLSTACK + #define CALLSTACK(function) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'ANON', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'ANON'; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} + #define CALLSTACK_NAMED(function, functionName) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, functionName, _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = functionName; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} + #define DUMPSTACK ([__FILE__, __LINE__] call ACE_DUMPSTACK_FNC) -#define CALLSTACK(function) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'ANON', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'ANON'; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} -#define CALLSTACK_NAMED(function, functionName) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, functionName, _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = functionName; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} -#define DUMPSTACK ([__FILE__, __LINE__] call ACE_DUMPSTACK_FNC) - -#define FUNC(var1) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(ADDON,fnc,var1)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(ADDON,fnc,var1)'; _ret = _this call TRIPLES(ADDON,fnc,var1); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} -#define EFUNC(var1,var2) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)'; _ret = _this call TRIPLES(DOUBLES(PREFIX,var1),fnc,var2); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} - + #define FUNC(var1) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(ADDON,fnc,var1)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(ADDON,fnc,var1)'; _ret = _this call TRIPLES(ADDON,fnc,var1); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} + #define EFUNC(var1,var2) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)'; _ret = _this call TRIPLES(DOUBLES(PREFIX,var1),fnc,var2); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;} #else -#define CALLSTACK(function) function -#define CALLSTACK_NAMED(function, functionName) function -#define DUMPSTACK - -#define FUNC(var1) TRIPLES(ADDON,fnc,var1) -#define EFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2) - + #define CALLSTACK(function) function + #define CALLSTACK_NAMED(function, functionName) function + #define DUMPSTACK #endif @@ -32,7 +26,7 @@ PERFORMANCE COUNTERS SECTION #ifdef ENABLE_PERFORMANCE_COUNTERS #define CBA_fnc_addPerFrameHandler { _ret = [(_this select 0), (_this select 1), (_this select 2), #function] call CBA_fnc_addPerFrameHandler; if(isNil "ACE_PFH_COUNTER" ) then { ACE_PFH_COUNTER=[]; }; ACE_PFH_COUNTER pushBack [[_ret, __FILE__, __LINE__], [(_this select 0), (_this select 1), (_this select 2)]]; _ret } - + #define CREATE_COUNTER(x) if(isNil "ACE_COUNTERS" ) then { ACE_COUNTERS=[]; }; GVAR(DOUBLES(x,counter))=[]; GVAR(DOUBLES(x,counter)) set[0, QUOTE(GVAR(DOUBLES(x,counter)))]; GVAR(DOUBLES(x,counter)) set[1, diag_tickTime]; ACE_COUNTERS pushBack GVAR(DOUBLES(x,counter)); #define BEGIN_COUNTER(x) if(isNil QUOTE(GVAR(DOUBLES(x,counter)))) then { CREATE_COUNTER(x) }; GVAR(DOUBLES(x,counter)) set[2, diag_tickTime]; #define END_COUNTER(x) GVAR(DOUBLES(x,counter)) pushBack [(GVAR(DOUBLES(x,counter)) select 2), diag_tickTime]; @@ -43,4 +37,4 @@ PERFORMANCE COUNTERS SECTION #define BEGIN_COUNTER(x) /* disabled */ #define END_COUNTER(x) /* disabled */ #define DUMP_COUNTERS /* disabled */ -#endif \ No newline at end of file +#endif diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index c2ecab058b..a65d126110 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -1,17 +1,9 @@ #include "\x\cba\addons\main\script_macros_common.hpp" #include "\x\cba\addons\xeh\script_xeh.hpp" -//Faster Array Unwraping (skips the IS_ARRAY check normaly found in EXPLODE_1_SYS) -#undef EXPLODE_2_SYS -#define EXPLODE_1_SYS_FAST(ARRAY,A) A =(ARRAY) select 0 -#define EXPLODE_2_SYS(ARRAY,A,B) EXPLODE_1_SYS_FAST(ARRAY,A); B = (ARRAY) select 1 - // Default versioning level #define DEFAULT_VERSIONING_LEVEL 2 -#define EGVAR(module,var) TRIPLES(PREFIX,module,var) -#define QEGVAR(module,var) QUOTE(EGVAR(module,var)) - #define DGVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(GVAR(varName)) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(GVAR(varName))); }; GVAR(varName) #define DVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(varName) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(varName)); }; varName #define DFUNC(var1) TRIPLES(ADDON,fnc,var1) @@ -22,14 +14,6 @@ #define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2) -#ifndef STRING_MACROS_GUARD -#define STRING_MACROS_GUARD - #define LSTRING(var1) QUOTE(TRIPLES(STR,ADDON,var1)) - #define ELSTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) - #define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1)) - #define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2)) -#endif - #define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)] #define SETVAR_SYS(var1,var2) setVariable [ARR_2(QUOTE(var1),var2)] #define SETPVAR_SYS(var1,var2) setVariable [ARR_3(QUOTE(var1),var2,true)] diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index c87a23aba2..a8b5d80778 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -11,7 +11,5 @@ #define VERSION MAJOR.MINOR.PATCHLVL.BUILD #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD -#define ACE_TAG A.C.E. - // MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 0.5 +#define REQUIRED_VERSION 1.52 From d24569953bb6be0255fcbb8f9d89b53a3b3552d2 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sat, 31 Oct 2015 15:21:54 +0100 Subject: [PATCH 134/180] Fix CONTRIBUTING.md links --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6b7f1006fa..f92fa5e1e4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ Indicate if the issue appears on stable or development version. In case it is th ## Reporting the issue -Head over to the ACE3 GitHub issue tracker and press the "New issue" button in the top right corner. Add a descriptive title and copy the following issue template in to the text area: +Head over to the [ACE3 GitHub issue tracker](issues) and press the [New issue](issues/new) button in the top right corner. Add a descriptive title and copy the following issue template in to the text area: ``` ACE3 Version: 3.x.x @@ -43,8 +43,8 @@ ACE3 Version: 3.x.x A video of the issue might be helpful in resolving it faster. +GitHub uses [Markdown](http://daringfireball.net/projects/markdown/syntax) to style the output. If you want to know more about it (e.g. how to [turn text bold](https://help.github.com/articles/markdown-basics/#styling-text), how to denote [code blocks](https://help.github.com/articles/markdown-basics/#inline-formats) or [inline code](https://help.github.com/articles/markdown-basics/#multiple-lines)) have a look at the [GitHub Markdown Documentation](https://help.github.com/articles/github-flavored-markdown). -Github uses "Markdown" to style the output. If you want to know more about it (e.g. how to turn text bold, how to denote code blocks or inline code) have a look at the GitHub markdown documentation. # Feature Requests @@ -54,11 +54,11 @@ ACE2, AGM and CSE had a lot of features implemented or planned. All of them are Please refrain from making requests for any planned or existing features from either ACE2, AGM or CSE. Most of them are already being or have been considered for porting or a rewrite. ## Requesting a feature -In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for ACE 3 Feature requests. Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier. +In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](issues/414). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier. Following their approval, feature requests may be moved by moderators to a separate issue for further discussion. # Regarding Pull Requests (PRs) -- You want to help but don't know where to start ? Check the wiki entry for [setting up the development environment](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html) +- You want to help but don't know where to start? Check the wiki entry for [setting up the development environment](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html) - [Make sure to respect the file structure](http://ace3mod.com/wiki/development/modularity-and-pbo-structure.html) - [Make sure to respect the coding guidelines](http://ace3mod.com/wiki/development/coding-guidelines.html) From 8d3d9ff8f4f63ef6096bfc43cf24d6f8cf5bfaac Mon Sep 17 00:00:00 2001 From: jonpas Date: Sat, 31 Oct 2015 15:26:24 +0100 Subject: [PATCH 135/180] Properly fix links --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f92fa5e1e4..ed17a41e67 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ Indicate if the issue appears on stable or development version. In case it is th ## Reporting the issue -Head over to the [ACE3 GitHub issue tracker](issues) and press the [New issue](issues/new) button in the top right corner. Add a descriptive title and copy the following issue template in to the text area: +Head over to the [ACE3 GitHub issue tracker](https://github.com/acemod/ACE3/issues) and press the [New issue](https://github.com/acemod/ACE3/issues/new) button in the top right corner. Add a descriptive title and copy the following issue template in to the text area: ``` ACE3 Version: 3.x.x @@ -54,7 +54,7 @@ ACE2, AGM and CSE had a lot of features implemented or planned. All of them are Please refrain from making requests for any planned or existing features from either ACE2, AGM or CSE. Most of them are already being or have been considered for porting or a rewrite. ## Requesting a feature -In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](issues/414). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier. +In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/414). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier. Following their approval, feature requests may be moved by moderators to a separate issue for further discussion. From 8f6e9be636e592960f916662cb48a6aed59fad7e Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 1 Nov 2015 16:35:25 +0100 Subject: [PATCH 136/180] Add method to deal with new hitpoints This addition tries to deal with the new hitpoints introduced in Arma3 v1.50 and above. It converts new selection names to by the current medical system usable selection names. This is only a temporarily patch, while we are still working on a larger overhaul to account both the new hitpoints and any potential new features / polishing. --- addons/medical/XEH_preInit.sqf | 1 + addons/medical/functions/fnc_handleDamage.sqf | 7 ++++ .../functions/fnc_translateSelections.sqf | 37 +++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 addons/medical/functions/fnc_translateSelections.sqf diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index 2625bf4b8a..9563752d92 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -70,6 +70,7 @@ PREP(setDead); PREP(setHitPointDamage); PREP(setStructuralDamage); PREP(setUnconscious); +PREP(translateSelections); PREP(treatment); PREP(treatment_failure); PREP(treatment_success); diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index afcf6e12e5..4174f3a0f3 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -39,6 +39,13 @@ TRACE_3("ACE_DEBUG: HandleDamage",_selection,_damage,_unit); if (_selection == "hands") exitWith {_unit getHit "hands"}; if (_selection == "legs") exitWith {_unit getHit "legs"}; +// Deal with the new hitpoint and selection names introduced with Arma v1.50 and later. +// This will convert new selection names into selection names that the medical system understands +// TODO This should be cleaned up when we revisit the medical system at a later stage +// and instead we should deal with the new hitpoints directly +_selection = [_selection] call FUNC(translateSelections); +_this set [1, _selection]; // ensure that the parameters are set correctly + // If the damage is being weird, we just tell it to fuck off. Ignore: "hands", "legs", "?" if (_selection != "" && {!(_selection in GVAR(SELECTIONS))}) exitWith {0}; //@todo "neck", "pelvis", "spine1", "spine2", "spine3" diff --git a/addons/medical/functions/fnc_translateSelections.sqf b/addons/medical/functions/fnc_translateSelections.sqf new file mode 100644 index 0000000000..410005888e --- /dev/null +++ b/addons/medical/functions/fnc_translateSelections.sqf @@ -0,0 +1,37 @@ +/* + * Author: Glowbal + * Translate selection names into medical usable hit selection names. + * Aims to deal with the new hitpoint system introduced in Arma3 v1.50 and later. + * + * Arguments: + * 0: selection name + * + * Return Value: + * translated selection name + * + * Example: + * ["pelvis"] call ace_medical_fnc_translateSelections + * Returns "body" + * + * Public: No + */ + +#define HEAD_SELECTIONS ["face_hub", "neck", "head"] +#define TORSO_SELECTIONS ["pelvis", "spine1", "spine2", "spine3", "body"] +#define L_ARM_SELECTIONS ["hand_l"] +#define R_ARM_SELECTIONS ["hand_r"] +#define L_LEG_SELECTIONS ["leg_l"] +#define R_LEG_SELECTIONS ["leg_r"] + +params ["_selection"]; + +if (_selection in HEAD_SELECTIONS) exitwith {"head"}; +if (_selection in TORSO_SELECTIONS) exitwith {"body"}; + +// Not necessary unless we get more hitpoints variants in an next arma update +/*if (_selection in L_ARM_SELECTIONS) exitwith {"hand_l"}; +if (_selection in R_ARM_SELECTIONS) exitwith {"hand_r"}; +if (_selection in L_LEG_SELECTIONS) exitwith {"leg_l"}; +if (_selection in R_LEG_SELECTIONS) exitwith {"leg_r"};*/ + +_selection; From bd97c1ee96624d2615fab7dedc91bfb773cfc84e Mon Sep 17 00:00:00 2001 From: Joko Date: Mon, 2 Nov 2015 12:05:43 +0100 Subject: [PATCH 137/180] fix Docu in waitUntilAndExecute --- addons/common/functions/fnc_waitUntilAndExecute.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/functions/fnc_waitUntilAndExecute.sqf b/addons/common/functions/fnc_waitUntilAndExecute.sqf index 6a7867d707..bbc6c540fe 100644 --- a/addons/common/functions/fnc_waitUntilAndExecute.sqf +++ b/addons/common/functions/fnc_waitUntilAndExecute.sqf @@ -11,7 +11,7 @@ * None * * Example: - * [{(_this select 0) == vehicle (_this select 0)}, {(_this select 0) setDamage 1;}, [ACE_player]] call ace_common_fnc_waitAndExecute + * [{(_this select 0) == vehicle (_this select 0)}, {(_this select 0) setDamage 1;}, [ACE_player]] call ace_common_fnc_waitUntilAndExecute * * Public: No */ From 50ab2aa904e412681debd93644e4bc7fc82a26d2 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 2 Nov 2015 15:21:34 -0600 Subject: [PATCH 138/180] MicroDagr - move drawEH array define to preInit Fix load order problems (init.sqf can be before postInit) --- addons/microdagr/XEH_clientInit.sqf | 3 --- addons/microdagr/XEH_preInit.sqf | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/microdagr/XEH_clientInit.sqf b/addons/microdagr/XEH_clientInit.sqf index 518a648601..c918bcf454 100644 --- a/addons/microdagr/XEH_clientInit.sqf +++ b/addons/microdagr/XEH_clientInit.sqf @@ -3,9 +3,6 @@ if (!hasInterface) exitWith {}; -//Functions that are called for each draw of the map: -GVAR(miniMapDrawHandlers) = []; - //Add deviceKey entry: private ["_conditonCode", "_toggleCode", "_closeCode"]; _conditonCode = { diff --git a/addons/microdagr/XEH_preInit.sqf b/addons/microdagr/XEH_preInit.sqf index 4e6ed561c3..39a1b313c6 100644 --- a/addons/microdagr/XEH_preInit.sqf +++ b/addons/microdagr/XEH_preInit.sqf @@ -23,4 +23,7 @@ PREP(saveCurrentAndSetNewMode); PREP(showApplicationPage); PREP(updateDisplay); +//Functions that are called for each draw of the map: +GVAR(miniMapDrawHandlers) = []; + ADDON = true; From af5b646adb29cfec7e3dc45448b3f94a0f363c24 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 4 Nov 2015 13:15:40 -0600 Subject: [PATCH 139/180] Update CBA Includes From https://github.com/CBATeam/CBA_A3/tree/354f1b189e889ca63b333dceb682498a3c30b7d2 --- tools/cba/addons/main/script_macros_common.hpp | 6 ++++-- tools/cba/addons/xeh/init_pre.sqf | 10 ++++++++-- tools/cba/addons/xeh/script_xeh.hpp | 6 ++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/tools/cba/addons/main/script_macros_common.hpp b/tools/cba/addons/main/script_macros_common.hpp index 78893db662..d205bfc975 100644 --- a/tools/cba/addons/main/script_macros_common.hpp +++ b/tools/cba/addons/main/script_macros_common.hpp @@ -199,7 +199,7 @@ Parameters: Example: (begin example) - ERROR("Value not found","value of frog not found in config ...yada...yada..."); + ERROR("value of frog not found in config ...yada...yada..."); (end) Author: @@ -674,8 +674,9 @@ Author: Sickboy ------------------------------------------- */ #define GVAR(var1) DOUBLES(ADDON,var1) -#define EGVAR(var1,var2) DOUBLES(DOUBLES(PREFIX,var1),var2) +#define EGVAR(var1,var2) TRIPLES(PREFIX,var1,var2) #define QGVAR(var1) QUOTE(GVAR(var1)) +#define QEGVAR(var1,var2) QUOTE(EGVAR(var1,var2)) /* ------------------------------------------- Macro: GVARMAIN() @@ -694,6 +695,7 @@ Author: Sickboy ------------------------------------------- */ #define GVARMAIN(var1) GVARMAINS(PREFIX,var1) +#define QGVARMAIN(var1) QUOTE(GVARMAIN(var1)) // TODO: What's this? #define SETTINGS DOUBLES(PREFIX,settings) #define CREATELOGIC CREATELOGICS(PREFIX,COMPONENT) diff --git a/tools/cba/addons/xeh/init_pre.sqf b/tools/cba/addons/xeh/init_pre.sqf index 44b4657aca..1b6642c777 100644 --- a/tools/cba/addons/xeh/init_pre.sqf +++ b/tools/cba/addons/xeh/init_pre.sqf @@ -356,5 +356,11 @@ SLX_XEH_STR spawn { */ { (_x/SLX_XEH_STR_PreInit) call FUNC(init_once) } forEach SLX_XEH_CONFIG_FILES; - -XEH_LOG("XEH: PreInit Finished. " + PFORMAT_3("CACHE DISABLED? (Disable caching with cba_cache_disable.pbo)",SLX_XEH_RECOMPILE,CBA_COMPILE_RECOMPILE,CBA_FUNC_RECOMPILE)); +private "_s"; +// Normally, full caching is enabled. If not, log an informative message. +_s = if (SLX_XEH_RECOMPILE || CBA_COMPILE_RECOMPILE || CBA_FUNC_RECOMPILE) then { + PFORMAT_3(" CACHE DISABLED? (Disable caching with cba_cache_disable.pbo)",SLX_XEH_RECOMPILE,CBA_COMPILE_RECOMPILE,CBA_FUNC_RECOMPILE) +} else { + "" +}; +XEH_LOG("XEH: PreInit Finished." + _s); diff --git a/tools/cba/addons/xeh/script_xeh.hpp b/tools/cba/addons/xeh/script_xeh.hpp index ba55dbc917..4f242b492e 100644 --- a/tools/cba/addons/xeh/script_xeh.hpp +++ b/tools/cba/addons/xeh/script_xeh.hpp @@ -40,6 +40,7 @@ local = "_this call SLX_XEH_EH_Local"; \ respawn = "_this call SLX_XEH_EH_Respawn"; \ put = "_this call SLX_XEH_EH_Put"; \ take = "_this call SLX_XEH_EH_Take"; \ +seatSwitched = "_this call SLX_XEH_EH_SeatSwitched"; \ soundPlayed = "_this call SLX_XEH_EH_SoundPlayed"; \ weaponAssembled = "_this call SLX_XEH_EH_WeaponAssembled"; \ weaponDisAssembled = "_this call SLX_XEH_EH_WeaponDisassembled"; @@ -51,11 +52,11 @@ weaponDisAssembled = "_this call SLX_XEH_EH_WeaponDisassembled"; -/* +/* MACRO: DELETE_EVENTHANDLERS Removes all event handlers. - + Example: (begin example) class DefaultEventhandlers; @@ -103,6 +104,7 @@ delete local; \ delete respawn; \ delete put; \ delete take; \ +delete seatSwitched; \ delete soundPlayed; \ delete weaponAssembled; \ delete weaponDisAssembled; From c5da32e4707bbef6254157de08a780e4af6096ae Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 4 Nov 2015 14:36:26 -0600 Subject: [PATCH 140/180] Medical Handle Damage - check hitpoints if selection is weird --- addons/medical/functions/fnc_handleDamage.sqf | 4 +-- .../functions/fnc_translateSelections.sqf | 36 ++++++++++++++++--- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index 4174f3a0f3..6d955e72fd 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -params ["_unit", "_selection", "_damage", "_shooter", "_projectile"]; +params ["_unit", "_selection", "_damage", "_shooter", "_projectile", "_hitPointIndex"]; TRACE_5("ACE_DEBUG: HandleDamage Called",_unit, _selection, _damage, _shooter, _projectile); // bug, apparently can fire for remote units in special cases @@ -43,7 +43,7 @@ if (_selection == "legs") exitWith {_unit getHit "legs"}; // This will convert new selection names into selection names that the medical system understands // TODO This should be cleaned up when we revisit the medical system at a later stage // and instead we should deal with the new hitpoints directly -_selection = [_selection] call FUNC(translateSelections); +_selection = [_unit, _selection, _hitPointIndex] call FUNC(translateSelections); _this set [1, _selection]; // ensure that the parameters are set correctly // If the damage is being weird, we just tell it to fuck off. Ignore: "hands", "legs", "?" diff --git a/addons/medical/functions/fnc_translateSelections.sqf b/addons/medical/functions/fnc_translateSelections.sqf index 410005888e..94cb5dcb28 100644 --- a/addons/medical/functions/fnc_translateSelections.sqf +++ b/addons/medical/functions/fnc_translateSelections.sqf @@ -4,29 +4,39 @@ * Aims to deal with the new hitpoint system introduced in Arma3 v1.50 and later. * * Arguments: - * 0: selection name + * 0: Unit + * 1: selection name + * 2: HitPoint Index * * Return Value: * translated selection name * * Example: - * ["pelvis"] call ace_medical_fnc_translateSelections + * [bob, "pelvis", 4] call ace_medical_fnc_translateSelections * Returns "body" * * Public: No */ +#include "script_component.hpp" #define HEAD_SELECTIONS ["face_hub", "neck", "head"] +#define HEAD_HITPOINTS ["hitface", "hitneck", "hithead"] #define TORSO_SELECTIONS ["pelvis", "spine1", "spine2", "spine3", "body"] +#define TORSO_HITPOINTS ["hitpelvis", "hitabdomen", "hitdiaphragm", "hitchest", "hitbody"] #define L_ARM_SELECTIONS ["hand_l"] +#define L_ARM_HITPOINTS ["HitLeftArm", "hand_l"] #define R_ARM_SELECTIONS ["hand_r"] +#define R_ARM_HITPOINTS ["HitRightArm", "hand_r"] #define L_LEG_SELECTIONS ["leg_l"] +#define L_LEG_HITPOINTS ["HitLeftLeg", "leg_l"] #define R_LEG_SELECTIONS ["leg_r"] +#define R_LEG_HITPOINTS ["HitRightLeg", "leg_r"] -params ["_selection"]; +params ["_unit", "_selection", "_hitPointIndex"]; -if (_selection in HEAD_SELECTIONS) exitwith {"head"}; -if (_selection in TORSO_SELECTIONS) exitwith {"body"}; +if (_selection == "") exitWith {""}; +if (_selection in HEAD_SELECTIONS) exitWith {"head"}; +if (_selection in TORSO_SELECTIONS) exitWith {"body"}; // Not necessary unless we get more hitpoints variants in an next arma update /*if (_selection in L_ARM_SELECTIONS) exitwith {"hand_l"}; @@ -34,4 +44,20 @@ if (_selection in R_ARM_SELECTIONS) exitwith {"hand_r"}; if (_selection in L_LEG_SELECTIONS) exitwith {"leg_l"}; if (_selection in R_LEG_SELECTIONS) exitwith {"leg_r"};*/ +//Backup method to detect weird selections/hitpoints +if ((_selection == "?") || {!(_selection in GVAR(SELECTIONS))}) exitWith { + if (_hitPointIndex < 0) exitWith {_selection}; + local _hitPoint = toLower configName ((configProperties [(configFile >> "CfgVehicles" >> (typeOf _unit) >> "HitPoints")]) select _hitPointIndex); + TRACE_4("Weird sel/hit", _unit, _selection, _hitPointIndex, _hitPoint); + + if (_hitPoint in HEAD_HITPOINTS) exitWith {"head"}; + if (_hitPoint in TORSO_HITPOINTS) exitWith {"body"}; + if (_hitPoint in L_ARM_HITPOINTS) exitWith {"hand_l"}; + if (_hitPoint in R_ARM_HITPOINTS) exitWith {"hand_r"}; + if (_hitPoint in L_LEG_HITPOINTS) exitWith {"leg_l"}; + if (_hitPoint in R_LEG_HITPOINTS) exitWith {"leg_r"}; + + _selection +}; + _selection; From 1cebe613fa693784151d5faaf82f608e08ca19eb Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 4 Nov 2015 14:38:32 -0600 Subject: [PATCH 141/180] Fix Capitialzation --- addons/medical/functions/fnc_translateSelections.sqf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/medical/functions/fnc_translateSelections.sqf b/addons/medical/functions/fnc_translateSelections.sqf index 94cb5dcb28..a5f0328181 100644 --- a/addons/medical/functions/fnc_translateSelections.sqf +++ b/addons/medical/functions/fnc_translateSelections.sqf @@ -24,13 +24,13 @@ #define TORSO_SELECTIONS ["pelvis", "spine1", "spine2", "spine3", "body"] #define TORSO_HITPOINTS ["hitpelvis", "hitabdomen", "hitdiaphragm", "hitchest", "hitbody"] #define L_ARM_SELECTIONS ["hand_l"] -#define L_ARM_HITPOINTS ["HitLeftArm", "hand_l"] +#define L_ARM_HITPOINTS ["hitleftarm", "hand_l"] #define R_ARM_SELECTIONS ["hand_r"] -#define R_ARM_HITPOINTS ["HitRightArm", "hand_r"] +#define R_ARM_HITPOINTS ["hitrightarm", "hand_r"] #define L_LEG_SELECTIONS ["leg_l"] -#define L_LEG_HITPOINTS ["HitLeftLeg", "leg_l"] +#define L_LEG_HITPOINTS ["hitleftleg", "leg_l"] #define R_LEG_SELECTIONS ["leg_r"] -#define R_LEG_HITPOINTS ["HitRightLeg", "leg_r"] +#define R_LEG_HITPOINTS ["hitrightleg", "leg_r"] params ["_unit", "_selection", "_hitPointIndex"]; From 38105136fa455b4d4ab9757d25bc649c9f1a0a5a Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 4 Nov 2015 17:43:51 -0600 Subject: [PATCH 142/180] #2820 - Fix target event error --- addons/interaction/XEH_postInit.sqf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index ae3ebff5c3..6442911faa 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -29,12 +29,9 @@ GVAR(isOpeningDoor) = false; if (_unit == ACE_player) then { addCamShake [4, 0.5, 5]; + local _message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 0)); + [_message] call FUNC(displayTextStructured); }; - - private "_message"; - _message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 0)); - - ["displayTextStructured", _message] call EFUNC(common,targetEvent); }] call EFUNC(common,addEventHandler); // restore global fire teams for JIP From e2763dde2738d9854316bd6851490a51c201a210 Mon Sep 17 00:00:00 2001 From: kaban Date: Thu, 5 Nov 2015 03:28:53 +0300 Subject: [PATCH 143/180] Russian Translations - Update --- addons/captives/stringtable.xml | 10 ++++---- addons/dragging/stringtable.xml | 1 + addons/map/stringtable.xml | 2 ++ addons/map_gestures/stringtable.xml | 31 ++++++++++++++++++++++++ addons/medical/stringtable.xml | 3 ++- addons/nametags/stringtable.xml | 34 +++++++++++++-------------- addons/optionsmenu/stringtable.xml | 5 ++-- addons/tacticalladder/stringtable.xml | 1 + addons/zeus/stringtable.xml | 6 +++++ 9 files changed, 69 insertions(+), 24 deletions(-) diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index d4166a495d..867880bcf2 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -166,7 +166,7 @@ Fazer unidade se render Faire capituler l'unité Egység kapitulálása - Сделать юнита пленным + Заставить юнита сдаться Sync a unit to make them surrender.<br />Source: ace_captives @@ -177,13 +177,15 @@ Sincroniza uma unidade para fazer com que ela se renda. <br/>Fonte: ace_captives Synchronise une unité pour la rendre captive. <br/>Source: ace_captives Egység szinkronizálása, hogy kapituláljon.<br />Forrás: ace_captives - Синхронизируйте с юнитами, чтобы сделать их пленными.<br />Источник: ace_captives + Синхронизируйте с юнитами, чтобы заставить их сдаться в плен.<br />Источник: ace_captives Make Unit Handcuffed + Связать юнита Sync a unit to make them handcuffed.<br />Source: ace_captives + Синхронизируйте с юнитами, чтобы сделать их связанными.<br />Источник: ace_captives Captives Settings @@ -284,4 +286,4 @@ Rendición o desarme - + \ No newline at end of file diff --git a/addons/dragging/stringtable.xml b/addons/dragging/stringtable.xml index 417493fc75..be80801e57 100644 --- a/addons/dragging/stringtable.xml +++ b/addons/dragging/stringtable.xml @@ -54,6 +54,7 @@ Heben/Senken Wyżej/Niżej Levantar/Abaixar + Поднять/Опустить \ No newline at end of file diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 92547e8632..8eab673caf 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -260,11 +260,13 @@ Set Channel At Start Ust. domyślny kanał Definir canal no início + Установить канал на старте Change the starting marker channel at mission start Ustaw domyślny kanał dla markerów przy starcie misji Muda o canal do marcador no início da missão + Изменить начальный канал для установки маркеров при запуске миссии \ No newline at end of file diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index fe513a4d49..9c61d59292 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -4,126 +4,157 @@ Map Gestures Gestos no mapa + Указания на карте Enabled Ativado + Включено Map Gesture Max Range Distância para gestos no mapa + Дистанция указаний на карте Max range between players to show the map gesture indicator [default: 7 meters] Distância max. entre os jogadores para mostrar o indicador de gesto no mapa [padrão: 7 metros] + Макс. дистанция между игроками для отображения указаний на карте [по-умолчанию: 7 метров] Lead Default Alpha Transparência padrão do líder + Лид. прозрачность по-умолчанию Fallback Alpha value for group leaders. Valor de transparência alternativo para líderes de grupo + Значение прозрачности для лидеров групп Default Alpha Transparência padrão + Прозрачность по-умолчанию Fallback Alpha value. Valor alternativo de transparência + Значение прозрачности по-умолчанию Lead Default Color Cor padrão para o líder + Лид. цвет по-умолчанию Fallback Color value for group leaders. Valor de cor alternativa para líderes de grupo + Значение цвета для лидеров групп Default Color Cor padrão + Цвет по-умолчанию Fallback Color value. Valor alternativo de cor + Значение цвета Lead Alpha Transparência do líder + Лид. прозрачность Alpha value for group leaders of groups synced with this module. Valor de transparência para líderes de grupo sincronizados com este módulo. + Значение прозрачности для лидеров групп, которые [группы] синхронизированы с этим модулем. Alpha Transparência + Прозрачность Alpha value for group members of groups synced with this module. Valor de transparência para membros de grupo sincronizados com este módulo. + Значение прозрачности для членов групп, которые [группы] синхронизированы с этим модулем. Lead Color Cor do líder + Лид. цвет Color value for group leaders of groups synced with this module. Valor de cor para líderes de grupo sincronizados com este módulo. + Значение цвета для лидеров групп, которые [группы] синхронизированы с этим модулем. Color Cor + Цвет Color value for group members of groups synced with this module. Valor de cor para membros de grupo sincronizados com este módulo. + Значение цвета для членов групп, которые [группы] синхронизированы с этим модулем. Map Gestures - Group Settings Gestos no mapa - Definições de Grupo + Указания на карте - настройки групп Update Interval Intervalo de atualizações + Интервал обновления Time between data updates. Tempo entre atualização de dados + Время между обновлениями данных. Group color configurations Configurações de cores de grupo + Конфигурация цвета групп Group color configuration containing arrays of color pairs ([leadColor, color]). Configuração de cores de grupo contendo arrays com pares de cores ([leadColor, color]). + Конфигурация цвета групп содержит массив цветовых пар ([лид. цвет, цвет]) Hash of Group ID mapped to the Group color configuration index. Hashes de ID de grupos mapeados para o índice de configuração de cor de grupos. + Хеш ID групп, соответствующих индексам конфигурации цвета групп GroupID Color configuration mapping Mapeamento de configuração para cores de GroupID + Соответствие ID групп конфигурации цвета групп Enables the Map Gestures. Ativa os gestos no mapa + Включает указания на карте Name Text Color Cor do texto do nome + Цвет текста позывного Color of the name tag text besides the map gestures mark. Cor do texto da etiqueta de nome que fica embaixo da marcação de gestos no mapa. + Цвет позывного за маркером указаний. Map Gestures Gestos no mapa + Указания на карте \ No newline at end of file diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 0a75d67583..5c3d03a85d 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -2111,6 +2111,7 @@ %1 used Personal Aid Kit %1 użył apteczki %1 utilizou KPS + %1 использовал аптечку Heavily wounded @@ -2963,7 +2964,7 @@ Allow AI to go unconscious - Позволить ботам терять сознание + Позволить ботам терять сознание (вместо мгновенной смерти) Czy AI może być nieprzytomne od odniesionych obrażeń? Permita a la IA caer inconsciente KI kann bewusstlos werden diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index d3616d18f4..fdc93ea1d6 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,7 +9,7 @@ Zobrazit jména Pokaż imiona Nevek mutatása - Показать имена + Показывать позывные Mostra i nomi Mostrar nomes @@ -23,7 +23,7 @@ Zobrazit jména hráčů Mostrar nomes de jogadores Mostra i nomi dei giocatori - Показывать имена игроков (включить имена) + Показывать позывные игроков (включить позывные) Show player name only on cursor (requires player names) @@ -35,7 +35,7 @@ Mostra i nomi solo se puntati (richiede mostra nomi abilitato) Mostrar nome de jogador somente no cursor (requer nome de jogadores) Játékosok nevének mutatása csak a kurzoron (a nevek mutatása szükséges) - Показать имена игроков только под курсором (при включенных именах) + Показать позывные игроков только под курсором (при включенных позывных) Show player name only on keypress (requires player names) @@ -45,7 +45,7 @@ Zobrazit jména hráčů jen na klávesu (vyžaduje jména hráčů) Pokaż imiona graczy tylko po przytrzymaniu klawisza (wymagana opcja Pokaż imiona graczy) Játékosnevek mutatása csak gombnyomásra (a nevek mutatása szükséges) - Показать имена игроков только по нажатию клавиши (при включенных именах) + Показать позывные игроков только по нажатию клавиши (при включенных позывных) Mostra i nomi solo se si preme il tasto (richiede mostra nomi abilitato) Mostrar nomes somente ao pressionar teclar (requer nome de jogadores) @@ -59,7 +59,7 @@ Mostra i gradi (richiede mostra nomi abilitato) Mostrar patente de jogadores (requer nome de jogadores) Játékosok rendfokozatának mutatása (a nevek mutatása szükséges) - Показывать звания игроков (при вкл. именах) + Показывать звания игроков (при вкл. позывных) Show vehicle crew info @@ -89,7 +89,7 @@ Show SoundWaves (requires player names) Schallwellen anzeigen (benötigt Spielernamen) Mostrar onda sonora (requiere Mostrar nombres de jugadores) - Индикатор разговора (при вкл. именах) + Индикатор разговора (при вкл. позывных) Zobrazit SoundWaves (vyžaduje jména hráčů) Pokaż fale dźwiękowe (wymagana opcja Pokaż imiona graczy) Afficher "qui parle" (si noms affichés) @@ -100,7 +100,7 @@ Default Nametag Color (Non Group Members) Voreingestellte Namenfarbe (Spieler außerhalb der Gruppe) - Цвет меток игроков (не членов групп) + Цвет позывных по-умолчанию (не членов групп) Color de etiquetas de nombre por defecto (No miembros de grupo) Domyślny kolor imion (członkowie spoza grupy) Couleur d'affichage par défaut (si dans aucun groupe) @@ -118,7 +118,7 @@ Etiquetas de nome NameTags Névcímkék - Имена игроков + Позывные Player Names View Dist. @@ -129,7 +129,7 @@ Distância de visão dos nomes dos jogadores Distance de vue des noms de joueurs Játékosok nevének látótávja - Дистанция отображения имен + Дистанция отображения позывных Distance in meters at which player names are shown. Default: 5 @@ -140,7 +140,7 @@ Distância em metros que os nomes dos jogadores são mostrados. Padrão: 5 Distance en mètres au delà de laquelle les noms de joueurs ne sont plus affichés. Défaut: 5 Méterben megadott érték a játékosok nevének mutatására. Alapértelmezett: 5 - Дистанция в метрах, на которой отображаются имена игроков. По-умолчанию: 5 + Дистанция в метрах, на которой отображаются позывные игроков. По-умолчанию: 5 Show name tags for AI? @@ -226,7 +226,7 @@ Zeige Maus-Namensanzeigen für Fahrzeugkommandanten (nur wenn der Client Namensanzeigen aktiviert hat). Standard: Nein Zobrazit jmenovky pro velitele vozidla (pouze pokud má klient jmenovky povolené). Výchozí: Ne Mostrar o nome no cursor para o comandante do veículo (somente se o cliente tiver etiquetas de nomes ativada). Padrão: Não - Показывать имя командира техники (только, если клиент включил отображение имен). По-умолчанию: Нет + Показывать позывной командира техники (только, если клиент включил отображение позывных). По-умолчанию: Нет Afficher les étiquettes de nom pour les commandants de véhicule (uniquement si l'affichage est activé pour le client). Défaut: non @@ -238,7 +238,7 @@ Este módulo permite que você personalize as configurações e distâncias de etiquetas de nome. Ce module permet le paramétrage de l'affichage des étiquettes des noms Ez a modul lehetővé teszi a névcímkék beállításainak testreszabását. - Этот модуль позволяет настроить опции и дистанцию отображения имен игроков. + Этот модуль позволяет настроить опции и дистанцию отображения позывных. Only on Cursor @@ -315,7 +315,7 @@ Usar ajustes de etiquetas de nome Utiliser les paramètre des NamesTags Névcímkék beállításának használata - Так же, как имена + Так же, как позывные Always Show All @@ -337,7 +337,7 @@ Mostrar os nomes dos jogadores e definir sua ativação. Padrão: Ativado Afficher les noms des joueurs et paramètre son activation. Défaut: activé Mutassa a játékosok nevét és kezelje az aktivációjukat. Alapértelmezett: Engedélyezve - Показывать имена игроков и установить их активацию. По-умолчанию: Включено + Показывать позывные игроков и установить их активацию. По-умолчанию: Включено Effect of sound waves above the heads of speaking players after holding the PTT key. This option works with TFAR and ACRE2. @@ -359,7 +359,7 @@ Tamanho das etiquetas de nome Taille des noms Névcímkék mérete - Размер имен игроков + Размер позывных Text and Icon Size Scaling @@ -373,4 +373,4 @@ Масштабирование размера текста и иконок - + \ No newline at end of file diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index 6b4cad396b..cd4cc429b0 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -356,6 +356,7 @@ Pošle debug informace do RPT a schránky. Protokolliert Debug-Informationen im RPT und speichert sie in der Zwischenablage. Envia informação de depuração para RPT e área de transferência. + Отправляет отладочную информацию в RPT и буфер обмена. Headbug Fix @@ -415,4 +416,4 @@ Logística - + \ No newline at end of file diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml index 57f03f7600..3d377ed420 100644 --- a/addons/tacticalladder/stringtable.xml +++ b/addons/tacticalladder/stringtable.xml @@ -42,6 +42,7 @@ Ausfahren, +Strg kippen Rozłóż, +Ctrl nachyl Extender, +Ctrl tilt + Разложить, +Ctrl наклонить Position ladder diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 0281f0a5a0..b885e1cec1 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -215,18 +215,22 @@ Add Spare Wheel Adicionar roda sobressalente + Добавить запасное колесо Adds a Spare Wheel to the vehicle Adiciona uma roda sobressalente ao veículo + Добавляет запасное колесо в транспорт Add Spare Track Adicionar esteira sobressalente + Дабавить запасную гусеницу Adds a Spare Track to the vehicle Adiciona uma esteira sobressalente ao veículo + Добавляет запасную гусеницу в транспорт Unit must be alive @@ -269,10 +273,12 @@ Unit must be a vehicle with cargo space Unidade deve ser um veículo com espaço em carga + Юнит должен быть транспортом с грузовым отсеком Unit must have cargo space left Unidade deve conter espaço sobressalente + Юнит должен иметь свободное место в грузовом отсеке Unit must not be captive From 59b9e9a7df79cb3575a2af71761f205ff93efbf3 Mon Sep 17 00:00:00 2001 From: "[OMCB]kaban" Date: Thu, 5 Nov 2015 03:45:34 +0300 Subject: [PATCH 144/180] Missing periods added. --- addons/map_gestures/stringtable.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index 9c61d59292..0118b4323e 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -29,7 +29,7 @@ Fallback Alpha value for group leaders. Valor de transparência alternativo para líderes de grupo - Значение прозрачности для лидеров групп + Значение прозрачности для лидеров групп. Default Alpha @@ -39,7 +39,7 @@ Fallback Alpha value. Valor alternativo de transparência - Значение прозрачности по-умолчанию + Значение прозрачности по-умолчанию. Lead Default Color @@ -49,7 +49,7 @@ Fallback Color value for group leaders. Valor de cor alternativa para líderes de grupo - Значение цвета для лидеров групп + Значение цвета для лидеров групп. Default Color @@ -59,7 +59,7 @@ Fallback Color value. Valor alternativo de cor - Значение цвета + Значение цвета. Lead Alpha @@ -124,12 +124,12 @@ Group color configuration containing arrays of color pairs ([leadColor, color]). Configuração de cores de grupo contendo arrays com pares de cores ([leadColor, color]). - Конфигурация цвета групп содержит массив цветовых пар ([лид. цвет, цвет]) + Конфигурация цвета групп содержит массив цветовых пар ([лид. цвет, цвет]). Hash of Group ID mapped to the Group color configuration index. Hashes de ID de grupos mapeados para o índice de configuração de cor de grupos. - Хеш ID групп, соответствующих индексам конфигурации цвета групп + Хеш ID групп, соответствующих индексам конфигурации цвета групп. GroupID Color configuration mapping @@ -139,7 +139,7 @@ Enables the Map Gestures. Ativa os gestos no mapa - Включает указания на карте + Включает указания на карте. Name Text Color @@ -157,4 +157,4 @@ Указания на карте - \ No newline at end of file + From fabbf6d14d3f54a0e231526b2e7d57fa45b56428 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 5 Nov 2015 13:13:37 -0600 Subject: [PATCH 145/180] Nametags - Cleanup isSpeaking for ACRE --- addons/nametags/functions/fnc_initIsSpeaking.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index 4d4d576c52..3b8aea497a 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -41,7 +41,7 @@ if (isClass (configFile >> "cfgPatches" >> "acre_api")) then { ACE_LOGINFO("ACRE Detected."); DFUNC(isSpeaking) = { params ["_unit"]; - (([_unit] call acre_api_fnc_isSpeaking) || {[ACE_player] call acre_api_fnc_isBroadcasting}) && {!(_unit getVariable ["ACE_isUnconscious", false])} + ([_unit] call acre_api_fnc_isSpeaking) && {!(_unit getVariable ["ACE_isUnconscious", false])} }; } else { if (isClass (configFile >> "cfgPatches" >> "task_force_radio")) then { From 4b200d6909f2132d0c3070a6c63fa57cf086cdca Mon Sep 17 00:00:00 2001 From: ViperMaul Date: Thu, 5 Nov 2015 14:00:01 -0800 Subject: [PATCH 146/180] bump to v3.3.3 --- addons/main/script_mod.hpp | 2 +- mod.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index a8b5d80778..6345950d8b 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -5,7 +5,7 @@ #define MAJOR 3 #define MINOR 3 -#define PATCHLVL 2 +#define PATCHLVL 3 #define BUILD 0 #define VERSION MAJOR.MINOR.PATCHLVL.BUILD diff --git a/mod.cpp b/mod.cpp index 2e8513a952..096e6d563d 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,8 +1,8 @@ -name = "Advanced Combat Environment 3.3.2"; +name = "Advanced Combat Environment 3.3.3"; picture = "logo_ace3_ca.paa"; actionName = "GitHub"; action = "https://github.com/acemod/ACE3"; -description = "ACE3 - Version 3.3.2"; +description = "ACE3 - Version 3.3.3"; logo = "logo_ace3_ca.paa"; logoOver = "logo_ace3_ca.paa"; tooltip = "ACE3"; From c326bc2f87b6ce0ebaa31a3b484fa557547915d9 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 6 Nov 2015 01:05:25 -0600 Subject: [PATCH 147/180] #2772 - Display basicMed wounds for AI in mixed mode --- addons/medical/functions/fnc_displayPatientInformation.sqf | 4 ++-- addons/medical/functions/fnc_modifyMedicalAction.sqf | 2 +- addons/medical_menu/functions/fnc_updateUIInfo.sqf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index f73376cb29..222de4463f 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -54,7 +54,7 @@ if (_show) then { _allInjuryTexts = []; _genericMessages = []; - if (GVAR(level) >= 2) then { + if (GVAR(level) >= 2 && {([_unit] call FUNC(hasMedicalEnabled))}) then { _partText = [LSTRING(Head), LSTRING(Torso), LSTRING(LeftArm) ,LSTRING(RightArm) ,LSTRING(LeftLeg), LSTRING(RightLeg)] select _selectionN; _genericMessages pushback [localize _partText, [1, 1, 1, 1]]; }; @@ -87,7 +87,7 @@ if (_show) then { _damaged = [false, false, false, false, false, false]; _selectionBloodLoss = [0,0,0,0,0,0]; - if (GVAR(level) >= 2) then { + if (GVAR(level) >= 2 && {([_target] call FUNC(hasMedicalEnabled))}) then { _openWounds = _target getvariable [QGVAR(openWounds), []]; private "_amountOf"; { diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf index 8feaa7bfca..d16ab762d5 100644 --- a/addons/medical/functions/fnc_modifyMedicalAction.sqf +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -19,7 +19,7 @@ params ["_target", "_player", "_selectionN", "_actionData"]; -if (GVAR(level) < 2) exitwith { +if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitwith { private ["_pointDamage"]; _pointDamage = (_target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN; diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf index bcc9811905..56a22689db 100644 --- a/addons/medical_menu/functions/fnc_updateUIInfo.sqf +++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf @@ -62,7 +62,7 @@ _damaged = [false, false, false, false, false, false]; _selectionBloodLoss = [0, 0, 0, 0, 0, 0]; _allInjuryTexts = []; -if (EGVAR(medical,level) >= 2) then { +if ((EGVAR(medical,level) >= 2) && {([_target] call EFUNC(medical,hasMedicalEnabled))}) then { _openWounds = _target getVariable [QEGVAR(medical,openWounds), []]; private "_amountOf"; { From 6e30e9e0dfe9606c23a9952faacecc26cc4a5992 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 6 Nov 2015 19:02:54 +0000 Subject: [PATCH 148/180] Fix overpressure priority evaluation The code was checking the wrong configs for priority because of some missing variables. --- .../overpressure/functions/fnc_cacheOverPressureValues.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf b/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf index 0717065c43..8de8af6375 100644 --- a/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf +++ b/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf @@ -24,9 +24,9 @@ private ["_array", "_type", "_return", "_config" /*, "_priority"*/]; // get Priority Array from Config _array = [ - getNumber (configFile >> "CfgWeapons" >> QGVAR(priority)), - getNumber (configFile >> "CfgMagazines" >> QGVAR(priority)), - getNumber (configFile >> "CfgAmmo" >> QGVAR(priority)) + getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(priority)), + getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(priority)), + getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(priority)) ]; TRACE_1("Proiroity Array",_array); From e0506f29bc5799b219896d3fed5f051a1e603118 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 6 Nov 2015 20:46:06 -0600 Subject: [PATCH 149/180] Read settings from paramsArray (params in description.ext) for now just limited to SCALAR/BOOL --- addons/common/XEH_postInit.sqf | 3 + addons/common/XEH_preInit.sqf | 1 + .../fnc_readSettingsFromParamsArray.sqf | 64 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 addons/common/functions/fnc_readSettingsFromParamsArray.sqf diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index ac1a162137..66e2e078c6 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -194,6 +194,9 @@ call FUNC(checkFiles); ACE_LOGINFO("Settings received from server."); + if (isServer) then { //read settings from paramsArray + [] call FUNC(readSettingsFromParamsArray); + }; // Event so that ACE_Modules have their settings loaded: ["InitSettingsFromModules", []] call FUNC(localEvent); diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index a9b10c4896..4c912e98b4 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -139,6 +139,7 @@ PREP(playerSide); PREP(positionToASL); PREP(progressBar); PREP(readSettingFromModule); +PREP(readSettingsFromParamsArray); PREP(receiveRequest); PREP(removeCanInteractWithCondition); PREP(removeSpecificMagazine); diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf new file mode 100644 index 0000000000..26d488558b --- /dev/null +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -0,0 +1,64 @@ +/* + * Author: PabstMirror + * Read settins from paramsArray that have a ACE_setting = 1. + * Happens before modules but after all other configs (for force priority) + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_common_fnc_readSettingsFromParamsArray + * + * Public: No + */ +#include "script_component.hpp" + +//paramsArray is a normal variable not a command +local _paramsArray = missionnamespace getvariable ["paramsArray", []]; + +TRACE_1("Reading missionConfigFile params",_paramsArray); + +{ + local _config = (missionConfigFile >> "params") select _forEachIndex; + if ((getNumber (_config >> "ACE_setting")) > 0) then { + local _settingName = configName _config; + local _settingValue = _x; + local _force = (getNumber (_config >> "force")) > 0; + local _title = getText (_config >> "title"); + + TRACE_4("ace_setting",_title,_settingName,_settingValue,_force); + + // Check if the variable is already defined + if (isNil _settingName) exitWith { + ACE_LOGERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName); + }; + + local _settingData = [_settingName] call FUNC(getSettingData); + _settingData params ["", "_typeName", "", "", "", "", "_isForced"]; + + // Check if it's already forced and quit + if (_isForced) exitWith {ACE_LOGWARNING_1("readSettingsFromParamsArray - param [%1] is already set and forced", _settingName);}; + + // The setting is not forced, so update the value + // Read entry and cast it to the correct type from the existing variable + _validValue = false; + _value = switch (true) do { + case (_typeName == "SCALAR"): {_validValue = true;}; + case (_typeName == "BOOL"): { + _settingValue = _settingValue > 0; + _validValue = true; + }; + //TODO: Handle ARRAY,COLOR,STRING??? (bool/scalar covers most important settings) + }; + + if (!_validValue) exitWith { + ACE_LOGWARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_typeName); + }; + + // Update the variable globaly and Force the setting if requested + [_settingName, _settingValue, _force, true] call FUNC(setSetting); + }; +} foreach _paramsArray; From 826b4fd20b1f4c9e0fae99744c494f8bad3327f2 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 6 Nov 2015 20:53:05 -0600 Subject: [PATCH 150/180] Cleanup --- addons/common/functions/fnc_readSettingsFromParamsArray.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index 26d488558b..b011c3b380 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -44,8 +44,8 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); // The setting is not forced, so update the value // Read entry and cast it to the correct type from the existing variable - _validValue = false; - _value = switch (true) do { + local _validValue = false; + switch (true) do { case (_typeName == "SCALAR"): {_validValue = true;}; case (_typeName == "BOOL"): { _settingValue = _settingValue > 0; From 7ec480c98e6341d8f8938d8ef1a109693b3be4a9 Mon Sep 17 00:00:00 2001 From: Jonathan Pereira Date: Sat, 7 Nov 2015 11:39:02 -0200 Subject: [PATCH 151/180] Added ace_captives translation to PT-BR --- addons/captives/stringtable.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index d4166a495d..ea1d99419a 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -181,9 +181,11 @@ Make Unit Handcuffed + Fazer unidade algemada Sync a unit to make them handcuffed.<br />Source: ace_captives + Sincronizar uma unidade para deixá-la algemada.<br/>Source: ace_captives Captives Settings @@ -284,4 +286,4 @@ Rendición o desarme - + \ No newline at end of file From 34163b5e56083aa8f4a993ba974552078c95bd55 Mon Sep 17 00:00:00 2001 From: "[OMCB]kaban" Date: Sat, 7 Nov 2015 19:54:48 +0300 Subject: [PATCH 152/180] Nametags translations are rolled back --- addons/nametags/stringtable.xml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index fdc93ea1d6..61a2b3f5a2 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -9,7 +9,7 @@ Zobrazit jména Pokaż imiona Nevek mutatása - Показывать позывные + Показать имена Mostra i nomi Mostrar nomes @@ -23,7 +23,7 @@ Zobrazit jména hráčů Mostrar nomes de jogadores Mostra i nomi dei giocatori - Показывать позывные игроков (включить позывные) + Показывать имена игроков (включить имена) Show player name only on cursor (requires player names) @@ -35,7 +35,7 @@ Mostra i nomi solo se puntati (richiede mostra nomi abilitato) Mostrar nome de jogador somente no cursor (requer nome de jogadores) Játékosok nevének mutatása csak a kurzoron (a nevek mutatása szükséges) - Показать позывные игроков только под курсором (при включенных позывных) + Показать имена игроков только под курсором (при включенных именах) Show player name only on keypress (requires player names) @@ -45,7 +45,7 @@ Zobrazit jména hráčů jen na klávesu (vyžaduje jména hráčů) Pokaż imiona graczy tylko po przytrzymaniu klawisza (wymagana opcja Pokaż imiona graczy) Játékosnevek mutatása csak gombnyomásra (a nevek mutatása szükséges) - Показать позывные игроков только по нажатию клавиши (при включенных позывных) + Показать имена игроков только по нажатию клавиши (при включенных именах) Mostra i nomi solo se si preme il tasto (richiede mostra nomi abilitato) Mostrar nomes somente ao pressionar teclar (requer nome de jogadores) @@ -59,7 +59,7 @@ Mostra i gradi (richiede mostra nomi abilitato) Mostrar patente de jogadores (requer nome de jogadores) Játékosok rendfokozatának mutatása (a nevek mutatása szükséges) - Показывать звания игроков (при вкл. позывных) + Показывать звания игроков (при вкл. именах) Show vehicle crew info @@ -89,7 +89,7 @@ Show SoundWaves (requires player names) Schallwellen anzeigen (benötigt Spielernamen) Mostrar onda sonora (requiere Mostrar nombres de jugadores) - Индикатор разговора (при вкл. позывных) + Индикатор разговора (при вкл. именах) Zobrazit SoundWaves (vyžaduje jména hráčů) Pokaż fale dźwiękowe (wymagana opcja Pokaż imiona graczy) Afficher "qui parle" (si noms affichés) @@ -100,7 +100,7 @@ Default Nametag Color (Non Group Members) Voreingestellte Namenfarbe (Spieler außerhalb der Gruppe) - Цвет позывных по-умолчанию (не членов групп) + Цвет меток игроков (не членов групп) Color de etiquetas de nombre por defecto (No miembros de grupo) Domyślny kolor imion (członkowie spoza grupy) Couleur d'affichage par défaut (si dans aucun groupe) @@ -118,7 +118,7 @@ Etiquetas de nome NameTags Névcímkék - Позывные + Имена игроков Player Names View Dist. @@ -129,7 +129,7 @@ Distância de visão dos nomes dos jogadores Distance de vue des noms de joueurs Játékosok nevének látótávja - Дистанция отображения позывных + Дистанция отображения имен Distance in meters at which player names are shown. Default: 5 @@ -140,7 +140,7 @@ Distância em metros que os nomes dos jogadores são mostrados. Padrão: 5 Distance en mètres au delà de laquelle les noms de joueurs ne sont plus affichés. Défaut: 5 Méterben megadott érték a játékosok nevének mutatására. Alapértelmezett: 5 - Дистанция в метрах, на которой отображаются позывные игроков. По-умолчанию: 5 + Дистанция в метрах, на которой отображаются имена игроков. По-умолчанию: 5 Show name tags for AI? @@ -226,7 +226,7 @@ Zeige Maus-Namensanzeigen für Fahrzeugkommandanten (nur wenn der Client Namensanzeigen aktiviert hat). Standard: Nein Zobrazit jmenovky pro velitele vozidla (pouze pokud má klient jmenovky povolené). Výchozí: Ne Mostrar o nome no cursor para o comandante do veículo (somente se o cliente tiver etiquetas de nomes ativada). Padrão: Não - Показывать позывной командира техники (только, если клиент включил отображение позывных). По-умолчанию: Нет + Показывать имя командира техники (только, если клиент включил отображение имен). По-умолчанию: Нет Afficher les étiquettes de nom pour les commandants de véhicule (uniquement si l'affichage est activé pour le client). Défaut: non @@ -238,7 +238,7 @@ Este módulo permite que você personalize as configurações e distâncias de etiquetas de nome. Ce module permet le paramétrage de l'affichage des étiquettes des noms Ez a modul lehetővé teszi a névcímkék beállításainak testreszabását. - Этот модуль позволяет настроить опции и дистанцию отображения позывных. + Этот модуль позволяет настроить опции и дистанцию отображения имен игроков. Only on Cursor @@ -315,7 +315,7 @@ Usar ajustes de etiquetas de nome Utiliser les paramètre des NamesTags Névcímkék beállításának használata - Так же, как позывные + Так же, как имена Always Show All @@ -337,7 +337,7 @@ Mostrar os nomes dos jogadores e definir sua ativação. Padrão: Ativado Afficher les noms des joueurs et paramètre son activation. Défaut: activé Mutassa a játékosok nevét és kezelje az aktivációjukat. Alapértelmezett: Engedélyezve - Показывать позывные игроков и установить их активацию. По-умолчанию: Включено + Показывать имена игроков и установить их активацию. По-умолчанию: Включено Effect of sound waves above the heads of speaking players after holding the PTT key. This option works with TFAR and ACRE2. @@ -359,7 +359,7 @@ Tamanho das etiquetas de nome Taille des noms Névcímkék mérete - Размер позывных + Размер имен игроков Text and Icon Size Scaling @@ -373,4 +373,4 @@ Масштабирование размера текста и иконок - \ No newline at end of file + From ff60cdcfa316b24046038e989cbc240a346e0481 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 7 Nov 2015 11:44:31 -0600 Subject: [PATCH 153/180] #2828 - Fix empty flashlightProxy model --- addons/map/CfgAmmo.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/map/CfgAmmo.hpp b/addons/map/CfgAmmo.hpp index 805e7b3627..9e98d0efea 100644 --- a/addons/map/CfgAmmo.hpp +++ b/addons/map/CfgAmmo.hpp @@ -6,7 +6,7 @@ class CfgAmmo { class F_20mm_White: FlareBase {}; class ACE_FlashlightProxy_White: F_20mm_White { - model = ""; + model = "\A3\Weapons_f\empty"; effectFlare = "FlareShell"; triggerTime = 0; From 01d679c5dc92162f6cd812d1ce5863d35cf8a6ee Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 7 Nov 2015 14:33:41 -0600 Subject: [PATCH 154/180] #2810 - Delete map glow light from DC players --- addons/map/XEH_postInitClient.sqf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index c162f8802d..a89e3fb8e3 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -1,5 +1,22 @@ #include "script_component.hpp" +//Delete map glow lights from disconnecting players #2810 +if (isServer) then { + addMissionEventHandler ["HandleDisconnect",{ + params ["_disconnectedPlayer"]; + + if ((!GVAR(mapGlow)) || {isNull _disconnectedPlayer}) exitWith {}; + { + if (_x isKindOf "ACE_FlashlightProxy_White") then { + // ACE_LOGINFO_2("Deleting leftover light [%1:%2] from DC player [%3]", _x, typeOf _x, _disconnectedPlayer); + deleteVehicle _x; + }; + } forEach attachedObjects _disconnectedPlayer; + + nil + }]; +}; + // Exit on Headless as well if (!hasInterface) exitWith {}; From 2dd90824aa9a80c21ba9f1389d549adb99eab997 Mon Sep 17 00:00:00 2001 From: "[OMCB]kaban" Date: Sun, 8 Nov 2015 02:52:16 +0300 Subject: [PATCH 155/180] Map Gestures translations update --- addons/map_gestures/stringtable.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index 0118b4323e..1555307e90 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -4,7 +4,7 @@ Map Gestures Gestos no mapa - Указания на карте + Жесты на карте Enabled @@ -14,12 +14,12 @@ Map Gesture Max Range Distância para gestos no mapa - Дистанция указаний на карте + Макс. дистанция жестов на карте Max range between players to show the map gesture indicator [default: 7 meters] Distância max. entre os jogadores para mostrar o indicador de gesto no mapa [padrão: 7 metros] - Макс. дистанция между игроками для отображения указаний на карте [по-умолчанию: 7 метров] + Макс. дистанция между игроками для отображения жестов на карте [по-умолчанию: 7 метров] Lead Default Alpha @@ -104,7 +104,7 @@ Map Gestures - Group Settings Gestos no mapa - Definições de Grupo - Указания на карте - настройки групп + Жесты на карте - настройки групп Update Interval @@ -144,17 +144,17 @@ Name Text Color Cor do texto do nome - Цвет текста позывного + Цвет текста имени Color of the name tag text besides the map gestures mark. Cor do texto da etiqueta de nome que fica embaixo da marcação de gestos no mapa. - Цвет позывного за маркером указаний. + Цвет инмени игрока рядом с маркером жестов. Map Gestures Gestos no mapa - Указания на карте + Жесты на карте From dad1388eec5c91f6f3be679652db079fa7db3b4b Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 7 Nov 2015 18:34:46 -0600 Subject: [PATCH 156/180] RealisticNames - add ka-60 v2 (black and white) --- addons/realisticnames/CfgVehicles.hpp | 3 +++ addons/realisticnames/stringtable.xml | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/addons/realisticnames/CfgVehicles.hpp b/addons/realisticnames/CfgVehicles.hpp index c3288815dd..9aea632247 100644 --- a/addons/realisticnames/CfgVehicles.hpp +++ b/addons/realisticnames/CfgVehicles.hpp @@ -308,6 +308,9 @@ class CfgVehicles { class O_Heli_Light_02_F: Heli_Light_02_base_F { displayName = CSTRING(Heli_Light_02_Name); }; + class O_Heli_Light_02_v2_F: Heli_Light_02_base_F { + displayName = CSTRING(Heli_Light_02_v2_Name); + }; class Heli_Light_02_unarmed_base_F; class O_Heli_Light_02_unarmed_F: Heli_Light_02_unarmed_base_F { displayName = CSTRING(Heli_Light_02_unarmed_Name); diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index 5f84a4f16d..fbf1e37226 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -817,6 +817,17 @@ Ka-60 Kasatka Ka-60 Kasatka + + Ka-60 Kasatka (Black & White) + Ka-60 Kasatka (černobílá) + Ka-60 Kasatka (noir et blanc) + Ka-60 Kasatka (Schwarz-weiß) + Ka-60 Kasatka (bianco e nero) + Ka-60 Kasatka (czarno-biały) + Ka-60 Kasatka (preto e branco) + Ka-60 Касатка (белый и черный) + Ka-60 Kasatka (blanco y negro) + Ka-60 Kasatka (unarmed) Ka-60 Kasatka (unbewaffnet) From 5b16638ae5998a0330ce195eec7501df54f2e34f Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 8 Nov 2015 11:22:41 -0600 Subject: [PATCH 157/180] Always force param settings --- .../common/functions/fnc_readSettingsFromParamsArray.sqf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index b011c3b380..a8b0299a15 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -26,10 +26,9 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); if ((getNumber (_config >> "ACE_setting")) > 0) then { local _settingName = configName _config; local _settingValue = _x; - local _force = (getNumber (_config >> "force")) > 0; local _title = getText (_config >> "title"); - TRACE_4("ace_setting",_title,_settingName,_settingValue,_force); + TRACE_3("ace_setting",_title,_settingName,_settingValue); // Check if the variable is already defined if (isNil _settingName) exitWith { @@ -58,7 +57,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); ACE_LOGWARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_typeName); }; - // Update the variable globaly and Force the setting if requested - [_settingName, _settingValue, _force, true] call FUNC(setSetting); + // Update the variable globaly and Force + [_settingName, _settingValue, true, true] call FUNC(setSetting); }; } foreach _paramsArray; From e2e74e0f5d228bae5007e32bb6d9828a6e7e8963 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 10 Nov 2015 16:17:22 -0600 Subject: [PATCH 158/180] =?UTF-8?q?DAGR=20-=20Fix=20degrees=20(=C2=B0=20-?= =?UTF-8?q?=20seems=20to=20need=20UTF-8=20BOM)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/dagr/functions/fnc_outputVector.sqf | 4 ++-- addons/dagr/functions/fnc_outputWP.sqf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index 7787a7ff96..93a34899ca 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -1,4 +1,4 @@ -/* +/* * Author: Rosuto * DAGR vector output loop * @@ -93,5 +93,5 @@ GVAR(vectorGrid) = _dagrGrid; __gridControl ctrlSetText format ["%1", _dagrGrid]; __speedControl ctrlSetText format ["%1", _dagrDist]; __elevationControl ctrlSetText format ["%1", _dagrElevation]; -__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _bearing] } else { format ["%1�", _bearing] }); +__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _bearing] } else { format ["%1°", _bearing] }); __timeControl ctrlSetText format ["%1", _dagrTime]; diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf index 77bee00398..204a5ef556 100644 --- a/addons/dagr/functions/fnc_outputWP.sqf +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -1,4 +1,4 @@ -/* +/* * Author: Rosuto * DAGR waypoint output loop * @@ -85,7 +85,7 @@ GVAR(outputPFH) = [{ __gridControl ctrlSetText format ["%1", _dagrGrid]; __speedControl ctrlSetText format ["%1", _bearing]; __elevationControl ctrlSetText format ["%1", _dagrGrid2]; - __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1�", _dagrHeading] }); + __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1°", _dagrHeading] }); __timeControl ctrlSetText format ["%1", _dagrDistance]; }, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler; From 4ff31771d35e5de72f2db12e965c6b9c90ddc0cf Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 10 Nov 2015 20:51:00 -0600 Subject: [PATCH 159/180] DAGR - missing ( --- addons/dagr/functions/fnc_outputVector.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index 93a34899ca..7f36facae8 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -71,7 +71,7 @@ _yCoord = switch true do { _dagrGrid = _xCoord + " " + _yCoord; // Find target elevation -_elevation = floor (_lazPosZ) + EGVAR(common,mapAltitude)); +_elevation = floor ((_lazPosZ) + EGVAR(common,mapAltitude)); _dagrElevation = str _elevation + "m"; // Time From 9d2d5b9c7c477967e38f5ae23acf34ddfe053459 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 11 Nov 2015 01:58:12 -0600 Subject: [PATCH 160/180] AdvanBalls - Fix ACE_twistDirection --- .../functions/fnc_readWeaponDataFromConfig.sqf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf index 8e13dc04dc..ec6f3a6212 100644 --- a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf @@ -20,9 +20,11 @@ _weaponConfig = (configFile >> "CfgWeapons" >> _this); _barrelTwist = getNumber(_weaponConfig >> "ACE_barrelTwist"); _twistDirection = 1; -_twistDirection = getNumber(_weaponConfig >> "ACE_twistDirection"); -if !(_twistDirection in [-1, 0, 1]) then { - _twistDirection = 1; +if (isNumber (_weaponConfig >> "ACE_twistDirection")) then { + _twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection"); + if !(_twistDirection in [-1, 0, 1]) then { + _twistDirection = 1; + }; }; _barrelLength = getNumber(_weaponConfig >> "ACE_barrelLength"); From 391bfc160a1f2f75d19fce9c9424f08816e41ff7 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 11 Nov 2015 13:24:27 -0600 Subject: [PATCH 161/180] Overpresure - Misc fixes - Fix passing magazine/ammo to overpressure event - Use AGL for nearEntities - Fix getDistance returning nil --- .../functions/fnc_fireLauncherBackblast.sqf | 4 ++-- .../functions/fnc_fireOverpressureZone.sqf | 2 +- addons/overpressure/functions/fnc_getDistance.sqf | 10 ++++++---- .../overpressure/functions/fnc_overpressureDamage.sqf | 8 +------- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf b/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf index 1653fce9e1..672031676e 100644 --- a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf +++ b/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf @@ -41,10 +41,10 @@ _var params["_backblastAngle","_backblastRange","_backblastDamage"]; // Damage to others private "_affected"; -_affected = getPos _projectile nearEntities ["CAManBase", _backblastRange]; +_affected = (ASLtoAGL _position) nearEntities ["CAManBase", _backblastRange]; // Let each client handle their own affected units -["overpressure", _affected, [_firer, _position, _direction, _weapon]] call EFUNC(common,targetEvent); +["overpressure", _affected, [_firer, _position, _direction, _weapon, _magazine, _ammo]] call EFUNC(common,targetEvent); // Damage to the firer private "_distance"; diff --git a/addons/overpressure/functions/fnc_fireOverpressureZone.sqf b/addons/overpressure/functions/fnc_fireOverpressureZone.sqf index 3068928ba4..02de0eb311 100644 --- a/addons/overpressure/functions/fnc_fireOverpressureZone.sqf +++ b/addons/overpressure/functions/fnc_fireOverpressureZone.sqf @@ -40,7 +40,7 @@ _var params["_dangerZoneAngle","_dangerZoneRange","_dangerZoneDamage"]; // Damage to others private "_affected"; -_affected = getPos _projectile nearEntities ["CAManBase", _dangerZoneRange]; +_affected = (ASLtoAGL _position) nearEntities ["CAManBase", _dangerZoneRange]; // Let each client handle their own affected units ["overpressure", _affected, [_firer, _position, _direction, _weapon, _magazine, _ammo]] call EFUNC(common,targetEvent); diff --git a/addons/overpressure/functions/fnc_getDistance.sqf b/addons/overpressure/functions/fnc_getDistance.sqf index 3b3103d951..6c5a5e6500 100644 --- a/addons/overpressure/functions/fnc_getDistance.sqf +++ b/addons/overpressure/functions/fnc_getDistance.sqf @@ -13,7 +13,8 @@ */ #include "script_component.hpp" -EXPLODE_3_PVT(_this,_posASL,_direction,_maxDistance); +params ["_posASL", "_direction", "_maxDistance"]; +TRACE_3("params",_posASL,_direction,_maxDistance); private ["_distance", "_interval", "_line", "_intersections", "_terrainIntersect", "_lastTerrainIntersect"]; @@ -42,20 +43,21 @@ while { }; _distance = _distance + ([1, -1] select (_intersections > 0 || _terrainIntersect)) * _interval; - if (_distance > _maxDistance) exitWith {_distance = 999}; }; +TRACE_4("while done",_distance,_maxDistance,_terrainIntersect,_lastTerrainIntersect); + if (_distance > _maxDistance) exitWith {_distance}; // If the intersection was with the terrain, check slope -if (_terrainIntersect || _lastTerrainIntersect) exitWith { +if (_terrainIntersect || _lastTerrainIntersect) then { private ["_slope","_angle"]; _slope = surfaceNormal (_posASL vectorAdd (_direction vectorMultiply _distance)); // Calculate the angle between the terrain and the back blast direction _angle = 90 - acos (- (_slope vectorDotProduct _direction)); - //systemChat format ["Angle: %1", _angle]; + TRACE_3("Terrain Intersect",_slope,_direction,_angle); // Angles is below 25º, no backblast at all if (_angle < 25) exitWith {_distance = 999}; // Angles is below 45º the distance is increased according to the difference diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index a39aec3c14..f9c58050e0 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -30,12 +30,6 @@ _var params["_overpressureAngle","_overpressureRange","_overpressureDamage"]; TRACE_4("Parameters:",_overpressureAngle,_overpressureRange,_overpressureDamage,_weapon); -private "_pos"; -_pos = _posASL; -if (!surfaceIsWater _pos) then { - _pos = ASLtoATL _pos; -}; - { if (local _x && {_x != _firer} && {vehicle _x == _x}) then { private ["_targetPositionASL", "_relativePosition", "_axisDistance", "_distance", "_angle", "_line", "_line2"]; @@ -68,4 +62,4 @@ if (!surfaceIsWater _pos) then { }; }; }; -} forEach (_pos nearEntities ["CAManBase", _overpressureRange]); +} forEach ((ASLtoAGL _posASL) nearEntities ["CAManBase", _overpressureRange]); From 9b2c79e7e117876fe8196a95feb7a6ba4cbd9c96 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 11 Nov 2015 14:12:42 -0600 Subject: [PATCH 162/180] getDistance - use lineIntersectsSurfaces --- .../functions/fnc_fireLauncherBackblast.sqf | 2 +- .../functions/fnc_getDistance.sqf | 71 +++++++------------ 2 files changed, 28 insertions(+), 45 deletions(-) diff --git a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf b/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf index 672031676e..e457e023c6 100644 --- a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf +++ b/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf @@ -48,7 +48,7 @@ _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _backblastRange]; // Damage to the firer private "_distance"; -_distance = [_position, _direction, _backblastRange] call FUNC(getDistance); +_distance = [_position, _direction, _backblastRange, _firer] call FUNC(getDistance); TRACE_1("Distance",_distance); diff --git a/addons/overpressure/functions/fnc_getDistance.sqf b/addons/overpressure/functions/fnc_getDistance.sqf index 6c5a5e6500..a583700127 100644 --- a/addons/overpressure/functions/fnc_getDistance.sqf +++ b/addons/overpressure/functions/fnc_getDistance.sqf @@ -7,62 +7,45 @@ * 0: Pos ASL of origin (ARRAY> * 1: Direction * 2: Max distance to search + * 3: Shooter * * Return value: - * Distance to intersection (+- 0.1 m) + * Distance to intersection (999 if distance is greater than max) + * + * Example: + * [[1823.41,5729.05,6.66627], [-0.953255,0.109689,-0.281554], 15, ace_player] call ace_overpressure_fnc_getDistance + * */ #include "script_component.hpp" -params ["_posASL", "_direction", "_maxDistance"]; +params ["_posASL", "_direction", "_maxDistance", "_shooter"]; TRACE_3("params",_posASL,_direction,_maxDistance); -private ["_distance", "_interval", "_line", "_intersections", "_terrainIntersect", "_lastTerrainIntersect"]; +local _intersections = lineIntersectsSurfaces [_posASL, _posASL vectorAdd (_direction vectorMultiply _maxDistance), _shooter, objNull, true, 99]; -_distance = _maxDistance; -_interval = _distance; -_line = [_posASL, []]; -_terrainIntersect = false; -_lastTerrainIntersect = false; +TRACE_1("lineIntersectsSurfaces",_intersections); -while { - _interval > 0.1 -} do { - _lastTerrainIntersect = _terrainIntersect; - _interval = _interval / 2; +local _distance = 999; - _line set [1, _posASL vectorAdd (_direction vectorMultiply _distance)]; +{ + _x params ["_intersectPosASL", "_surfaceNormal", "_intersectObject"]; - _intersections = { - _x isKindOf "Static" || {_x isKindOf "AllVehicles"} - } count (lineIntersectsWith _line); + //Hit something solid that can reflect - (Static covers Building) + if ((isNull _intersectObject) || {(_intersectObject isKindOf "Static") || {_intersectObject isKindOf "AllVehicles"}}) exitWith { + _distance = _posASL vectorDistance _intersectPosASL; + TRACE_3("hit solid object",_distance,_intersectObject,typeOf _intersectObject); - _terrainIntersect = if (_intersections > 0) then { - false - } else { - terrainIntersectASL _line + if (isNull _intersectObject) then { //Terrain: + // Calculate the angle between the terrain and the back blast direction + _angle = 90 - acos (- (_surfaceNormal vectorDotProduct _direction)); + TRACE_3("Terrain Intersect",_surfaceNormal,_direction,_angle); + // Angles is below 25deg, no backblast at all + if (_angle < 25) exitWith {_distance = 999}; + // Angles is below 45deg the distance is increased according to the difference + if (_angle < 45) exitWith {_distance = _distance * (5 - 4 * sqrt ((_angle - 25)/20))}; + // Angles above 45degcreate full backblast + }; }; - - _distance = _distance + ([1, -1] select (_intersections > 0 || _terrainIntersect)) * _interval; - if (_distance > _maxDistance) exitWith {_distance = 999}; -}; - -TRACE_4("while done",_distance,_maxDistance,_terrainIntersect,_lastTerrainIntersect); - -if (_distance > _maxDistance) exitWith {_distance}; - -// If the intersection was with the terrain, check slope -if (_terrainIntersect || _lastTerrainIntersect) then { - private ["_slope","_angle"]; - _slope = surfaceNormal (_posASL vectorAdd (_direction vectorMultiply _distance)); - // Calculate the angle between the terrain and the back blast direction - _angle = 90 - acos (- (_slope vectorDotProduct _direction)); - - TRACE_3("Terrain Intersect",_slope,_direction,_angle); - // Angles is below 25º, no backblast at all - if (_angle < 25) exitWith {_distance = 999}; - // Angles is below 45º the distance is increased according to the difference - if (_angle < 45) exitWith {_distance = _distance * (5 - 4 * sqrt ((_angle - 25)/20))}; - // Angles above 45º create full backblast -}; +} forEach _intersections; _distance From c3e6990d00ad5a5f79ae5edb939bca6500cb6309 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 12 Nov 2015 01:06:29 -0600 Subject: [PATCH 163/180] #2528 (6) - Move bandage log before basic exit In advanced medical without enableFor AI. Bandaging an AI would exit before adding log. --- addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf index aa3669c227..cf18475866 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf @@ -19,6 +19,9 @@ #include "script_component.hpp" params ["_caller", "_target", "_selectionName", "_className", "_items", "", ["_specificSpot", -1]]; +[_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); +[_target, "activity_view", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message + if !([_target] call FUNC(hasMedicalEnabled)) exitwith { _this call FUNC(treatmentBasic_bandage); }; @@ -30,7 +33,4 @@ if !([_target] call FUNC(hasMedicalEnabled)) exitwith { }; }foreach _items;*/ -[_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); -[_target, "activity_view", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message - true; From a621eaab2468d53c3c72c9e768edb6b57caf0c54 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 13 Nov 2015 02:57:06 -0600 Subject: [PATCH 164/180] #2750 - Update FCS display after distance adjust --- addons/fcs/functions/fnc_keyUp.sqf | 8 ++++++++ addons/fcs/functions/script_component.hpp | 13 +------------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index 1b2443b44a..37390c0b47 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -210,3 +210,11 @@ if(_playSound) then { if(_showHint) then { [format ["%1: %2", localize LSTRING(ZeroedTo), _distance]] call EFUNC(common,displayTextStructured); }; + +//Update the hud's distance display to the new value or "----" if out of range +//(10m fudge because of EFUNC(common,getTargetDistance)) +if ((_distance + 10) >= (getNumber (_turretConfig >> QGVAR(MaxDistance)))) then { + ((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText "----"; +} else { + ((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText ([_distance, 4, 0] call CBA_fnc_formatNumber); +}; diff --git a/addons/fcs/functions/script_component.hpp b/addons/fcs/functions/script_component.hpp index 8ada0f7a71..179c66c15e 100644 --- a/addons/fcs/functions/script_component.hpp +++ b/addons/fcs/functions/script_component.hpp @@ -1,12 +1 @@ -#define COMPONENT fcs -#include "\z\ace\addons\main\script_mod.hpp" - -#ifdef DEBUG_ENABLED_FCS - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_FCS - #define DEBUG_SETTINGS DEBUG_SETTINGS_FCS -#endif - -#include "\z\ace\addons\main\script_macros.hpp" +#include "\z\ace\addons\fcs\script_component.hpp" \ No newline at end of file From cf368f240f7da1d1b8e60d92d0923c7909596ac3 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Fri, 13 Nov 2015 12:59:46 +0000 Subject: [PATCH 165/180] Remove ear ringing upon spectator entry Volume updating was disabled, however any existing ringing would persist. Setting the volume to 0 should make the hearing PFH stop playing sound. --- addons/spectator/functions/fnc_setSpectator.sqf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index 66344e69c6..e8ab031ea4 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -30,7 +30,10 @@ if (!hasInterface) exitWith {}; if (_set isEqualTo GVAR(isSet)) exitwith {}; // Handle common addon audio -if (["ace_hearing"] call EFUNC(common,isModLoaded)) then {EGVAR(hearing,disableVolumeUpdate) = _set}; +if (["ace_hearing"] call EFUNC(common,isModLoaded)) then { + EGVAR(hearing,disableVolumeUpdate) = _set; + EGVAR(hearing,deafnessDV) = 0; +}; if (["acre_sys_radio"] call EFUNC(common,isModLoaded)) then {[_set] call acre_api_fnc_setSpectator}; if (["task_force_radio"] call EFUNC(common,isModLoaded)) then {[player, _set] call TFAR_fnc_forceSpectator}; From 6ebd76ff2fbd54adfba52a82f3fa1e0c2433b19a Mon Sep 17 00:00:00 2001 From: Jonathan Pereira Date: Sat, 14 Nov 2015 12:24:01 -0200 Subject: [PATCH 166/180] Added PT-BR translations to Cargo --- addons/cargo/stringtable.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 6902a1aae1..4b33f9826b 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -97,15 +97,19 @@ Loading Cargo + Carregando carga Unloading Cargo + Descarregando carga %1<br/>could not be loaded + %1<br/>não pode ser carregado %1<br/>could not be unloaded + %1<br/>não pode ser descarregado - + \ No newline at end of file From e008f87fb8254290d45f2e8dcb855c7ee1d56e15 Mon Sep 17 00:00:00 2001 From: BaerMitUmlaut Date: Mon, 16 Nov 2015 19:00:02 +0100 Subject: [PATCH 167/180] Cleanup ambience sound module --- .../functions/fnc_moduleAmbianceSound.sqf | 54 +++++++++---------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf index 70ef644384..26f605e347 100644 --- a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf +++ b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf @@ -18,10 +18,8 @@ #include "script_component.hpp" -private ["_logic", "_units", "_activated","_ambianceSounds", "_soundFiles", "_minimalDistance","_maximalDistance", "_minimalDistance", "_maxDelayBetweenSounds", "_allUnits", "_newPos", "_targetUnit", "_soundToPlay", "_soundPath", "_unparsedSounds", "_list", "_splittedList", "_nilCheckPassedList"]; -_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param; -_units = [_this,1,[],[[]]] call BIS_fnc_param; -_activated = [_this,2,true,[true]] call BIS_fnc_param; +private ["_ambianceSounds", "_minimalDistance","_maximalDistance", "_minimalDistance", "_maxDelayBetweenSounds", "_missionRoot", "_unparsedSounds", "_splittedList", "_soundPath"]; +params ["_logic", "_units", "_activated"]; // We only play this on the locality of the logic, since the sounds are broadcasted across the network if (_activated && local _logic) then { @@ -34,51 +32,49 @@ if (_activated && local _logic) then { _volume = (_logic getVariable ["soundVolume", 30]) max 1; _followPlayers = _logic getVariable ["followPlayers", false]; - _splittedList = [_unparsedSounds, ","] call BIS_fnc_splitString; + _splittedList = _unparsedSounds splitString ","; + _missionRoot = str missionConfigFile select [0, count str missionConfigFile - 15]; - _nilCheckPassedList = ""; { _x = [_x] call EFUNC(common,stringRemoveWhiteSpace); - _splittedList set [_forEachIndex, _x]; - }forEach _splittedList; - _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; - { if (isClass (missionConfigFile >> "CfgSounds" >> _x)) then { - _ambianceSounds pushBack (_soundPath + (getArray(missionConfigFile >> "CfgSounds" >> _x >> "sound") select 0)); + // CfgSounds accepts a leading backslash, but a double backslash + // is not accepted in the path, so we have to filter that. + _soundPath = getArray (missionConfigFile >> "CfgSounds" >> _x >> "sound") select 0; + if (_soundPath select [0,1] == "\") then { + _ambianceSounds pushBack (_missionRoot + (_soundPath select [1])); + } else { + _ambianceSounds pushBack (_missionRoot + _soundPath); + }; } else { if (isClass (configFile >> "CfgSounds" >> _x)) then { _ambianceSounds pushBack ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0)); + } else { + ACE_LOGERROR_1("Ambient Sounds: Sound ""%1"" not found.",_x); }; }; - }forEach _splittedList; + + false + } count _splittedList; if (count _ambianceSounds == 0) exitWith {}; { - if !([".", _x, true] call BIS_fnc_inString) then { + if ((_x find ".") == -1) then { _ambianceSounds set [_forEachIndex, _x + ".wss"]; }; - }forEach _ambianceSounds; + } forEach _ambianceSounds; [{ - private ["_args", "_logic", "_ambianceSounds", "_minimalDistance", "_maximalDistance", "_minDelayBetweensounds", "_maxDelayBetweenSounds", "_volume", "_followPlayers","_lastTimePlayed", "_newPos"]; - _args = _this select 0; - _logic = _args select 0; - _minDelayBetweensounds = _args select 4; - _maxDelayBetweenSounds = _args select 5; - _lastTimePlayed = _args select 8; + private ["_newPos", "_allUnits", "_targetUnit"]; + params ["_args", "_pfhHandle"]; + _args params ["_logic", "_ambianceSounds", "_minimalDistance", "_maximalDistance", "_minDelayBetweensounds", "_maxDelayBetweenSounds", "_volume", "_followPlayers", "_lastTimePlayed"]; if (!alive _logic) exitWith { - [(_this select 1)] call cba_fnc_removePerFrameHandler; + [_pfhHandle] call cba_fnc_removePerFrameHandler; }; if (ACE_time - _lastTimePlayed >= ((_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds)) then { - _ambianceSounds = _args select 1; - _minimalDistance = _args select 2; - _maximalDistance = _args select 3; - - _volume = _args select 6; - _followPlayers = _args select 7; // Find all players in session. _allUnits = if (isMultiplayer) then {playableUnits} else {[ACE_player]}; @@ -87,7 +83,7 @@ if (_activated && local _logic) then { if (count _allUnits > 0) then { // Select a target unit at random. - _targetUnit = _allUnits select (round(random((count _allUnits)-1))); + _targetUnit = _allUnits call BIS_fnc_selectRandom; // find the position from which we are going to play this sound from. _newPos = (getPos _targetUnit); @@ -112,7 +108,7 @@ if (_activated && local _logic) then { // If no unit is to close to this position, we will play the sound. if ({(_newPos distance _x < (_minimalDistance / 2))}count _allUnits == 0) then { - playSound3D [_ambianceSounds select (round(random((count _ambianceSounds)-1))), ObjNull, false, _newPos, _volume, 1, 1000]; + playSound3D [_ambianceSounds call BIS_fnc_selectRandom, objNull, false, _newPos, _volume, 1, 1000]; _args set [8, ACE_time]; }; }; From 23e110d7ce1d75b18360a64afe6683a32f26c7dd Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Tue, 17 Nov 2015 15:26:34 +0000 Subject: [PATCH 168/180] Remove depreciated spectator hotkey --- addons/spectator/UI/interface.hpp | 1 - .../functions/fnc_handleInterface.sqf | 19 ------------------- .../spectator/functions/fnc_setSpectator.sqf | 2 -- addons/spectator/stringtable.xml | 8 -------- 4 files changed, 30 deletions(-) diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index e8bc6c210f..409df7ef71 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -191,7 +191,6 @@ class GVAR(interface) { }; multiselectEnabled = 0; onTreeDblClick = QUOTE([ARR_2('onTreeDblClick',_this)] call FUNC(handleInterface)); - onTreeSelChanged = QUOTE([ARR_2('onTreeSelChanged',_this)] call FUNC(handleInterface)); }; class unitFrame: RscFrame { x = 0; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index dcba11d2ec..def736675e 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -62,7 +62,6 @@ switch (toLower _mode) do { [localize LSTRING(freeCamPan),"RMB (Hold)"], [localize LSTRING(freeCamDolly),"LMB (Hold)"], [localize LSTRING(freeCamBoost),"Shift (Hold)"], - [localize LSTRING(freeCamFocus),"F"], [localize LSTRING(attributeControls),""], [localize LSTRING(nextCam),"Up Arrow"], [localize LSTRING(prevCam),"Down Arrow"], @@ -126,7 +125,6 @@ switch (toLower _mode) do { GVAR(heldKeys) resize 255; GVAR(mouse) = [false,false]; GVAR(mousePos) = [0.5,0.5]; - GVAR(treeSel) = objNull; }; // Mouse events case "onmousebuttondown": { @@ -226,14 +224,6 @@ switch (toLower _mode) do { case 32: { // D GVAR(camDolly) set [0, GVAR(camSpeed) * ([1, 2] select _shift)]; }; - case 33: { // F - private ["_sel","_vector"]; - _sel = GVAR(treeSel); - if ((GVAR(camMode) == 0) && {!isNull _sel} && {_sel in GVAR(unitList)}) then { - _vector = (positionCameraToWorld [0,0,0]) vectorDiff (positionCameraToWorld [0,0,25]); - [nil,nil,nil,(getPosATL _sel) vectorAdd _vector] call FUNC(setCameraAttributes); - }; - }; case 44: { // Z GVAR(camBoom) = -0.5 * GVAR(camSpeed) * ([1, 2] select _shift); }; @@ -335,15 +325,6 @@ switch (toLower _mode) do { [_newMode,_newUnit] call FUNC(transitionCamera); }; }; - case "ontreeselchanged": { - _args params ["_tree","_sel"]; - - if (count _sel == 3) then { - GVAR(treeSel) = objectFromNetId (_tree tvData _sel); - } else { - GVAR(treeSel) = objNull; - }; - }; case "onunitsupdate": { _args params ["_tree"]; private ["_cachedUnits","_cachedGrps","_cachedSides","_s","_g","_grp","_u","_unit","_side"]; diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index e8ab031ea4..065ca0079b 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -49,7 +49,6 @@ if (_set) then { GVAR(heldKeys) resize 255; GVAR(mouse) = [false,false]; GVAR(mousePos) = [0.5,0.5]; - GVAR(treeSel) = objNull; // Update units before opening to support pre-set camera unit [] call FUNC(updateUnits); @@ -133,7 +132,6 @@ if (_set) then { GVAR(heldKeys) = nil; GVAR(mouse) = nil; GVAR(mousePos) = nil; - GVAR(treeSel) = nil; // Reset nametag settings if (["ace_nametags"] call EFUNC(common,isModLoaded)) then { diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 00d50e4704..d8c7cd1310 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -344,14 +344,6 @@ Ускорение камеры Aumento de velocidad - - Focus on Unit - Skup na jednostce - Focar na unidade - Фокус на юните - Zaměřit se na Jednotku - Centrarse en la unidad - Interface Interfejs From a57d1bca75737479cb9617eb937cba1a1cc1895b Mon Sep 17 00:00:00 2001 From: commy2 Date: Tue, 17 Nov 2015 17:43:07 +0100 Subject: [PATCH 169/180] replace local keyword with private --- addons/captives/functions/fnc_setHandcuffed.sqf | 4 ++-- addons/captives/functions/fnc_setSurrendered.sqf | 4 ++-- addons/common/XEH_postInit.sqf | 4 ++-- addons/common/functions/fnc_dumpArray.sqf | 2 +- addons/common/functions/fnc_getTurretIndex.sqf | 2 +- addons/common/functions/fnc_hasHatch.sqf | 8 ++++---- addons/common/functions/fnc_selectWeaponMode.sqf | 2 +- addons/common/functions/fnc_setAllGear.sqf | 2 +- addons/common/functions/fnc_timePFH.sqf | 6 +++--- addons/goggles/XEH_postInit.sqf | 2 +- addons/goggles/functions/fnc_applyDirtEffect.sqf | 2 +- addons/goggles/functions/fnc_applyDustEffect.sqf | 2 +- addons/goggles/functions/fnc_applyRainEffect.sqf | 2 +- addons/goggles/functions/fnc_applyRotorWashEffect.sqf | 2 +- addons/goggles/functions/fnc_handleFired.sqf | 2 +- addons/goggles/functions/fnc_isDivingGoggles.sqf | 2 +- addons/goggles/functions/fnc_isInRotorWash.sqf | 4 ++-- addons/interaction/XEH_postInit.sqf | 2 +- addons/logistics_wirecutter/functions/fnc_isFence.sqf | 4 ++-- addons/medical/functions/fnc_translateSelections.sqf | 2 +- addons/medical_menu/XEH_postInit.sqf | 2 +- addons/medical_menu/functions/fnc_updateBodyImage.sqf | 2 +- addons/reload/functions/fnc_canCheckAmmo.sqf | 2 +- addons/respawn/functions/fnc_restoreGear.sqf | 2 +- 24 files changed, 34 insertions(+), 34 deletions(-) diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index 0bc2e85c52..a4788db057 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -56,7 +56,7 @@ if (_state) then { //Adds an animation changed eh //If we get a change in animation then redo the animation (handles people vaulting to break the animation chain) - local _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; + private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; if (_animChangedEHID != -1) then { TRACE_1("removing animChanged EH",_animChangedEHID); _unit removeEventHandler ["AnimChanged", _animChangedEHID]; @@ -92,7 +92,7 @@ if (_state) then { [_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus); //remove AnimChanged EH - local _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; + private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; TRACE_1("removing animChanged EH",_animChangedEHID); _unit removeEventHandler ["AnimChanged", _animChangedEHID]; _unit setVariable [QGVAR(handcuffAnimEHID), -1]; diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index 171455f3b1..5af4454472 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -48,7 +48,7 @@ if (_state) then { if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then { //Adds an animation changed eh //If we get a change in animation then redo the animation (handles people vaulting to break the animation chain) - local _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; + private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; if (_animChangedEHID != -1) then { TRACE_1("removing animChanged EH",_animChangedEHID); _unit removeEventHandler ["AnimChanged", _animChangedEHID]; @@ -68,7 +68,7 @@ if (_state) then { [_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus); //remove AnimChanged EH - local _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; + private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; _unit removeEventHandler ["AnimChanged", _animChangedEHID]; _unit setVariable [QGVAR(surrenderAnimEHID), -1]; diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 032b6148be..2c4a78254a 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -13,7 +13,7 @@ //Handle the waitAndExec array: while {!(GVAR(waitAndExecArray) isEqualTo []) && {GVAR(waitAndExecArray) select 0 select 0 <= ACE_Time}} do { - local _entry = GVAR(waitAndExecArray) deleteAt 0; + private _entry = GVAR(waitAndExecArray) deleteAt 0; (_entry select 2) call (_entry select 1); }; @@ -29,7 +29,7 @@ GVAR(nextFrameNo) = diag_frameno + 1; //Handle the waitUntilAndExec array: - local _deleted = 0; + private _deleted = 0; { // if condition is satisifed call statement if ((_x select 2) call (_x select 0)) then { diff --git a/addons/common/functions/fnc_dumpArray.sqf b/addons/common/functions/fnc_dumpArray.sqf index 010736d3a9..026b08501e 100644 --- a/addons/common/functions/fnc_dumpArray.sqf +++ b/addons/common/functions/fnc_dumpArray.sqf @@ -18,7 +18,7 @@ params ["_var", ["_depth", 0, [0]]]; -local _pad = ""; +private _pad = ""; for "_i" from 0 to _depth do { _pad = _pad + toString [9]; diff --git a/addons/common/functions/fnc_getTurretIndex.sqf b/addons/common/functions/fnc_getTurretIndex.sqf index 050f3e1c4f..20ee178bf1 100644 --- a/addons/common/functions/fnc_getTurretIndex.sqf +++ b/addons/common/functions/fnc_getTurretIndex.sqf @@ -17,7 +17,7 @@ params ["_unit"]; -local _vehicle = vehicle _unit; +private _vehicle = vehicle _unit; if (_unit == _vehicle) exitWith {[]}; scopeName "main"; diff --git a/addons/common/functions/fnc_hasHatch.sqf b/addons/common/functions/fnc_hasHatch.sqf index 124eed78a5..a67ad0b0d3 100644 --- a/addons/common/functions/fnc_hasHatch.sqf +++ b/addons/common/functions/fnc_hasHatch.sqf @@ -14,11 +14,11 @@ params ["_unit"]; -local _vehicle = vehicle _unit; +private _vehicle = vehicle _unit; if (_unit == _vehicle) exitWith {false}; -local _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; if (getNumber (_config >> "hideProxyInCombat") != 1) exitWith {false}; @@ -26,10 +26,10 @@ if (_unit == driver _vehicle) exitWith { getNumber (_config >> "forceHideDriver") == 0; // return }; -local _turret = [_unit] call FUNC(getTurretIndex); +private _turret = [_unit] call FUNC(getTurretIndex); if (_turret isEqualTo []) exitWith {false}; -local _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath); +private _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath); getNumber (_turretConfig >> "forceHideGunner") == 0; // return diff --git a/addons/common/functions/fnc_selectWeaponMode.sqf b/addons/common/functions/fnc_selectWeaponMode.sqf index f255c63e98..582f6fd4b2 100644 --- a/addons/common/functions/fnc_selectWeaponMode.sqf +++ b/addons/common/functions/fnc_selectWeaponMode.sqf @@ -19,7 +19,7 @@ params ["_unit", "_muzzle", "_mode"]; -local _index = 0; +private _index = 0; while { _index < 100 && {currentMuzzle _unit != _muzzle || {currentWeaponMode _unit != _mode}} diff --git a/addons/common/functions/fnc_setAllGear.sqf b/addons/common/functions/fnc_setAllGear.sqf index e25045a685..2b5a2a9cc7 100644 --- a/addons/common/functions/fnc_setAllGear.sqf +++ b/addons/common/functions/fnc_setAllGear.sqf @@ -148,7 +148,7 @@ if (_backpack != "") then { _unit addBackpack _backpack; if (_clearBackpack) then { - local _backpackObject = unitBackpack _unit; + private _backpackObject = unitBackpack _unit; clearMagazineCargoGlobal _backpackObject; clearWeaponCargoGlobal _backpackObject; diff --git a/addons/common/functions/fnc_timePFH.sqf b/addons/common/functions/fnc_timePFH.sqf index 152eceee3f..e5366d331e 100644 --- a/addons/common/functions/fnc_timePFH.sqf +++ b/addons/common/functions/fnc_timePFH.sqf @@ -14,13 +14,13 @@ BEGIN_COUNTER(timePFH); -local _lastTickTime = ACE_diagTime; -local _lastGameTime = ACE_gameTime; +private _lastTickTime = ACE_diagTime; +private _lastGameTime = ACE_gameTime; ACE_gameTime = time; ACE_diagTime = diag_tickTime; -local _delta = ACE_diagTime - _lastTickTime; +private _delta = ACE_diagTime - _lastTickTime; if (ACE_gameTime <= _lastGameTime) then { TRACE_1("paused",_delta); diff --git a/addons/goggles/XEH_postInit.sqf b/addons/goggles/XEH_postInit.sqf index 4958c8e02b..09a84ad151 100644 --- a/addons/goggles/XEH_postInit.sqf +++ b/addons/goggles/XEH_postInit.sqf @@ -95,7 +95,7 @@ GVAR(OldGlasses) = "#NULLSTRING"; }] call EFUNC(common,addEventHandler); // check goggles -local _fnc_checkGoggles = { +private _fnc_checkGoggles = { params ["_unit"]; if (GVAR(EffectsActive)) then { diff --git a/addons/goggles/functions/fnc_applyDirtEffect.sqf b/addons/goggles/functions/fnc_applyDirtEffect.sqf index b10ebc9668..c7ff386f9d 100644 --- a/addons/goggles/functions/fnc_applyDirtEffect.sqf +++ b/addons/goggles/functions/fnc_applyDirtEffect.sqf @@ -28,7 +28,7 @@ _effects set [DIRT, true]; SETGLASSES(_unit,_effects); if ([_unit] call FUNC(isGogglesVisible)) then { - local _dirtImage = getText (configFile >> "CfgGlasses" >> goggles _unit >> "ACE_OverlayDirt"); + private _dirtImage = getText (configFile >> "CfgGlasses" >> goggles _unit >> "ACE_OverlayDirt"); if (_dirtImage != "") then { GVAR(GogglesEffectsLayer) cutRsc ["RscACE_GogglesEffects", "PLAIN", 0.1, false]; diff --git a/addons/goggles/functions/fnc_applyDustEffect.sqf b/addons/goggles/functions/fnc_applyDustEffect.sqf index b052f3eae7..75f4853c01 100644 --- a/addons/goggles/functions/fnc_applyDustEffect.sqf +++ b/addons/goggles/functions/fnc_applyDustEffect.sqf @@ -54,7 +54,7 @@ GVAR(DustHandler) = [{ if (ACE_diagTime >= GETDUSTT(DTIME) + 3) then { SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2)); - local _amount = 1 - (GETDUSTT(DAMOUNT) * 0.125); + private _amount = 1 - (GETDUSTT(DAMOUNT) * 0.125); if !(_unit getVariable ["ACE_EyesDamaged", false]) then { GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [_amount, _amount, _amount, _amount], [1, 1, 1, 0]]; diff --git a/addons/goggles/functions/fnc_applyRainEffect.sqf b/addons/goggles/functions/fnc_applyRainEffect.sqf index 7e1260a453..01b2894d87 100644 --- a/addons/goggles/functions/fnc_applyRainEffect.sqf +++ b/addons/goggles/functions/fnc_applyRainEffect.sqf @@ -27,7 +27,7 @@ _fnc_underCover = { if (vehicle _unit != _unit && {!isTurnedOut _unit}) exitWith {true}; // looking up and no roof over head - local _position = eyePos _unit; + private _position = eyePos _unit; positionCameraToWorld [0, 0, 1] select 2 < (positionCameraToWorld [0, 0, 0] select 2) - 0.4 || {(lineIntersects [_position, _position vectorAdd [0, 0, 15], _unit])} // return }; diff --git a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf index 7dc088bc4e..bc8d0bafbf 100644 --- a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf +++ b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf @@ -86,7 +86,7 @@ if (_safe) exitWith {}; // apply rotor wash effect if (_rotorWash select 1 > 0) then { - local _scale = 0.7; + private _scale = 0.7; if (_rotorWash select 1 > 0) then { _scale = CLAMP(0.3 * (_rotorWash select 1),0.1,0.3); diff --git a/addons/goggles/functions/fnc_handleFired.sqf b/addons/goggles/functions/fnc_handleFired.sqf index 90260d07b3..793849822f 100644 --- a/addons/goggles/functions/fnc_handleFired.sqf +++ b/addons/goggles/functions/fnc_handleFired.sqf @@ -73,7 +73,7 @@ SETDUST(DTIME,ACE_diagTime); // apply dust effect if the amount of fired bullets is over the threshold if (GETDUSTT(DAMOUNT) < 2) then { - local _bulletsRequired = 100; + private _bulletsRequired = 100; if (isNumber (configFile >> _cloudType >> QGVAR(BulletCount))) then { _bulletsRequired = getNumber (configFile >> _cloudType >> QGVAR(BulletCount)); diff --git a/addons/goggles/functions/fnc_isDivingGoggles.sqf b/addons/goggles/functions/fnc_isDivingGoggles.sqf index ab5bb74269..ac86a09d2b 100644 --- a/addons/goggles/functions/fnc_isDivingGoggles.sqf +++ b/addons/goggles/functions/fnc_isDivingGoggles.sqf @@ -17,7 +17,7 @@ params ["_glasses"]; -local _config = configFile >> "CfgGlasses" >> _glasses; +private _config = configFile >> "CfgGlasses" >> _glasses; if (!isClass _config) exitWith {false}; diff --git a/addons/goggles/functions/fnc_isInRotorWash.sqf b/addons/goggles/functions/fnc_isInRotorWash.sqf index 5ddc59192a..319da3a875 100644 --- a/addons/goggles/functions/fnc_isInRotorWash.sqf +++ b/addons/goggles/functions/fnc_isInRotorWash.sqf @@ -21,11 +21,11 @@ params ["_unit", ["_radius", 15]]; -local _rotorWash = [false, 0]; +private _rotorWash = [false, 0]; { if (isEngineOn _x) then { - local _distance = _unit distance _x; + private _distance = _unit distance _x; // convert distance to 0...1 range, where 0 is the maximum radius _distance = 1 - _distance / _radius; diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index 6442911faa..ee90af64ad 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -29,7 +29,7 @@ GVAR(isOpeningDoor) = false; if (_unit == ACE_player) then { addCamShake [4, 0.5, 5]; - local _message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 0)); + private _message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 0)); [_message] call FUNC(displayTextStructured); }; }] call EFUNC(common,addEventHandler); diff --git a/addons/logistics_wirecutter/functions/fnc_isFence.sqf b/addons/logistics_wirecutter/functions/fnc_isFence.sqf index 449ffd7b77..878f44cf9a 100644 --- a/addons/logistics_wirecutter/functions/fnc_isFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_isFence.sqf @@ -19,9 +19,9 @@ params ["_object"]; TRACE_1("params",_object); -local _typeOf = typeOf _object; +private _typeOf = typeOf _object; -local _returnValue = if (_typeOf != "") then { +private _returnValue = if (_typeOf != "") then { //If the fence has configEntry we can check it directly (1 == (getNumber (configFile >> "CfgVehicles" >> _typeOf >> QGVAR(isFence)))); } else { diff --git a/addons/medical/functions/fnc_translateSelections.sqf b/addons/medical/functions/fnc_translateSelections.sqf index a5f0328181..f2fe4c1de9 100644 --- a/addons/medical/functions/fnc_translateSelections.sqf +++ b/addons/medical/functions/fnc_translateSelections.sqf @@ -47,7 +47,7 @@ if (_selection in R_LEG_SELECTIONS) exitwith {"leg_r"};*/ //Backup method to detect weird selections/hitpoints if ((_selection == "?") || {!(_selection in GVAR(SELECTIONS))}) exitWith { if (_hitPointIndex < 0) exitWith {_selection}; - local _hitPoint = toLower configName ((configProperties [(configFile >> "CfgVehicles" >> (typeOf _unit) >> "HitPoints")]) select _hitPointIndex); + private _hitPoint = toLower configName ((configProperties [(configFile >> "CfgVehicles" >> (typeOf _unit) >> "HitPoints")]) select _hitPointIndex); TRACE_4("Weird sel/hit", _unit, _selection, _hitPointIndex, _hitPoint); if (_hitPoint in HEAD_HITPOINTS) exitWith {"head"}; diff --git a/addons/medical_menu/XEH_postInit.sqf b/addons/medical_menu/XEH_postInit.sqf index 4435511b8f..ad1acabdb3 100644 --- a/addons/medical_menu/XEH_postInit.sqf +++ b/addons/medical_menu/XEH_postInit.sqf @@ -19,7 +19,7 @@ GVAR(pendingReopen) = false; ["ACE3 Common", QGVAR(displayMenuKeyPressed), localize LSTRING(DisplayMenuKey), { - local _target = cursorTarget; + private _target = cursorTarget; if (!((_target isKindOf "CAManBase") && {[ACE_player, _target] call FUNC(canOpenMenu)})) then {_target = ACE_player}; // Conditions: canInteract diff --git a/addons/medical_menu/functions/fnc_updateBodyImage.sqf b/addons/medical_menu/functions/fnc_updateBodyImage.sqf index afe84a59d3..1e8067a7f6 100644 --- a/addons/medical_menu/functions/fnc_updateBodyImage.sqf +++ b/addons/medical_menu/functions/fnc_updateBodyImage.sqf @@ -20,7 +20,7 @@ params ["_selectionBloodLoss", "_damaged", "_display"]; // Handle the body image coloring -local _availableSelections = [50, 51, 52, 53, 54, 55]; +private _availableSelections = [50, 51, 52, 53, 54, 55]; { private ["_red", "_green", "_blue"]; diff --git a/addons/reload/functions/fnc_canCheckAmmo.sqf b/addons/reload/functions/fnc_canCheckAmmo.sqf index 8fbb37c726..41a46ea465 100644 --- a/addons/reload/functions/fnc_canCheckAmmo.sqf +++ b/addons/reload/functions/fnc_canCheckAmmo.sqf @@ -25,7 +25,7 @@ if (_target isKindOf "StaticWeapon") exitWith { // no check ammo action on destroyed static weapons if (!alive _target) exitWith {false}; - local _found = false; + private _found = false; { if (_x select 2) exitWith { diff --git a/addons/respawn/functions/fnc_restoreGear.sqf b/addons/respawn/functions/fnc_restoreGear.sqf index d01e45dd50..a0ca2aa35e 100644 --- a/addons/respawn/functions/fnc_restoreGear.sqf +++ b/addons/respawn/functions/fnc_restoreGear.sqf @@ -37,7 +37,7 @@ if ( }; if (currentWeapon _unit != "") then { - local _index = 0; + private _index = 0; while { _index < 100 && {currentWeaponMode _unit != _activeWeaponMode} From 5cbfe4f2a5f743210654f8d12dd21aa290998f44 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 17 Nov 2015 14:02:20 -0600 Subject: [PATCH 170/180] local -> private --- .../functions/fnc_loadSettingsLocalizedText.sqf | 2 +- .../fnc_readSettingsFromParamsArray.sqf | 14 +++++++------- addons/common/functions/fnc_setSetting.sqf | 4 ++-- .../functions/fnc_moduleSettings.sqf | 4 ++-- addons/modules/XEH_postInit.sqf | 16 ++++++++-------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf index 62ba120ff9..7b05902862 100644 --- a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf +++ b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf @@ -40,7 +40,7 @@ _fnc_parseConfigForDisplayNames = { if (_typeOf != "SCALAR") then { ACE_LOGWARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf); } else { - local _value = missionNamespace getVariable [_name, -1]; + private _value = missionNamespace getVariable [_name, -1]; if ((_value < 0) || {_value >= (count _values)}) then { ACE_LOGWARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)(", _name, _value, count _values); }; diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index a8b0299a15..d1fdb30b29 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -17,16 +17,16 @@ #include "script_component.hpp" //paramsArray is a normal variable not a command -local _paramsArray = missionnamespace getvariable ["paramsArray", []]; +private _paramsArray = missionnamespace getvariable ["paramsArray", []]; TRACE_1("Reading missionConfigFile params",_paramsArray); { - local _config = (missionConfigFile >> "params") select _forEachIndex; + private _config = (missionConfigFile >> "params") select _forEachIndex; if ((getNumber (_config >> "ACE_setting")) > 0) then { - local _settingName = configName _config; - local _settingValue = _x; - local _title = getText (_config >> "title"); + private _settingName = configName _config; + private _settingValue = _x; + private _title = getText (_config >> "title"); TRACE_3("ace_setting",_title,_settingName,_settingValue); @@ -35,7 +35,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); ACE_LOGERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName); }; - local _settingData = [_settingName] call FUNC(getSettingData); + private _settingData = [_settingName] call FUNC(getSettingData); _settingData params ["", "_typeName", "", "", "", "", "_isForced"]; // Check if it's already forced and quit @@ -43,7 +43,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); // The setting is not forced, so update the value // Read entry and cast it to the correct type from the existing variable - local _validValue = false; + private _validValue = false; switch (true) do { case (_typeName == "SCALAR"): {_validValue = true;}; case (_typeName == "BOOL"): { diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf index e37f4b6ff7..9d3a42326c 100644 --- a/addons/common/functions/fnc_setSetting.sqf +++ b/addons/common/functions/fnc_setSetting.sqf @@ -22,7 +22,7 @@ params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]]; -local _settingData = [_name] call FUNC(getSettingData); +private _settingData = [_name] call FUNC(getSettingData); // Exit if the setting does not exist if (_settingData isEqualTo []) exitWith { @@ -42,7 +42,7 @@ if ((missionNamespace getVariable [QEGVAR(modules,serverModulesRead), false]) && }; // If the type is not equal, try to cast it -local _failed = false; +private _failed = false; if (typeName _value != _settingData select 1) then { _failed = true; if ((_typeName == "BOOL") && {typeName _value == "SCALAR"}) then { diff --git a/addons/map_gestures/functions/fnc_moduleSettings.sqf b/addons/map_gestures/functions/fnc_moduleSettings.sqf index 3e580493c9..56d3235d03 100644 --- a/addons/map_gestures/functions/fnc_moduleSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleSettings.sqf @@ -26,14 +26,14 @@ if (!_activated || !isServer) exitWith {}; [_logic, QGVAR(interval), "interval"] call EFUNC(common,readSettingFromModule); //For default fallback colors, setting to empty ("") will not force on clients -local _defaultLeadColor = _logic getVariable ["defaultLeadColor", ""]; +private _defaultLeadColor = _logic getVariable ["defaultLeadColor", ""]; if (_defaultLeadColor != "") then { _defaultLeadColor = call compile ("[" + _defaultLeadColor + "]"); if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")}; [QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting); }; -local _defaultColor = _logic getVariable ["defaultColor", ""]; +private _defaultColor = _logic getVariable ["defaultColor", ""]; if (_defaultColor != "") then { _defaultColor = call compile ("[" + _defaultColor + "]"); if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")}; diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index d4857af57f..1935714dc8 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -5,22 +5,22 @@ // TODO This is a basic and limited implementation that mimics some of the functionality from the A3 module framework, but not all of it. // We have to execute this in the postInit XEH because on object init, the parameters of the modules are not yet available. They are if we execute it at the start of postInit execution. - local _uniqueModulesHandled = []; + private _uniqueModulesHandled = []; { [_x] call { params ["_logic"]; - local _logicType = typeof _logic; + private _logicType = typeof _logic; _logic hideobject true; if (_logic getvariable [QGVAR(initalized), false]) exitwith {}; - local _config = (configFile >> "CfgVehicles" >> _logicType); + private _config = (configFile >> "CfgVehicles" >> _logicType); if !(isClass _config) exitwith {}; - local _isGlobal = getNumber (_config >> "isGlobal") > 0; - local _isDisposable = getNumber (_config >> "isDisposable") > 0; - local _isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1; - local _isSingular = getNumber (_config >> "isSingular") > 0; - local _function = getText (_config >> "function"); + private _isGlobal = getNumber (_config >> "isGlobal") > 0; + private _isDisposable = getNumber (_config >> "isDisposable") > 0; + private _isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1; + private _isSingular = getNumber (_config >> "isSingular") > 0; + private _function = getText (_config >> "function"); if (isnil _function) then { _function = compile _function; } else { From 3ec9fca73e47fc2c6e7a8cfb8d40bc48ceec6dfd Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 17 Nov 2015 14:06:12 -0600 Subject: [PATCH 171/180] local -> private --- addons/interact_menu/functions/fnc_render.sqf | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf index 0addd42483..1a14acae07 100644 --- a/addons/interact_menu/functions/fnc_render.sqf +++ b/addons/interact_menu/functions/fnc_render.sqf @@ -14,12 +14,12 @@ BEGIN_COUNTER(fnc_render); -local _foundTarget = false; +private _foundTarget = false; if (GVAR(openedMenuType) >= 0) then { BEGIN_COUNTER(fnc_renderMenuOpen); - local _cursorPos2 = positionCameraToWorld [0, 0, 2]; + private _cursorPos2 = positionCameraToWorld [0, 0, 2]; // Render all available nearby interactions call FUNC(renderActionPoints); @@ -29,13 +29,13 @@ if (GVAR(openedMenuType) >= 0) then { [[0.5,0.5], "\a3\ui_f\data\IGUI\Cfg\Cursors\selected_ca.paa"] call FUNC(renderSelector); }; - local _cursorScreenPos = [worldToScreen _cursorPos2, GVAR(cursorPos)] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); + private _cursorScreenPos = [worldToScreen _cursorPos2, GVAR(cursorPos)] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); - local _closestDistance = 1000000; - local _closestSelection = -1; + private _closestDistance = 1000000; + private _closestSelection = -1; { _x params ["", "_sPos"]; - local _distanceFromCursor = _cursorScreenPos distance2d _sPos; + private _distanceFromCursor = _cursorScreenPos distance2d _sPos; if ((_distanceFromCursor < 0.1118) && {_distanceFromCursor < _closestDistance}) then { _closestDistance = _distanceFromCursor; _closestSelection = _forEachIndex; @@ -44,11 +44,11 @@ if (GVAR(openedMenuType) >= 0) then { if(_closestSelection == -1) exitWith {}; - local _closest = GVAR(currentOptions) select _closestSelection; + private _closest = GVAR(currentOptions) select _closestSelection; _closest params ["_action", "_sPos", "_hoverPath"]; - local _cTime = ACE_diagTime; - local _delta = _cTime - GVAR(lastTime); + private _cTime = ACE_diagTime; + private _delta = _cTime - GVAR(lastTime); GVAR(lastTime) = _cTime; GVAR(rotationAngle) = (GVAR(rotationAngle) + (270*_delta)) mod 360; @@ -59,7 +59,7 @@ if (GVAR(openedMenuType) >= 0) then { GVAR(selectedAction) = _action select 1; GVAR(selectedTarget) = (GVAR(selectedAction)) select 2; - local _misMatch = !(GVAR(lastPath) isEqualTo _hoverPath); + private _misMatch = !(GVAR(lastPath) isEqualTo _hoverPath); if(_misMatch && {ACE_diagTime-GVAR(expandedTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then { GVAR(startHoverTime) = ACE_diagTime; @@ -76,8 +76,8 @@ if (GVAR(openedMenuType) >= 0) then { GVAR(menuDepthPath) = +GVAR(lastPath); // Execute the current action if it's run on hover - local _tmp = ((GVAR(selectedAction) select 0) select 9) select 3; - local _runOnHover = true; + private _tmp = ((GVAR(selectedAction) select 0) select 9) select 3; + private _runOnHover = true; if ((typeName _tmp) == "CODE" ) then { _runOnHover = call _tmp; } else { @@ -89,14 +89,14 @@ if (GVAR(openedMenuType) >= 0) then { }; if (_runOnHover) then { this = GVAR(selectedTarget); - local _player = ACE_Player; - local _target = GVAR(selectedTarget); + private _player = ACE_Player; + private _target = GVAR(selectedTarget); // Clear the conditions caches ["clearConditionCaches", []] call EFUNC(common,localEvent); // Check the action conditions - local _actionData = GVAR(selectedAction) select 0; + private _actionData = GVAR(selectedAction) select 0; if ([_target, _player, _actionData select 6] call (_actionData select 4)) then { // Call the statement [_target, _player, _actionData select 6] call (_actionData select 3); From da16fc103833caec8213d243be99d87c2ba49f7b Mon Sep 17 00:00:00 2001 From: kaban Date: Wed, 18 Nov 2015 06:50:00 +0300 Subject: [PATCH 172/180] \addons\captives\stringtable.xml - resolving conflicts. --- addons/captives/stringtable.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index ea1d99419a..8465588fb5 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -166,7 +166,7 @@ Fazer unidade se render Faire capituler l'unité Egység kapitulálása - Сделать юнита пленным + Заставить юнита сдаться Sync a unit to make them surrender.<br />Source: ace_captives @@ -177,15 +177,17 @@ Sincroniza uma unidade para fazer com que ela se renda. <br/>Fonte: ace_captives Synchronise une unité pour la rendre captive. <br/>Source: ace_captives Egység szinkronizálása, hogy kapituláljon.<br />Forrás: ace_captives - Синхронизируйте с юнитами, чтобы сделать их пленными.<br />Источник: ace_captives + Синхронизируйте с юнитами, чтобы заставить их сдаться в плен.<br />Источник: ace_captives Make Unit Handcuffed Fazer unidade algemada + Связать юнита Sync a unit to make them handcuffed.<br />Source: ace_captives Sincronizar uma unidade para deixá-la algemada.<br/>Source: ace_captives + Синхронизируйте с юнитами, чтобы сделать их связанными.<br />Источник: ace_captives Captives Settings From ebbf2b373a9a474459fed3dc384e494e1ce572fc Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 17 Nov 2015 23:44:50 -0600 Subject: [PATCH 173/180] goggles - prevent CBA PFEH warning fix "x\cba\addons\common\fnc_removePerFrameHandler.sqf:30","WARNING: Invalid or not existing PFH ID." --- addons/goggles/functions/fnc_handleKilled.sqf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/goggles/functions/fnc_handleKilled.sqf b/addons/goggles/functions/fnc_handleKilled.sqf index d156fb684c..e8e207c478 100644 --- a/addons/goggles/functions/fnc_handleKilled.sqf +++ b/addons/goggles/functions/fnc_handleKilled.sqf @@ -26,7 +26,9 @@ GVAR(EffectsActive) = false; _unit setVariable ["ACE_EyesDamaged", false]; -[GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler; +if (GVAR(DustHandler) != -1) then { + [GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler; +}; GVAR(DustHandler) = -1; true From 0110ada1b52fc7b80662bd4e3f916c5cca64bac4 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Wed, 18 Nov 2015 14:54:17 +0000 Subject: [PATCH 174/180] Fix zeus waypoint formation actions --- addons/interaction/ACE_ZeusActions.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/interaction/ACE_ZeusActions.hpp b/addons/interaction/ACE_ZeusActions.hpp index 5a7ea9d631..af29186895 100644 --- a/addons/interaction/ACE_ZeusActions.hpp +++ b/addons/interaction/ACE_ZeusActions.hpp @@ -199,47 +199,47 @@ class ACE_ZeusActions { class wedge { displayName = "$STR_Wedge"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\wedge_ca.paa"; - statement = "{_x setWaypointFormation 'WEDGE';} forEach (curatorSelected select 1);"; + statement = "{_x setWaypointFormation 'WEDGE';} forEach (curatorSelected select 2);"; }; class vee { displayName = "$STR_Vee"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\vee_ca.paa"; - statement = "{_x setWaypointFormation 'VEE';} forEach (curatorSelected select 1);"; + statement = "{_x setWaypointFormation 'VEE';} forEach (curatorSelected select 2);"; }; class line { displayName = "$STR_Line"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\line_ca.paa"; - statement = "{_x setWaypointFormation 'LINE';} forEach (curatorSelected select 1);"; + statement = "{_x setWaypointFormation 'LINE';} forEach (curatorSelected select 2);"; }; class column { displayName = "$STR_Column"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\column_ca.paa"; - statement = "{_x setWaypointFormation 'COLUMN';} forEach (curatorSelected select 1);"; + statement = "{_x setWaypointFormation 'COLUMN';} forEach (curatorSelected select 2);"; }; class file { displayName = "$STR_File"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\file_ca.paa"; - statement = "{_x setWaypointFormation 'FILE';} forEach (curatorSelected select 1);"; + statement = "{_x setWaypointFormation 'FILE';} forEach (curatorSelected select 2);"; }; class stag_column { displayName = "$STR_Staggered"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\stag_column_ca.paa"; - statement = "{_x setWaypointFormation 'STAG COLUMN';} forEach (curatorSelected select 1);"; + statement = "{_x setWaypointFormation 'STAG COLUMN';} forEach (curatorSelected select 2);"; }; class ech_left { displayName = "$STR_EchL"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_left_ca.paa"; - statement = "{_x setWaypointFormation 'ECH LEFT';} forEach (curatorSelected select 1);"; + statement = "{_x setWaypointFormation 'ECH LEFT';} forEach (curatorSelected select 2);"; }; class ech_right { displayName = "$STR_EchR"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_right_ca.paa"; - statement = "{_x setWaypointFormation 'ECH RIGHT';} forEach (curatorSelected select 1);"; + statement = "{_x setWaypointFormation 'ECH RIGHT';} forEach (curatorSelected select 2);"; }; class diamond { displayName = "$STR_Diamond"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\diamond_ca.paa"; - statement = "{_x setWaypointFormation 'DIAMOND';} forEach (curatorSelected select 1);"; + statement = "{_x setWaypointFormation 'DIAMOND';} forEach (curatorSelected select 2);"; }; }; }; From 0567d1c2a1f721d19cb0e9009230c4219669c072 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Wed, 18 Nov 2015 15:02:17 +0000 Subject: [PATCH 175/180] Fix spectator unit list key press handling By setting maxHistroyDelay really high, the unit list shouldn't be messed with via key press very often. --- addons/spectator/UI/interface.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index 409df7ef71..a3ad215ea2 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -190,6 +190,7 @@ class GVAR(interface) { 1 }; multiselectEnabled = 0; + maxHistoryDelay = 10e10; onTreeDblClick = QUOTE([ARR_2('onTreeDblClick',_this)] call FUNC(handleInterface)); }; class unitFrame: RscFrame { From f8e293d04d17aeb40eba3b57627fe91a7d62834f Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Wed, 18 Nov 2015 15:18:21 +0000 Subject: [PATCH 176/180] Localise spectator hotkeys in help window --- .../functions/fnc_handleInterface.sqf | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index def736675e..8f29b20296 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -45,36 +45,36 @@ switch (toLower _mode) do { }; } forEach [ [localize LSTRING(uiControls),""], - [localize LSTRING(uiToggleUnits),"1"], - [localize LSTRING(uiToggleHelp),"2"], - [localize LSTRING(uiToggleTools),"3"], - [localize LSTRING(uiToggleCompass),"4"], - [localize LSTRING(uiToggleIcons),"5"], - [localize LSTRING(uiToggleMap),"M"], - [localize LSTRING(uiToggleInterface),"Backspace"], + [localize LSTRING(uiToggleUnits),keyName 2], + [localize LSTRING(uiToggleHelp),keyName 3], + [localize LSTRING(uiToggleTools),keyName 4], + [localize LSTRING(uiToggleCompass),keyName 5], + [localize LSTRING(uiToggleIcons),keyName 6], + [localize LSTRING(uiToggleMap),keyName 50], + [localize LSTRING(uiToggleInterface),keyName 14], [localize LSTRING(freeCamControls),""], - [localize LSTRING(freeCamForward),"W"], - [localize LSTRING(freeCamBackward),"S"], - [localize LSTRING(freeCamLeft),"A"], - [localize LSTRING(freeCamRight),"D"], - [localize LSTRING(freeCamUp),"Q"], - [localize LSTRING(freeCamDown),"Z"], + [localize LSTRING(freeCamForward),keyName 17], + [localize LSTRING(freeCamBackward),keyName 31], + [localize LSTRING(freeCamLeft),keyName 30], + [localize LSTRING(freeCamRight),keyName 32], + [localize LSTRING(freeCamUp),keyName 16], + [localize LSTRING(freeCamDown),keyName 44], [localize LSTRING(freeCamPan),"RMB (Hold)"], [localize LSTRING(freeCamDolly),"LMB (Hold)"], [localize LSTRING(freeCamBoost),"Shift (Hold)"], [localize LSTRING(attributeControls),""], - [localize LSTRING(nextCam),"Up Arrow"], - [localize LSTRING(prevCam),"Down Arrow"], - [localize LSTRING(nextUnit),"Right Arrow"], - [localize LSTRING(prevUnit),"Left Arrow"], - [localize LSTRING(nextVis),"N"], - [localize LSTRING(prevVis),"Ctrl + N"], + [localize LSTRING(nextCam),keyName 200], + [localize LSTRING(prevCam),keyName 208], + [localize LSTRING(nextUnit),keyName 205], + [localize LSTRING(prevUnit),keyName 203], + [localize LSTRING(nextVis),keyName 49], + [localize LSTRING(prevVis),format["%1 + %2",keyName 29,keyname 49]], [localize LSTRING(adjZoom),"Scrollwheel"], - [localize LSTRING(adjSpeed),"Ctrl + Scrollwheel"], - [localize LSTRING(incZoom),"Num-/Num+"], - [localize LSTRING(incSpeed),"Ctrl + Num-/Num+"], - [localize LSTRING(reZoom),"Alt + Num-"], - [localize LSTRING(reSpeed),"Alt + Num+"] + [localize LSTRING(adjSpeed),format["%1 + Scrollwheel",keyName 29]], + [localize LSTRING(incZoom),format["%1/%2",keyName 74,keyName 78]], + [localize LSTRING(incSpeed),format["%1 + %2/%3",keyName 29,keyName 74,keyName 78]], + [localize LSTRING(reZoom),format["%1 + %2",keyName 56,keyName 74]], + [localize LSTRING(reSpeed),format["%1 + %2",keyName 56,keyName 78]] ]; // Handle support for BI's respawn counter @@ -240,7 +240,7 @@ switch (toLower _mode) do { [_display,nil,nil,nil,true] call FUNC(toggleInterface); }; case 57: { // Spacebar - // Freecam attachment here, if in external then set cam pos and attach + // Switch between unit and freecam here }; case 74: { // Num - if (_alt) exitWith { [nil,nil,nil,nil,nil,nil, 1.25] call FUNC(setCameraAttributes); }; @@ -251,7 +251,7 @@ switch (toLower _mode) do { }; }; case 78: { // Num + - if (_alt) exitWith { [nil,nil,nil,nil,nil,nil,nil, 2.5] call FUNC(setCameraAttributes); }; + if (_alt) exitWith { [nil,nil,nil,nil,nil,nil,nil, 1.5] call FUNC(setCameraAttributes); }; if (_ctrl) then { [nil,nil,nil,nil,nil,nil,nil, GVAR(camSpeed) + 0.05] call FUNC(setCameraAttributes); } else { From cf9235c9261bd4111ef3385731579a3b0f21d46b Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 19 Nov 2015 00:28:28 -0600 Subject: [PATCH 177/180] make.py - update for new mikros tools --- tools/make.py | 48 ++---------------------------------------------- 1 file changed, 2 insertions(+), 46 deletions(-) diff --git a/tools/make.py b/tools/make.py index adaecf269e..e4b99116a6 100644 --- a/tools/make.py +++ b/tools/make.py @@ -489,7 +489,7 @@ def check_for_obsolete_pbos(addonspath, file): def backup_config(module): - #PABST: Convert config (run the macro'd config.cpp through CfgConvert twice to produce a de-macro'd cpp that pboProject can read without fucking up: + #backup original $PBOPREFIX$ global work_drive global prefix @@ -503,52 +503,11 @@ def backup_config(module): except: print_error("Error creating backup of $PBOPREFIX$ for module {}.".format(module)) - try: - shutil.copyfile(os.path.join(work_drive, prefix, module, "config.cpp"), os.path.join(work_drive, prefix, module, "config.backup")) - os.chdir(work_drive) - except: - print_error("Error creating backup of config.cpp for module {}.".format(module)) - return True -def convert_config(module): - try: - global work_drive - global prefix - global arma3tools_path - - cmd = [os.path.join(arma3tools_path, "CfgConvert", "CfgConvert.exe"), "-bin", "-dst", os.path.join(work_drive, prefix, module, "config.bin"), os.path.join(work_drive, prefix, module, "config.cpp")] - ret = subprocess.call(cmd) - if ret != 0: - print_error("CfgConvert -bin return code == {}. Usually means there is a syntax error within the config.cpp file.".format(str(ret))) - os.remove(os.path.join(work_drive, prefix, module, "config.cpp")) - shutil.copyfile(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp")) - - cmd = [os.path.join(arma3tools_path, "CfgConvert", "CfgConvert.exe"), "-txt", "-dst", os.path.join(work_drive, prefix, module, "config.cpp"), os.path.join(work_drive, prefix, module, "config.bin")] - ret = subprocess.call(cmd) - if ret != 0: - print_error("CfgConvert -txt return code == {}. Usually means there is a syntax error within the config.cpp file.".format(str(ret))) - os.remove(os.path.join(work_drive, prefix, module, "config.cpp")) - shutil.copyfile(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp")) - except Exception as e: - print_error("Exception from convert_config=>CfgConvert: {}".format(e)) - return False - - return True - - def addon_restore(modulePath): - #PABST: cleanup config BS (you could comment this out to see the "de-macroed" cpp - #print_green("\Pabst! (restoring): {}".format(os.path.join(modulePath, "config.cpp"))) + #restore original $PBOPREFIX$ try: - if os.path.isfile(os.path.join(modulePath, "config.cpp")): - os.remove(os.path.join(modulePath, "config.cpp")) - if os.path.isfile(os.path.join(modulePath, "config.backup")): - os.rename(os.path.join(modulePath, "config.backup"), os.path.join(modulePath, "config.cpp")) - if os.path.isfile(os.path.join(modulePath, "config.bin")): - os.remove(os.path.join(modulePath, "config.bin")) - if os.path.isfile(os.path.join(modulePath, "texHeaders.bin")): - os.remove(os.path.join(modulePath, "texHeaders.bin")) if os.path.isfile(os.path.join(modulePath, "$PBOPREFIX$.backup")): if os.path.isfile(os.path.join(modulePath, "$PBOPREFIX$")): os.remove(os.path.join(modulePath, "$PBOPREFIX$")) @@ -1216,9 +1175,6 @@ See the make.cfg file for additional build options. nobinFilePath = os.path.join(work_drive, prefix, module, "$NOBIN$") backup_config(module) - if (not os.path.isfile(nobinFilePath)): - convert_config(module) - version_stamp_pboprefix(module,commit_id) if os.path.isfile(nobinFilePath): From 7b526a99a32add4550d1096bbb3c18adb319b87d Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 20 Nov 2015 14:53:16 -0600 Subject: [PATCH 178/180] Cleanup --- addons/interact_menu/ACE_Settings.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/interact_menu/ACE_Settings.hpp b/addons/interact_menu/ACE_Settings.hpp index 2d516ee6e3..075408499b 100644 --- a/addons/interact_menu/ACE_Settings.hpp +++ b/addons/interact_menu/ACE_Settings.hpp @@ -103,6 +103,6 @@ class ACE_Settings { category = CSTRING(Category_InteractionMenu); displayName = CSTRING(menuAnimationSpeed); description = CSTRING(menuAnimationSpeed_Description); - values[] = {"$str_speed_normal", "2x", "3x (gotta go fast)"}; + values[] = {"$str_speed_normal", "2x", "3x"}; }; }; From 979ff8b47926fdff6900b450f371c5b2f9acdb7f Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 20 Nov 2015 16:13:20 -0600 Subject: [PATCH 179/180] Local -> private --- addons/overpressure/functions/fnc_getDistance.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/overpressure/functions/fnc_getDistance.sqf b/addons/overpressure/functions/fnc_getDistance.sqf index a583700127..cabdd267fa 100644 --- a/addons/overpressure/functions/fnc_getDistance.sqf +++ b/addons/overpressure/functions/fnc_getDistance.sqf @@ -21,11 +21,11 @@ params ["_posASL", "_direction", "_maxDistance", "_shooter"]; TRACE_3("params",_posASL,_direction,_maxDistance); -local _intersections = lineIntersectsSurfaces [_posASL, _posASL vectorAdd (_direction vectorMultiply _maxDistance), _shooter, objNull, true, 99]; +private _intersections = lineIntersectsSurfaces [_posASL, _posASL vectorAdd (_direction vectorMultiply _maxDistance), _shooter, objNull, true, 99]; TRACE_1("lineIntersectsSurfaces",_intersections); -local _distance = 999; +private _distance = 999; { _x params ["_intersectPosASL", "_surfaceNormal", "_intersectObject"]; From 67345b01786527e24155bdf451bba0197df373fd Mon Sep 17 00:00:00 2001 From: Glowbal Date: Fri, 20 Nov 2015 23:28:52 +0100 Subject: [PATCH 180/180] Fix incorrect variable _items was the old variable name. --- addons/cargo/functions/fnc_addCargoItem.sqf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/cargo/functions/fnc_addCargoItem.sqf b/addons/cargo/functions/fnc_addCargoItem.sqf index a790087b7f..a44cd0ebcf 100644 --- a/addons/cargo/functions/fnc_addCargoItem.sqf +++ b/addons/cargo/functions/fnc_addCargoItem.sqf @@ -18,12 +18,11 @@ */ #include "script_component.hpp" -private ["_position", "_item", "_i"]; params ["_itemClass", "_vehicle", ["_amount", 1], ["_showHint", false, [false]] ]; TRACE_3("params",_itemClass,_vehicle,_amount); for "_i" from 1 to _amount do { - [_item, _vehicle] call FUNC(loadItem); + [_itemClass, _vehicle] call FUNC(loadItem); }; // Invoke listenable event