From a3e73bbbf9a8358aeda9ae8abc2c7eb0c1723ef8 Mon Sep 17 00:00:00 2001 From: Joecuronium <83242905+Joecuronium@users.noreply.github.com> Date: Mon, 13 Jun 2022 18:24:58 +0200 Subject: [PATCH 1/2] Resupply crates now have space to drop stuff Gearscript automatically adds 25% more load capacity over the assigned Gear --- components/gearScript/fn_applyLoadout.sqf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/gearScript/fn_applyLoadout.sqf b/components/gearScript/fn_applyLoadout.sqf index 32e562e8..dd5afc97 100644 --- a/components/gearScript/fn_applyLoadout.sqf +++ b/components/gearScript/fn_applyLoadout.sqf @@ -35,6 +35,10 @@ if (_typeofUnit find "crate_" == 0) exitWith } forEach _crateArray; + private _oldLoad = loadAbs _unit; + + _unit setMaxLoad (_oldLoad * 1.25); + } else { From bfb0ef3003374d515d04ca7346674eabaf0db03d Mon Sep 17 00:00:00 2001 From: Joecuronium <83242905+Joecuronium@users.noreply.github.com> Date: Mon, 13 Jun 2022 19:25:23 +0200 Subject: [PATCH 2/2] Cleanup Added Comments Added fix for edgecase Zeusmodule (goes together with #110) --- components/gearScript/fn_applyLoadout.sqf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/gearScript/fn_applyLoadout.sqf b/components/gearScript/fn_applyLoadout.sqf index dd5afc97..aeefa9b6 100644 --- a/components/gearScript/fn_applyLoadout.sqf +++ b/components/gearScript/fn_applyLoadout.sqf @@ -35,9 +35,12 @@ if (_typeofUnit find "crate_" == 0) exitWith } forEach _crateArray; + //Add Space to drop stuff into the box private _oldLoad = loadAbs _unit; - _unit setMaxLoad (_oldLoad * 1.25); + private _newLoad = _oldLoad * 1.25; + + [_unit, _newLoad] remoteExecCall ["setMaxLoad", 2]; } else