Fixed broken ropeDetach

This commit is contained in:
BaerMitUmlaut 2016-03-18 00:16:31 +01:00
parent b25ffdb54f
commit fc06782256
2 changed files with 5 additions and 7 deletions

View File

@ -7,8 +7,3 @@
[QGVAR(startFastRope), {
[FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler;
}] call EFUNC(common,addEventHandler);
[QGVAR(ropeDetach), {
params ["_object", "_rope"];
_object ropeDetach _rope;
}] call EFUNC(common,addEventHandler);

View File

@ -32,8 +32,11 @@ _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
};
};
[QGVAR(ropeDetach), [_hook, _ropeTop]] call EFUNC(common,serverEvent);
[{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy, _hook], 60] call EFUNC(common,waitAndExecute);
//Destroy rope
//Only delete the hook first so the rope falls down.
//Note: ropeDetach was used here before, but the command seems a bit broken.
deleteVehicle _hook;
[{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy], 60] call EFUNC(common,waitAndExecute);
} count _deployedRopes;
_vehicle setVariable [QGVAR(deployedRopes), [], true];