mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 07:12:55 +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;
|
local _mag = _x;
|
||||||
if !(["horn",_mag] call fnc_inString) then {
|
if !(["Horn",_mag] call fnc_inString) then {
|
||||||
if (DZE_clearVehicleFlares) then {
|
if (DZE_clearVehicleFlares) then {
|
||||||
_obj removeMagazinesTurret[_mag,_turret];
|
_obj removeMagazinesTurret[_mag,_turret];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -27,21 +27,31 @@ local _findRecurse = {
|
|||||||
|
|
||||||
{
|
{
|
||||||
local _type = _x select 0;
|
local _type = _x select 0;
|
||||||
local _turret = _x select 1;
|
|
||||||
local _mags = getArray(configFile >> "CfgWeapons" >> _type >> "magazines");
|
if (!(["Horn",_type] call fnc_inString) && (_type != "")) then {
|
||||||
local _mag = _mags select 0;
|
local _turret = _x select 1;
|
||||||
|
local _mags = getArray(configFile >> "CfgWeapons" >> _type >> "magazines");
|
||||||
if (!isNil "_mag" && {!(["horn",_mag] call fnc_inString)})then {
|
local _mag = _mags select 0;
|
||||||
for "_i" from 1 to _countMags do {
|
|
||||||
_obj addMagazineTurret[_mag,_turret];
|
if (!isNil "_mag")then {
|
||||||
};
|
for "_i" from 1 to _countMags do {
|
||||||
};
|
_obj addMagazineTurret[_mag,_turret];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
} forEach _weaponArray;
|
} forEach _weaponArray;
|
||||||
|
|
||||||
{
|
{
|
||||||
local _mags = getArray(configFile >> "CfgWeapons" >> _x >> "magazines");
|
local _weapon = _x;
|
||||||
local _mag = _mags select 0;
|
|
||||||
for "_i" from 1 to _countMags do {
|
if !(["Horn",_weapon] call fnc_inString) then {
|
||||||
_obj addMagazine _mag;
|
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);
|
} count (weapons _obj);
|
||||||
Reference in New Issue
Block a user