mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
'Fix' race condition where rope is cut as someone mounts the rope (#5569)
* initial fix attempt * reset animation * Fix logic * Not cutting when roping
This commit is contained in:
parent
9c7b546e24
commit
7aae91be79
@ -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
|
||||
*/
|
||||
|
@ -19,4 +19,5 @@ params ["_vehicle"];
|
||||
|
||||
private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
||||
|
||||
!(_deployedRopes isEqualTo [])
|
||||
!(_deployedRopes isEqualTo []) &&
|
||||
{{(_x select 5)} count (_deployedRopes) == 0}
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user