mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
HuntIR - Use ammo event handler (#9561)
This commit is contained in:
parent
17daea0ff8
commit
9160826faa
@ -5,6 +5,9 @@ class CfgAmmo {
|
||||
lightColor[] = {0, 0, 0, 0};
|
||||
smokeColor[] = {0, 0, 0, 0};
|
||||
timeToLive = 6;
|
||||
class Eventhandlers {
|
||||
fired = QUOTE(call FUNC(handleFired));
|
||||
};
|
||||
};
|
||||
|
||||
class ShellBase;
|
||||
|
@ -8,8 +8,4 @@ GVAR(cur_cam) = 0;
|
||||
GVAR(ROTATE) = 0;
|
||||
GVAR(ELEVAT) = 0.01;
|
||||
|
||||
// Register fire event handler
|
||||
// Don't run for non players, as they are too dumb to launch huntirs anyway
|
||||
["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ace_huntir", {!GETMVAR(GVAR(stop),true)}] call CBA_fnc_registerFeatureCamera;
|
||||
|
@ -16,12 +16,11 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
//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);
|
||||
params ["_unit", "", "", "", "", "", "_projectile"];
|
||||
TRACE_2("handleFired",_unit,_projectile);
|
||||
|
||||
if (_ammo != "F_HuntIR") exitWith {};
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
// Don't run for non players, as they are too dumb to launch huntirs anyway
|
||||
if (_unit != ACE_player) exitWith {};
|
||||
|
||||
[{
|
||||
params ["_projectile"];
|
||||
|
Loading…
Reference in New Issue
Block a user