From ffce6bac644ad33aeb60012403b0a86092382875 Mon Sep 17 00:00:00 2001 From: He-Man Date: Wed, 31 Aug 2016 17:36:08 +0200 Subject: [PATCH] Update EPOCH_spawn_vehicle.sqf --- .../compile/epoch_vehicle/EPOCH_spawn_vehicle.sqf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_spawn_vehicle.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_spawn_vehicle.sqf index 2957198c..8444be50 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_spawn_vehicle.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_spawn_vehicle.sqf @@ -15,6 +15,9 @@ private ["_maxDamage","_textures","_textureSelectionIndex","_selections","_colors","_color","_count","_vehLockHiveKey","_marker","_cfgEpochVehicles","_vehObj"]; params ["_vehClass","_position","_direction","_locked","_slot",["_lockOwner",""],["_can_collide","CAN_COLLIDE"],["_spawnLoot",false],["_spawnDamaged",true]]; if !(isClass (configFile >> "CfgVehicles" >> _vehClass)) exitWith {objNull}; +_serverSettingsConfig = configFile >> "CfgEpochServer"; +_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry; +_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry; _vehObj = createVehicle[_vehClass, _position, [], 0, _can_collide]; if !(isNull _vehObj) then{ _vehObj call EPOCH_server_setVToken; @@ -32,6 +35,17 @@ if !(isNull _vehObj) then{ clearBackpackCargoGlobal _vehObj; clearItemCargoGlobal _vehObj; + if !(_removeweapons isequalto []) then { + { + _vehObj removeWeaponGlobal _x; + } foreach _removeweapons; + }; + if !(_removemagazinesturret isequalto []) then { + { + _vehObj removeMagazinesTurret _x; + } foreach _removemagazinesturret; + }; + // Disable Termal Equipment _vehObj disableTIEquipment true;