2016-03-01 23:01:34 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
|
|
|
* Checks if the door can be closed.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Helicopter <OBJECT>
|
|
|
|
* 1: Door <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Door can be closed <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [_vehicle, "DoorLB"] call ace_compat_rhs_usf3_fnc_canCloseDoor
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2016-03-07 19:15:55 +00:00
|
|
|
#include "script_component.hpp"
|
2016-03-01 23:01:34 +00:00
|
|
|
params ["_vehicle", "_door"];
|
|
|
|
|
2017-05-26 13:54:12 +00:00
|
|
|
(
|
|
|
|
if (_vehicle isKindOf "RHS_CH_47F") then {
|
|
|
|
(_vehicle animationSourcePhase _door) > 0
|
|
|
|
} else {
|
|
|
|
(_vehicle doorPhase _door) > 0
|
|
|
|
}
|
|
|
|
) &&
|
2016-03-01 23:01:34 +00:00
|
|
|
{alive _vehicle} &&
|
2016-03-07 17:42:43 +00:00
|
|
|
{!(_vehicle getVariable [QEGVAR(fastroping,doorsLocked),false])} &&
|
2016-03-01 23:01:34 +00:00
|
|
|
{
|
|
|
|
if (_vehicle isKindOf "RHS_CH_47F") then {
|
|
|
|
ACE_player in [driver _vehicle, _vehicle turretUnit [3], _vehicle turretUnit [4]]
|
|
|
|
} else {
|
|
|
|
ACE_player in _vehicle
|
|
|
|
}
|
|
|
|
}
|