From d9d79b5f51c74e9e95addb7668ced2a98571265d Mon Sep 17 00:00:00 2001 From: Vdauphin Date: Sat, 26 Nov 2016 00:39:33 +0100 Subject: [PATCH 1/2] FIX: can't unload on bridge --- .../core/fnc/log/obj_fall.sqf | 28 +++++++++---------- .../core/fnc/log/paradrop.sqf | 18 ++++++------ .../core/fnc/log/server_unload.sqf | 10 ++----- 3 files changed, 23 insertions(+), 33 deletions(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/obj_fall.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/obj_fall.sqf index f6ff2699f..4dc29936d 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/obj_fall.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/obj_fall.sqf @@ -1,17 +1,15 @@ -private ["_obj","_height","_fall","_xx","_yy"]; +private ["_obj","_fall","_pos"]; -_obj = _this select 0; -_xx = getPos _obj select 0; -_yy = getPos _obj select 1; -_height = (getPos _obj) select 2; -_fall = 0.09; -while {((getPos _obj) select 2) > 0.1} do -{ - _fall = (_fall * 1.1); - _obj setPos [_xx, _yy, _height]; - _height = _height - _fall; - //hint format ["%1 - %2", (getPos _obj) select 2,_height]; - sleep 0.01; -}; -_obj setPos [_xx, _yy, 0]; \ No newline at end of file +_obj = _this select 0; +_pos = getPos _obj; +_fall = createVehicle ["Land_PenBlack_F", [_pos select 0, _pos select 1, (_pos select 2) + 0.7], [], 0, "FLY"]; +_obj attachTo [_fall,[0,0,0]]; + +sleep 0.1; + +waitUntil {(Velocity _fall select 2) isEqualTo 0}; + +detach _obj; +_obj setPosASL getPosASL _fall; +deleteVehicle _fall; \ No newline at end of file diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/paradrop.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/paradrop.sqf index baf833d71..6551705ee 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/paradrop.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/paradrop.sqf @@ -28,19 +28,17 @@ _smoke attachto [_dropped,[0,0,0]]; _chem attachto [_dropped,[0,0,0]]; _dropped attachTo [_chute,[0,0,-0.6]]; -waitUntil {sleep 1; (_chute isEqualTo objNull)}; +sleep 1; -_pos = getPos _dropped; - -if !((_pos select 2) < 1) then { - _chute = createVehicle [_chute_type, [getPosATL _dropped select 0,getPosATL _dropped select 1,(getPosATL _dropped select 2) + 5], [], 0, "FLY"]; +if ((Velocity _dropped select 2) > -2) then { + detach _dropped; + deleteVehicle _chute; + _chute = createVehicle [_chute_type, [getPosATL _dropped select 0,getPosATL _dropped select 1,(getPosATL _dropped select 2) + 5], [], 0, "CAN_COLLIDE"]; {_chute disableCollisionWith _x;} foreach [_veh,_dropped]; _dropped attachTo [_chute,[0,0,0]]; - - waitUntil {sleep 1; (_chute isEqualTo objNull)}; - _pos = getPos _dropped; }; -_dropped setPos [_pos select 0,_pos select 1,0]; -detach _dropped; \ No newline at end of file +waitUntil {_pos = getPosASL _chute; sleep 1; (_chute isEqualTo objNull)}; +detach _dropped; +_dropped setPosASL _pos; \ No newline at end of file diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/server_unload.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/server_unload.sqf index d00088221..be56dd091 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/server_unload.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/server_unload.sqf @@ -40,16 +40,10 @@ switch (true) do { case ((_height < 20) && (_height >= 2)): { _obj setPos [getpos _obj select 0,getpos _obj select 1,(getpos _obj select 2) -1]; sleep 0.1; - if (_obj isKindOf "Strategic") then {_obj_fall = [_obj] spawn btc_fnc_log_obj_fall;}; + _obj_fall = [_obj] spawn btc_fnc_log_obj_fall; }; case (_height < 2): { - private ["_empty"]; - _empty = (getPos _veh) findEmptyPosition [0, (sizeOf typeOf _veh + sizeOf _obj_type)/2 +2, _obj_type]; - if (_empty isEqualTo []) then { - _obj_fall = [_obj] call btc_fnc_log_obj_fall; - } else { - _obj setPos _empty;//(_veh modelToWorld [0,-9,-0.2]);_obj setVelocity [0,0,0.1]; - }; + _obj_fall = [_obj] call btc_fnc_log_obj_fall; }; }; From f80b574774ad03471e91e6d0b4534913f91c681f Mon Sep 17 00:00:00 2001 From: Vdauphin Date: Mon, 12 Dec 2016 21:02:57 +0100 Subject: [PATCH 2/2] FIX: vehicle unload --- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/obj_fall.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/obj_fall.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/obj_fall.sqf index 4dc29936d..14b6f7817 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/obj_fall.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/log/obj_fall.sqf @@ -4,6 +4,7 @@ private ["_obj","_fall","_pos"]; _obj = _this select 0; _pos = getPos _obj; _fall = createVehicle ["Land_PenBlack_F", [_pos select 0, _pos select 1, (_pos select 2) + 0.7], [], 0, "FLY"]; +_fall setPosASL getPosASL _obj; _obj attachTo [_fall,[0,0,0]]; sleep 0.1;