ACE3/addons/weaponselect/functions/fnc_throwGrenade.sqf
2016-02-06 18:27:43 -03:00

30 lines
973 B
Plaintext

/*
* Author: commy2
* Display Grenade information on grenade throw. Called from the unified fired EH only for the local player.
*
* Arguments:
* None. Parameters inherited from EFUNC(common,firedEH)
*
* Return Value:
* None
*
* Example:
* [_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile] call ace_weaponselect_fnc_throwGrenade
*
* Public: No
*/
#include "script_component.hpp"
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
if (_weapon != "Throw") exitWith {};
private _count = {_x == _magazine} count magazines _unit;
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
if (_count == 0) then {
if (GVAR(CurrentGrenadeMuzzleIsFrag)) then {GVAR(CurrentGrenadeMuzzleFrag) = ""} else {GVAR(CurrentGrenadeMuzzleOther) = ""};
};