Apply the ufeh to ACE_HuntIr

This commit is contained in:
esteldunedain 2016-02-06 17:29:05 -03:00
parent 0b9695ce70
commit 7ace1738c0
3 changed files with 11 additions and 17 deletions

View File

@ -9,11 +9,3 @@ class Extended_PostInit_EventHandlers {
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
};
};
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class ADDON {
clientFiredBIS = QUOTE(_this call FUNC(handleFired));
};
};
};

View File

@ -7,3 +7,8 @@ GVAR(TI) = 0;
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
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler);

View File

@ -1,16 +1,10 @@
/*
* Author: Norrin, Rocko, Ruthberg
*
* Handles HuntIR projectiles
* Handles HuntIR projectiles. Called from the unified fired EH for all CAManBase.
*
* Arguments:
* 0: unit - Object the event handler is assigned to <OBJECT>
* 1: weapon - Fired weapon <STRING>
* 2: muzzle - Muzzle that was used <STRING>
* 3: mode - Current mode of the fired weapon <STRING>
* 4: ammo - Ammo used <STRING>
* 5: magazine - magazine name which was used <STRING>
* 6: projectile - Object of the projectile that was shot <OBJECT>
* None. Parameters inherited from EFUNC(common,firedEH)
*
* Return Value:
* None
@ -19,10 +13,13 @@
*/
#include "script_component.hpp"
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"];
//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 (_ammo != "F_HuntIR") exitWith {};
if (!hasInterface) exitWith {};
[{
params ["_projectile"];