From 4802ffeebf2f725de4c9ee58896226572ca7c562 Mon Sep 17 00:00:00 2001 From: ulteq Date: Sun, 31 May 2015 18:34:48 +0200 Subject: [PATCH] Fixes random teleport when dragging/carrying inside of buildings. --- addons/dragging/functions/fnc_startCarry.sqf | 2 +- addons/dragging/functions/fnc_startDrag.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index f5d543c959..ad0af86359 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -41,7 +41,7 @@ if (_target isKindOf "CAManBase") then { // move a bit closer and adjust direction when trying to pick up a person _target setDir (getDir _unit + 180); - _target setPos (getPos _unit vectorAdd vectorDir _unit); + _target setPosASL (getPosASL _unit vectorAdd (vectorDir _unit)); [_unit, "AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon", 2, true] call EFUNC(common,doAnimation); [_target, "AinjPfalMstpSnonWrflDnon_carried_Up", 2, true] call EFUNC(common,doAnimation); diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index 6ce3b73a5f..9d9570be14 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -43,7 +43,7 @@ _unit selectWeapon primaryWeapon _unit; // move a bit closer and adjust direction when trying to pick up a person if (_target isKindOf "CAManBase") then { _target setDir (getDir _unit + 180); - _target setPos (getPos _unit vectorAdd (vectorDir _unit vectorMultiply 1.5)); + _target setPosASL (getPosASL _unit vectorAdd (vectorDir _unit vectorMultiply 1.5)); [_target, "AinjPpneMrunSnonWnonDb_grab", 2, true] call EFUNC(common,doAnimation); };