Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix / deprecate CBA_fnc_isUnitGetOutAnim #839

Merged
merged 1 commit into from
Dec 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions addons/common/fnc_isUnitGetOutAnim.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -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!";
};
Expand All @@ -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