2015-01-16 02:36:31 +00:00
|
|
|
/*
|
|
|
|
* Author: Commy2
|
|
|
|
* Make a unit start swapping it's barrel
|
|
|
|
*
|
|
|
|
* Argument:
|
2015-02-08 22:54:12 +00:00
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
* 1: Weapon <STRING>
|
2015-01-16 02:36:31 +00:00
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* None
|
2015-02-08 22:54:12 +00:00
|
|
|
*
|
2015-12-15 07:09:26 +00:00
|
|
|
* Example:
|
|
|
|
* [player, currentWeapon player] call ace_overheating_fnc_swapBarrel
|
|
|
|
*
|
2015-02-08 22:54:12 +00:00
|
|
|
* Public: No
|
2015-01-16 02:36:31 +00:00
|
|
|
*/
|
2015-12-15 07:09:26 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-13 03:23:14 +00:00
|
|
|
|
2015-12-15 07:09:26 +00:00
|
|
|
params ["_player", "_weapon"];
|
|
|
|
TRACE_2("params",_player,_weapon);
|
2015-01-13 03:23:14 +00:00
|
|
|
|
|
|
|
if (stance _player != "PRONE") then {
|
2015-12-15 07:09:26 +00:00
|
|
|
[_player, "amovpknlmstpsraswrfldnon", 1] call EFUNC(common,doAnimation);
|
2015-01-13 03:23:14 +00:00
|
|
|
};
|
|
|
|
_player playActionNow "GestureDismountMuzzle";
|
|
|
|
playSound "ACE_BarrelSwap";
|
2016-01-20 15:48:39 +00:00
|
|
|
_player playAction "GestureMountMuzzle";
|
2015-01-13 03:23:14 +00:00
|
|
|
|
2016-01-20 15:48:39 +00:00
|
|
|
[5, [_player, _weapon], {(_this select 0) call FUNC(swapBarrelCallback)}, {}, (localize LSTRING(SwappingBarrel))] call EFUNC(common,progressBar);
|