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-01 19:03:28 +00:00
|
|
|
// remove scroll wheel action
|
|
|
|
_player removeAction (_player getVariable [QGVAR(StandUpActionID), -1]);
|
|
|
|
|
2015-06-07 20:00:43 +00:00
|
|
|
// Restore animation
|
2015-09-01 19:03:28 +00:00
|
|
|
private "_animation";
|
|
|
|
_animation = switch (currentWeapon _player) do {
|
|
|
|
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-06-07 20:00:43 +00:00
|
|
|
GVAR(seat) setVariable [QGVAR(seatOccupied), nil, true];
|
2015-06-08 15:52:33 +00:00
|
|
|
GVAR(seat) = nil;
|