mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix fastropes being blocked after rope breaking (#6239)
* add broken state * add broke state * add broken state * add broken state * add broken state
This commit is contained in:
parent
b7942fdb83
commit
468da8b79b
@ -22,5 +22,5 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
||||
|
||||
((driver _vehicle != _unit) &&
|
||||
{!(_deployedRopes isEqualTo [])} &&
|
||||
{{!(_x select 5)} count (_deployedRopes) > 0} &&
|
||||
{{!(_x select 5) && !(_x select 6)} count (_deployedRopes) > 0} &&
|
||||
{getPos _vehicle select 2 > 2})
|
||||
|
@ -45,8 +45,8 @@ private _hookAttachment = _vehicle getVariable [QGVAR(FRIES), _vehicle];
|
||||
_ropeTop addEventHandler ["RopeBreak", {[_this, "top"] call FUNC(onRopeBreak)}];
|
||||
_ropeBottom addEventHandler ["RopeBreak", {[_this, "bottom"] call FUNC(onRopeBreak)}];
|
||||
|
||||
//deployedRopes format: attachment point, top part of the rope, bottom part of the rope, attachTo helper object, occupied
|
||||
_deployedRopes pushBack [_ropeOrigin, _ropeTop, _ropeBottom, _dummy, _hook, false];
|
||||
//deployedRopes format: attachment point, top part of the rope, bottom part of the rope, attachTo helper object, occupied, broken
|
||||
_deployedRopes pushBack [_ropeOrigin, _ropeTop, _ropeBottom, _dummy, _hook, false, false];
|
||||
|
||||
false
|
||||
} count _ropeOrigins;
|
||||
|
@ -23,7 +23,7 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
||||
private _usableRope = _deployedRopes select 0;
|
||||
private _usableRopeIndex = 0;
|
||||
{
|
||||
if !(_x select 5) exitWith {
|
||||
if (!(_x select 5) && !(_x select 6)) exitWith {
|
||||
_usableRope = _x;
|
||||
_usableRopeIndex = _forEachIndex;
|
||||
};
|
||||
|
@ -85,7 +85,7 @@ if (
|
||||
|
||||
//Update deployedRopes array
|
||||
private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
||||
_deployedRopes set [_ropeIndex, [_attachmentPoint, _ropeTop, _ropeBottom, _dummy, _hook, false]];
|
||||
_deployedRopes set [_ropeIndex, [_attachmentPoint, _ropeTop, _ropeBottom, _dummy, _hook, false, false]];
|
||||
_vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
|
||||
|
||||
[_pfhHandle] call CBA_fnc_removePerFrameHandler;
|
||||
|
@ -36,7 +36,7 @@ private _brokenRope = [];
|
||||
_brokenRope = _x;
|
||||
};
|
||||
} forEach _deployedRopes;
|
||||
_brokenRope set [5, true];
|
||||
_brokenRope set [6, true];
|
||||
_vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
|
||||
|
||||
private _unit = {
|
||||
|
Loading…
Reference in New Issue
Block a user