ACE3/addons/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf
Grim e5a49f3acf
Compat RHS - Make compats autoload if mod is present (#9294)
* autoload RHS USAF compat

* whoops

* fix filepatching builds

* pboProject pls

* add ONE semicolon.

* remove meta.cpp

* add AFRF, move stringtables

* add addon.toml

* stringtable validation

* change subconfig folder names for stringtables

* macros

* sigh

* macros

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

* add SAF compat

* missing file

* config brackets

* Update addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/config.cpp

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Update addons/compat_rhs_usf3/compat_rhs_usf3_csw/CfgVehicles.hpp

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* capitalization

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

* fix double class

* gref and fastroping

* fix functions

* Update CfgVehicles.hpp

---------

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-03 11:36:19 -05:00

39 lines
959 B
Plaintext

#include "script_component.hpp"
/*
* 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
*/
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}
};
}
}