ACE3/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf
Glowbal b489750d5b Minor optimizations using private, params, and isEqualType (#4323)
* Optimizations with private, params, and isEqualType

* Fixed tab being used instead of space

* Fixed tabs inserted by notepad++

* More usage of new private syntax and params

- changed a few checks for an array being empty to `_arr isEqualTo []`
rather than `count _arr == 0`
- added more uses of `private` on the same line as the variable is
declared
- added more uses of params to assign variables passed as parameters
- removed unnecessary parentheses
- removed several unnecessary variable declarations with private array
syntax

* clean up and formatting
2016-09-04 16:44:22 +02:00

38 lines
860 B
Plaintext

/*
* Author: BaerMitUmlaut
* Function for opening doors and extending the hook for most vanilla helos.
*
* Arguments:
* 0: Helicopter <OBJECT>
*
* Return Value:
* Amount of time to wait before deploying ropes <NUMBER>
*
* Example:
* [_vehicle] call ace_compat_rhs_usf3_fnc_onPrepare
*
* Public: No
*/
#include "script_component.hpp"
params ["_vehicle"];
_vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true];
private _waitTime = 2;
_vehicle animateDoor ["doorRB", 1];
_vehicle animateDoor ["doorLB", 1];
_vehicle animateDoor ["ramp_anim", 1];
private _fries = _vehicle getVariable [QEGVAR(fastroping,FRIES), objNull];
if !(isNull _fries) then {
[{
_this animate ["extendHookRight", 1];
_this animate ["extendHookLeft", 1];
}, _fries, 2] call EFUNC(common,waitAndExecute);
_waitTime = 4;
};
_waitTime