Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Fix' race condition where rope is cut as someone mounts the rope #5569

Merged
merged 9 commits into from
Oct 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/fastroping/functions/fnc_canCloseRamp.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Able to close ramp <BOOL>
*
* Example:
* [_player, _vehicle] call ace_fastroping_fnc_canCloseRamp
* [_vehicle, _door, _turretPaths] call ace_fastroping_fnc_canCloseRamp
*
* Public: No
*/
Expand Down
3 changes: 2 additions & 1 deletion addons/fastroping/functions/fnc_canCutRopes.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ params ["_vehicle"];

private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];

!(_deployedRopes isEqualTo [])
!(_deployedRopes isEqualTo []) &&
{{(_x select 5)} count (_deployedRopes) == 0}
2 changes: 1 addition & 1 deletion addons/fastroping/functions/fnc_canFastRope.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Able to fast ropes <BOOL>
*
* Example:
* [_player, _vehicle] call ace_fastroping_fnc_canDeployRopes
* [_player, _vehicle] call ace_fastroping_fnc_canFastRope
*
* Public: No
*/
Expand Down
12 changes: 11 additions & 1 deletion addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@
#include "script_component.hpp"
params ["_arguments", "_pfhHandle"];
_arguments params ["_unit", "", "_rope", "", "_timeToPlayRopeSound"];
_rope params ["", "", "", "_dummy"];
_rope params ["", "", "", "_dummy", "_hook"];

//Wait until the unit is actually outside of the helicopter
if (vehicle _unit != _unit) exitWith {};

// dummy lost hook
if (isNull _hook) exitWith {
TRACE_1("Hook lost, dropping and exiting pfeh",_unit);

[_unit, "", 2] call EFUNC(common,doAnimation);
_unit setVectorUp [0, 0, 1];

[_pfhHandle] call CBA_fnc_removePerFrameHandler;
};

//Start fast roping
if (animationState _unit != "ACE_FastRoping") exitWith {
_unit disableCollisionWith _dummy;
Expand Down