Update EPOCH_load_vehicles.sqf

This commit is contained in:
He-Man 2016-08-31 17:33:37 +02:00 committed by GitHub
parent 834f0ff346
commit e08dff4f6b

View File

@ -24,6 +24,8 @@ _vehicleDamages = [];
_serverSettingsConfig = configFile >> "CfgEpochServer";
_simulationHandler = [_serverSettingsConfig, "simulationHandlerOld", false] call EPOCH_fnc_returnConfigEntry;
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
for "_i" from 1 to _maxVehicleLimit do {
_vehicleSlotIndex = EPOCH_VehicleSlots pushBack str(_i);
@ -109,6 +111,18 @@ for "_i" from 1 to _maxVehicleLimit do {
clearMagazineCargoGlobal _vehicle;
clearBackpackCargoGlobal _vehicle;
clearItemCargoGlobal _vehicle;
if !(_removeweapons isequalto []) then {
{
_vehObj removeWeaponGlobal _x;
} foreach _removeweapons;
};
if !(_removemagazinesturret isequalto []) then {
{
_vehObj removeMagazinesTurret _x;
} foreach _removemagazinesturret;
};
{
_objType = _forEachIndex;
_objTypes = _x;