2015-06-07 20:00:43 +00:00
|
|
|
/*
|
|
|
|
* Author: Jonpas
|
|
|
|
* Stands up the player.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* Player <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* player call ace_sitting_fnc_stand;
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-07 13:12:24 +00:00
|
|
|
params ["_player"];
|
2015-06-08 15:52:33 +00:00
|
|
|
|
2015-09-26 23:37:19 +00:00
|
|
|
(_player getVariable QGVAR(isSitting)) params ["_seat", "_actionID"];
|
|
|
|
|
|
|
|
// Remove scroll-wheel action
|
|
|
|
_player removeAction _actionID;
|
2015-09-01 19:03:28 +00:00
|
|
|
|
2015-06-07 20:00:43 +00:00
|
|
|
// Restore animation
|
2015-12-30 18:23:35 +00:00
|
|
|
private _animation = switch (currentWeapon _player) do {
|
2015-09-01 19:03:28 +00:00
|
|
|
case "": {"amovpercmstpsnonwnondnon"};
|
|
|
|
case (primaryWeapon _player): {"amovpercmstpslowwrfldnon"};
|
|
|
|
case (handgunWeapon _player): {"amovpercmstpslowwpstdnon"};
|
|
|
|
default {"amovpercmstpsnonwnondnon"};
|
|
|
|
};
|
|
|
|
|
|
|
|
[_player, _animation, 2] call EFUNC(common,doAnimation);
|
2015-06-07 20:00:43 +00:00
|
|
|
|
|
|
|
// Set variables to nil
|
2015-06-08 21:39:14 +00:00
|
|
|
_player setVariable [QGVAR(isSitting), nil];
|
2015-09-26 23:37:19 +00:00
|
|
|
if (isNull _seat) exitWith {};
|
2016-06-18 16:52:27 +00:00
|
|
|
[objNull, _seat] call EFUNC(common,claim);
|