From 203975def730731d68636392e262366b305d6417 Mon Sep 17 00:00:00 2001 From: icomrade Date: Sun, 11 Sep 2016 16:38:26 -0400 Subject: [PATCH] Rearm driver weapons (pook rearming) --- CHANGE LOG 1.0.6.txt | 1 + SQF/dayz_code/compile/fn_damageActions.sqf | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGE LOG 1.0.6.txt b/CHANGE LOG 1.0.6.txt index 78abdf6e9..cbbd76870 100644 --- a/CHANGE LOG 1.0.6.txt +++ b/CHANGE LOG 1.0.6.txt @@ -48,6 +48,7 @@ [NEW] Players can now manually push stuck planes backwards to free them. @ebaydayz [NEW] You may set the buying or selling price of any item to -1 to disallow the respective trading action, only with config traders and advanced trading @icomrade [NEW] Salvage can now be disabled on locked vehicles via DZE_salvageLocked variable. #1757 @oiad +[NEW] You may now rearm pooks and other helicoper/vehicle pilot/driver weapons @icomrade [CHANGED] Combattimeout now uses diag_tickTime instead of time. [CHANGED] AmmoBoxSmall_556/762 is replaced with DZ_AmmoBoxUS/RU/EU/CZ and MedBox0 is replaced with DZ_MedBox (new model) diff --git a/SQF/dayz_code/compile/fn_damageActions.sqf b/SQF/dayz_code/compile/fn_damageActions.sqf index 9a3009903..ad6557f06 100644 --- a/SQF/dayz_code/compile/fn_damageActions.sqf +++ b/SQF/dayz_code/compile/fn_damageActions.sqf @@ -55,8 +55,11 @@ if (_inVehicle) then { r_action2 = true; }; }; - if (count _assignedRole > 1) then { - _turret = _assignedRole select 1; + if ((count _assignedRole) > 1 || ((_assignedRole select 0) == "driver")) then { + _turret = [-1]; + if ((count _assignedRole) > 1) then { + _turret = _assignedRole select 1; + }; _weapons = _vehicle weaponsTurret _turret; { _weaponName = getText (configFile >> "cfgWeapons" >> _x >> "displayName");