mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 11:42:38 +03:00
Fix fn_fillturrets for non weapon vehicles
Thx to iben
This commit is contained in:
@@ -30,7 +30,7 @@ local _findRecurse = {
|
||||
|
||||
{
|
||||
local _mag = _x;
|
||||
if !(["horn",_mag] call fnc_inString) then {
|
||||
if !(["Horn",_mag] call fnc_inString) then {
|
||||
if (DZE_clearVehicleFlares) then {
|
||||
_obj removeMagazinesTurret[_mag,_turret];
|
||||
} else {
|
||||
|
||||
@@ -27,21 +27,31 @@ local _findRecurse = {
|
||||
|
||||
{
|
||||
local _type = _x select 0;
|
||||
local _turret = _x select 1;
|
||||
local _mags = getArray(configFile >> "CfgWeapons" >> _type >> "magazines");
|
||||
local _mag = _mags select 0;
|
||||
|
||||
if (!isNil "_mag" && {!(["horn",_mag] call fnc_inString)})then {
|
||||
for "_i" from 1 to _countMags do {
|
||||
_obj addMagazineTurret[_mag,_turret];
|
||||
};
|
||||
};
|
||||
|
||||
if (!(["Horn",_type] call fnc_inString) && (_type != "")) then {
|
||||
local _turret = _x select 1;
|
||||
local _mags = getArray(configFile >> "CfgWeapons" >> _type >> "magazines");
|
||||
local _mag = _mags select 0;
|
||||
|
||||
if (!isNil "_mag")then {
|
||||
for "_i" from 1 to _countMags do {
|
||||
_obj addMagazineTurret[_mag,_turret];
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach _weaponArray;
|
||||
|
||||
{
|
||||
local _mags = getArray(configFile >> "CfgWeapons" >> _x >> "magazines");
|
||||
local _mag = _mags select 0;
|
||||
for "_i" from 1 to _countMags do {
|
||||
_obj addMagazine _mag;
|
||||
};
|
||||
local _weapon = _x;
|
||||
|
||||
if !(["Horn",_weapon] call fnc_inString) then {
|
||||
local _mags = getArray(configFile >> "CfgWeapons" >> _weapon >> "magazines");
|
||||
local _mag = _mags select 0;
|
||||
|
||||
if (!isNil "_mag")then {
|
||||
for "_i" from 1 to _countMags do {
|
||||
_obj addMagazine _mag;
|
||||
};
|
||||
};
|
||||
};
|
||||
} count (weapons _obj);
|
||||
Reference in New Issue
Block a user