Apply the ufeh to ACE_Disposable

This commit is contained in:
esteldunedain 2016-02-06 16:39:08 -03:00
parent b2bd11ed77
commit a084373574
3 changed files with 6 additions and 18 deletions

View File

@ -10,14 +10,6 @@ class Extended_PostInit_EventHandlers {
};
};
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class ADDON {
firedBIS = QUOTE(_this call FUNC(replaceATWeapon));
};
};
};
// handle preloaded missile
class Extended_InitPost_EventHandlers {
class CAManBase {

View File

@ -12,3 +12,8 @@ if (!hasInterface) exitWith {};
[_unit] call FUNC(takeLoadedATWeapon);
[_unit] call FUNC(updateInventoryDisplay);
}] call EFUNC(common,addEventHandler);
// Register fire event handler
// Only for the local player and for AI. Non-local players will handle it themselves
["firedPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler);
["firedNonPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler);

View File

@ -3,13 +3,7 @@
* Replace the disposable launcher with the used dummy.
*
* 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:
* Nothing
@ -21,9 +15,6 @@
*/
#include "script_component.hpp"
params ["_unit", "_weapon", "", "", "", "", "_projectile"];
TRACE_3("params",_unit,_weapon,_projectile);
if (!local _unit || {_weapon != secondaryWeapon _unit}) exitWith {};
private _replacementTube = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_UsedTube");