From a5523bc0c7f21db3197e2f5b6ccbc9882f321595 Mon Sep 17 00:00:00 2001 From: ulteq Date: Wed, 10 Jan 2018 19:44:53 +0100 Subject: [PATCH 1/4] ATagMX - Allow one decimal place for the bullet mass (in grams) (#6041) Closes: #6040 --- addons/atragmx/functions/fnc_update_gun.sqf | 2 +- addons/atragmx/functions/fnc_update_gun_ammo_data.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/atragmx/functions/fnc_update_gun.sqf b/addons/atragmx/functions/fnc_update_gun.sqf index ff7de54a1c..5e081b47ee 100644 --- a/addons/atragmx/functions/fnc_update_gun.sqf +++ b/addons/atragmx/functions/fnc_update_gun.sqf @@ -24,7 +24,7 @@ if (GVAR(currentUnit) != 2) then { if (GVAR(currentUnit) != 2) then { ctrlSetText [110, Str(Round((GVAR(workingMemory) select 12) * 15.4323584))]; } else { - ctrlSetText [110, Str(Round(GVAR(workingMemory) select 12))]; + ctrlSetText [110, Str(Round((GVAR(workingMemory) select 12) * 10) / 10)]; }; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { ctrlSetText [120, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)]; diff --git a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf index 7d29252b28..4beaf53e0d 100644 --- a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf @@ -25,7 +25,7 @@ if (GVAR(currentUnit) != 2) then { if (GVAR(currentUnit) != 2) then { ctrlSetText [120010, Str(Round((GVAR(workingMemory) select 12) * 15.4323584))]; } else { - ctrlSetText [120010, Str(Round(GVAR(workingMemory) select 12))]; + ctrlSetText [120010, Str(Round((GVAR(workingMemory) select 12) * 10) / 10)]; }; if (GVAR(currentUnit) != 2) then { ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 / 2.54 * 1000) / 1000)]; From fc037d1bc3e0f054f195e4cac751a699784d57e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Thu, 11 Jan 2018 19:34:51 +0100 Subject: [PATCH 2/4] Improve function header documentation guidelines (#6042) --- docs/wiki/development/coding-guidelines.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/wiki/development/coding-guidelines.md b/docs/wiki/development/coding-guidelines.md index 53363ba312..3e83c631cf 100644 --- a/docs/wiki/development/coding-guidelines.md +++ b/docs/wiki/development/coding-guidelines.md @@ -178,6 +178,10 @@ Every function should have a header of the following format as the start of thei * Arguments: * 0: The first argument * 1: The second argument + * 2: Multiple input types + * 3: Optional input (default: true) + * 4: Optional input with multiple types (default: {true}) + * 5: Not mandatory input (default: nil) * * Return Value: * The return value From b7606800a1ea9ea72401a9f39b10c9a142cad530 Mon Sep 17 00:00:00 2001 From: Josuan Albin Date: Mon, 15 Jan 2018 18:21:38 +0100 Subject: [PATCH 3/4] Match case for magazines in fillRightPanel (ACE Arsenal) (#6044) * Match case for magazines in fillRightPanel Apparently you can have different case between the entry in the weapon magazines array and its actual configname... * Add possible fix for the mission end bug * Add ded's proposed fix, remove closeOnMissionEnd CloseOnMissionEnd is bugged in 3DEN and force close the display after it's opened --- addons/arsenal/functions/fnc_fillRightPanel.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/arsenal/functions/fnc_fillRightPanel.sqf b/addons/arsenal/functions/fnc_fillRightPanel.sqf index 99194b065e..c62ea3cab8 100644 --- a/addons/arsenal/functions/fnc_fillRightPanel.sqf +++ b/addons/arsenal/functions/fnc_fillRightPanel.sqf @@ -86,7 +86,7 @@ private _compatibleMagazines = [[[], []], [[], []], [[], []]]; private _magArray = [_magazineGroups, _x] call CBA_fnc_hashGet; {((_compatibleMagazines select _index) select _subIndex) pushBackUnique _x} forEach _magArray; } else { - ((_compatibleMagazines select _index) select _subIndex) pushBackUnique _x + ((_compatibleMagazines select _index) select _subIndex) pushBackUnique (configName (configFile >> "CfgMagazines" >> _x)) } } foreach ([getArray (_weaponConfig >> _x >> "magazines"), getArray (_weaponConfig >> "magazines")] select (_x == "this")); } foreach getArray (_weaponConfig >> "muzzles"); From 70ca4d01a7e4ae0f60d840ab82a94fe7610e168c Mon Sep 17 00:00:00 2001 From: Dystopian Date: Mon, 15 Jan 2018 21:02:06 +0300 Subject: [PATCH 4/4] Fix house-type object carrying in building (#6049) --- addons/common/functions/fnc_fixPosition.sqf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/addons/common/functions/fnc_fixPosition.sqf b/addons/common/functions/fnc_fixPosition.sqf index 3eaf7665cd..700d47dc19 100644 --- a/addons/common/functions/fnc_fixPosition.sqf +++ b/addons/common/functions/fnc_fixPosition.sqf @@ -22,11 +22,14 @@ if (!local _this) exitWith {}; private _hasGravity = simulationEnabled _this && {getText (configFile >> "CfgVehicles" >> typeOf _this >> "simulation") != "house"}; if (!_hasGravity) then { - private _posAbove = (getPosATL _this) select 2; - TRACE_2("house",_this,_posAbove); - if (_posAbove > 0.1) then { - private _newPosATL = (getPosATL _this) vectorDiff [0, 0, _posAbove]; - _this setPosATL _newPosATL; + private _positionASL = getPosASL _this; + // find height of top surface under object + private _surfaces = lineIntersectsSurfaces [_positionASL, ATLToASL [_positionASL select 0, _positionASL select 1, -1], _this]; + if (_surfaces isEqualTo []) exitWith {}; + private _surfaceHeight = _surfaces select 0 select 0 select 2; + TRACE_2("house",_this,_surfaceHeight); + if (_positionASL select 2 > _surfaceHeight + 0.1) then { + _this setPosASL [_positionASL select 0, _positionASL select 1, _surfaceHeight]; }; };