mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
615afee022
* reload magazine instantly on arsenal * remove comment in reloadlaunchers * use addWeaponItem in selChangedRight
30 lines
646 B
Plaintext
30 lines
646 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: commy2
|
|
* Reload a launcher
|
|
*
|
|
* Arguments:
|
|
* 0: Unit to do the reloading <OBJECT>
|
|
* 1: Target to rload <OBJECT>
|
|
* 2: weapon name <STRING>
|
|
* 3: missile name <STRING>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [bob, kevin, "weapon", "missile"] call ace_reloadlaunchers_fnc_reloadLauncher
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_unit","_target","_weapon","_magazine"];
|
|
TRACE_4("params",_unit,_target,_weapon,_magazine);
|
|
|
|
_target selectWeapon _weapon;
|
|
|
|
if (currentWeapon _target != _weapon) exitWith {};
|
|
if (currentMagazine _target != "") exitWith {};
|
|
|
|
_target addWeaponItem [_weapon, _magazine, true];
|