2015-08-04 01:08:21 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
2016-02-06 21:27:43 +00:00
|
|
|
* Display Grenade information on grenade throw. Called from the unified fired EH only for the local player.
|
2015-08-04 01:08:21 +00:00
|
|
|
*
|
2015-08-08 12:40:23 +00:00
|
|
|
* Arguments:
|
2016-02-06 21:27:43 +00:00
|
|
|
* None. Parameters inherited from EFUNC(common,firedEH)
|
2015-08-04 01:08:21 +00:00
|
|
|
*
|
2015-08-08 12:40:23 +00:00
|
|
|
* Return Value:
|
2015-08-04 01:08:21 +00:00
|
|
|
* None
|
2015-08-08 12:40:23 +00:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile] call ace_weaponselect_fnc_throwGrenade
|
|
|
|
*
|
|
|
|
* Public: No
|
2015-08-04 01:08:21 +00:00
|
|
|
*/
|
2015-01-17 17:26:51 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-02-06 21:27:43 +00:00
|
|
|
//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);
|
2015-01-17 17:26:51 +00:00
|
|
|
|
|
|
|
if (_weapon != "Throw") exitWith {};
|
|
|
|
|
2016-01-06 21:42:02 +00:00
|
|
|
private _count = {_x == _magazine} count magazines _unit;
|
2015-01-17 17:26:51 +00:00
|
|
|
|
|
|
|
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
|
|
|
|
|
|
|
if (_count == 0) then {
|
|
|
|
if (GVAR(CurrentGrenadeMuzzleIsFrag)) then {GVAR(CurrentGrenadeMuzzleFrag) = ""} else {GVAR(CurrentGrenadeMuzzleOther) = ""};
|
|
|
|
};
|