Skip to content

Commit fd370cb

Browse files
Fix dropping into water
1 parent 45117ea commit fd370cb

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

addons/main/functions/fnc_canDrop.sqf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ private _surfaces = lineIntersectsSurfaces [_beg,_end,_unit,objNull,true,-1,"GEO
4646

4747
if (_surfaces isEqualTo []) exitWith {
4848
DEBUG_R(_beg,_end)
49-
[false,0,true]
49+
50+
// Drop into water
51+
if (_end # 2 <= 0) then {
52+
[true,-(_pos # 2) max -2.8,false]
53+
} else {
54+
[false,0,true]
55+
};
5056
};
5157

5258
DEBUG_B(_beg,_end)

addons/main/script_macros.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
#define DROP_PROCEDURE \
4747
_animPosASL = (_animPosASL vectorAdd [0,0,-2.1]) vectorAdd (_dir vectorMultiply 0.8); \
48-
_targetPosASL = (_targetPosASL vectorAdd [0,0,_depth]) vectorAdd (_dir vectorMultiply 1.3); \
48+
_targetPosASL = (_targetPosASL vectorAdd [0,0,_depth]) vectorAdd (_dir vectorMultiply 1.35); \
4949
_duty = -_depth * GVAR(dropDuty) * load _unit; \
5050
_actionAnim = "BABE_drop"
5151

0 commit comments

Comments
 (0)