From 78e090930909d2a635f4cb468d97e0ae29e3530f Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 12 Sep 2016 20:46:35 -0500 Subject: [PATCH 1/2] End path drawing when passing through Geom/Fire --- addons/advanced_throwing/functions/fnc_drawArc.sqf | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/addons/advanced_throwing/functions/fnc_drawArc.sqf b/addons/advanced_throwing/functions/fnc_drawArc.sqf index 53398f7b2f6..0935b75ab5f 100644 --- a/addons/advanced_throwing/functions/fnc_drawArc.sqf +++ b/addons/advanced_throwing/functions/fnc_drawArc.sqf @@ -47,11 +47,15 @@ for "_i" from 0.05 to 1.45 step 0.1 do { if (_newTrajASL distance (getPosASLVisual ACE_player) <= 20) then { if ((ASLToATL _newTrajASL) select 2 <= 0) then { - _cross = 1 + _cross = 1; // 1: Distance Limit (Green) } else { // Even vanilla throwables go through glass, only "GEOM" LOD will stop it but that will also stop it when there is glass in a window - if (lineIntersects [_prevTrajASL, _newTrajASL]) then { - _cross = 2; + if (lineIntersects [_prevTrajASL, _newTrajASL]) then { // Checks the "VIEW" LOD + _cross = 2; // 2: View LOD Block (Red) + } else { + if (!((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isEqualTo [])) then { + _cross = 3; // 3: GEOM/FIRE LOD Block (Yellow) - pass a3 bulding glass, but blocked on some CUP glass + }; }; }; @@ -60,7 +64,7 @@ for "_i" from 0.05 to 1.45 step 0.1 do { private _movePerc = linearConversion [3, 0, vectorMagnitude (velocity ACE_player), 0, 1, true]; _alpha = _alpha * _movePerc; - private _col = [ [1, 1, 1, _alpha], [0, 1, 0, _alpha], [1, 0, 0, _alpha] ] select _cross; + private _col = [ [1, 1, 1, _alpha], [0, 1, 0, _alpha], [1, 0, 0, _alpha], [1, 1, 0, _alpha] ] select _cross; if (_cross != 2 && {lineIntersects [eyePos ACE_player, _newTrajASL]}) then { _col set [3, 0.1] From 958b638447a8f123c3902d52803b037d0b6756e2 Mon Sep 17 00:00:00 2001 From: jonpas Date: Wed, 14 Sep 2016 00:51:59 +0200 Subject: [PATCH 2/2] Add Advanced Throwing colored circles documentation --- docs/wiki/feature/advanced-throwing.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/wiki/feature/advanced-throwing.md b/docs/wiki/feature/advanced-throwing.md index 7c8dbc06b96..23464be9fa5 100644 --- a/docs/wiki/feature/advanced-throwing.md +++ b/docs/wiki/feature/advanced-throwing.md @@ -27,11 +27,24 @@ After cooking a grenade any mode can be used to throw it further or it can simpl Grenade will be thrown where you are currently looking at, free-look (including TrackIR) is fully supported. However, the further to the side and back you are looking, the lower the throw power will be. -### 1.2 Rethrowing +### 1.2 Indicators + +When enabled, an arc of colored filled circles will indicate the path grenade will fly through. + +Color | Meaning +----- | -------- +White | Flight path +Green | Collision with ground surface +Red | Collision with object +Yellow | Possible collision + +Possible collisions are collisions that might happen, but there is also a chance that the grenade will not collide with that object. It is impossible to predict in many cases due to different object configurations. + +### 1.3 Rethrowing Advanced Throwing allows you to pick up grenades that have already been thrown. You have to be very close to it to effectively pick it up. Useful for rethrowing smoke grenades or repositioning chemlights. Frag grenades can also be thrown back, for example out of the house, however doing so is extremely risky. -### 1.3 Settings +### 1.4 Settings Various settings can be set according to your likeness. Next to global toggle to disable Advanced Throwing there are settings to hide the throw arc indicating approximate throw distance and the arc it will fly through and hide mouse controls. Additionally for server administrators and mission makers, picking up grenades can be entirely disabled, as well as a setting to enable picking up attached items such as chemlights attached to vehicles or other player's shoulder.