From 1dac0fb524b586d634a0bf9bb95a80c30f6fb3b1 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 18 Dec 2017 15:55:24 +0100 Subject: [PATCH] fix / deprecate CBA_fnc_isUnitGetOutAnim --- addons/common/fnc_isUnitGetOutAnim.sqf | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/addons/common/fnc_isUnitGetOutAnim.sqf b/addons/common/fnc_isUnitGetOutAnim.sqf index bc23f096f..82eba4e7a 100644 --- a/addons/common/fnc_isUnitGetOutAnim.sqf +++ b/addons/common/fnc_isUnitGetOutAnim.sqf @@ -4,6 +4,8 @@ Function: CBA_fnc_isUnitGetOutAnim Description: Checks whether a unit is turned out in a vehicle or not. + DEPRECATED. Use isTurnedOut instead. + Parameters: _unit - Unit to check [Object] @@ -12,7 +14,7 @@ Returns: Examples: (begin example) - if ( [player] call CBA_fnc_isTurnedOut ) then + if ( [player] call CBA_fnc_isUnitGetOutAnim ) then { player sideChat "I am turned out!"; }; @@ -21,21 +23,9 @@ Examples: Author: (c) Denisko-Redisko ---------------------------------------------------------------------------- */ - #include "script_component.hpp" SCRIPT(isUnitGetOutAnim); + params ["_unit"]; -private [ - "_animationState", - "_moves", - "_actions", - "_getOutAction", - "_getOutState" -]; - -_animationState = animationState _unit; -_moves = configFile >> getText ( configFile >> "CfgVehicles" >> typeof _unit >> "moves" ); -_actions = _moves >> "Actions" >> getText( _moves >> "States" >> _animationState >> "actions" ); -_getOutAction = getText( configFile >> "CfgVehicles" >> typeof vehicle _unit >> "getOutAction" ); -_getOutState = getText ( _actions >> _getOutAction ); -_animationState == _getOutState; + +isTurnedOut _unit