From d1b11ac4a36b86e253c6f88b266dea6c58fcd8c2 Mon Sep 17 00:00:00 2001 From: He-Man Date: Thu, 28 Feb 2019 10:19:27 +0100 Subject: [PATCH] weapon compatible --- Tools/Export_EdenToCode.sqf | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Tools/Export_EdenToCode.sqf b/Tools/Export_EdenToCode.sqf index 82f79c0..704d554 100644 --- a/Tools/Export_EdenToCode.sqf +++ b/Tools/Export_EdenToCode.sqf @@ -17,29 +17,39 @@ if (!isserver) exitwith {}; { private ['_object']; _x params ['_type','_pos','_dir','_vectordirandup']; - _simulate = false; + _simple = true; _allowdamage = true; _object = objnull; if (_type iskindof 'house') then { if (_type in ['Land_Pier_F']) exitwith { - _simulate = false; + _simple = true; }; - _simulate = true; + _simple = false; } else { { if !(((tolower _type) find (tolower _x)) isequalto -1) exitwith { - _simulate = true; + _simple = false; _allowdamage = false; }; - } foreach ['lamp','light','fuel','fire','gate','helipad']; + } foreach ['lamp','light','fuel','fire','gate','helipad','weapon']; }; - if (_simulate) then { + if !(_simple) then { + _simulate = true; + { + if !(((tolower _type) find (tolower _x)) isequalto -1) exitwith { + _simulate = false; + _allowdamage = false; + }; + } foreach ['weapon']; _object = createVehicle [_type,[0,0,0],[],0,'CAN_COLLIDE']; if (!_allowdamage) then { _object allowdamage false; }; + if (!_simulate) then { + _object enablesimulationglobal false; + }; } else { _object = createsimpleobject [_type,[0,0,0]];