mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
cd852477c8
* CH53 Fastroping and Fixes Added fastrope points for CH53. The getOut EH is required to keep the doors open when a unit exits the vehicle and it uses the vehicle animation "doorHandler_R" or "doorHandler_L" as a placeholder to determine if the doors are open(1)/close(0). eg. In UH1Y (Unarmed), when the right door is opened using the useraction, "doorRB" and "doorHandler_R" will be set to 1. * Changed TAB to 4 spaces * Moved bracket to follow guidelines
39 lines
959 B
Plaintext
39 lines
959 B
Plaintext
/*
|
|
* 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
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
params ["_vehicle", "_door"];
|
|
|
|
(alive _vehicle) &&
|
|
{!(_vehicle getVariable [QEGVAR(fastroping,doorsLocked),false])} &&
|
|
{
|
|
switch (true) do {
|
|
case (_vehicle isKindOf "rhsusf_CH53E_USMC"): {
|
|
((_vehicle animationPhase _door) > 0) &&
|
|
{ACE_player == (driver _vehicle)}
|
|
};
|
|
case (_vehicle isKindOf "RHS_CH_47F"): {
|
|
((_vehicle animationSourcePhase _door) > 0) &&
|
|
{ACE_player in [driver _vehicle, _vehicle turretUnit [3], _vehicle turretUnit [4]]}
|
|
};
|
|
default {
|
|
((_vehicle doorPhase _door) > 0) &&
|
|
{ACE_player in _vehicle}
|
|
};
|
|
}
|
|
}
|