2016-03-06 02:33:30 +00:00
|
|
|
/*
|
|
|
|
* Author: esteldunedain, Commy2
|
|
|
|
* Make a unit start swapping the barrel of another unit
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Arguments:
|
2016-03-06 02:33:30 +00:00
|
|
|
* 0: Unit initiating the action <OBJECT>
|
|
|
|
* 1: Unit that has the weapon <OBJECT>
|
|
|
|
* 2: Weapon <STRING>
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Return Value:
|
2016-03-06 02:33:30 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [player, cursorTarget, currentWeapon cursorTarget] call ace_overheating_fnc_swapBarrelAssistant
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
params ["_assistant", "_gunner", "_weapon"];
|
|
|
|
TRACE_3("params",_assistant,_gunner,_weapon);
|
|
|
|
|
|
|
|
// Make the standing player kneel down
|
|
|
|
if (stance _assistant != "PRONE") then {
|
|
|
|
[_assistant, "amovpknlmstpsraswrfldnon", 1] call EFUNC(common,doAnimation);
|
|
|
|
};
|
|
|
|
|
|
|
|
// Barrel dismount gesture
|
|
|
|
playSound "ACE_BarrelSwap";
|
|
|
|
|
2017-08-22 18:30:56 +00:00
|
|
|
[3, [_assistant, _gunner, _weapon], {}, {}, localize LSTRING(SwappingBarrel), nil, ["isNotInside", "isNotSitting", "isNotSwimming"]] call EFUNC(common,progressBar);
|
2016-03-06 02:33:30 +00:00
|
|
|
|
2016-05-25 18:13:36 +00:00
|
|
|
[QGVAR(initiateSwapBarrelAssisted), [_assistant, _gunner, _weapon], _gunner] call CBA_fnc_targetEvent;
|