Apply the ufeh to ACE_Optics

This commit is contained in:
esteldunedain 2016-02-06 17:50:35 -03:00
parent 33bcd6d9f9
commit 5b3df2bcf7
3 changed files with 8 additions and 21 deletions

View File

@ -9,11 +9,3 @@ class Extended_PostInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_postInit)); init = QUOTE(call COMPILE_FILE(XEH_postInit));
}; };
}; };
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class AGM_Optics {
clientFiredBIS = QUOTE(if (_this select 0 == ACE_player) then {_this call DFUNC(handleFired)};);
};
};
};

View File

@ -50,3 +50,6 @@ GVAR(camera) = objNull;
GVAR(camera) cameraEffect ["INTERNAL", "BACK", "ace_optics_rendertarget0"]; GVAR(camera) cameraEffect ["INTERNAL", "BACK", "ace_optics_rendertarget0"];
}; };
}] call EFUNC(common,addEventHandler); }] call EFUNC(common,addEventHandler);
// Register fire event handler
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);

View File

@ -2,26 +2,18 @@
* Original Author: Taosenai * Original Author: Taosenai
* Adapted By: KoffeinFlummi, commy2 * Adapted By: KoffeinFlummi, commy2
* *
* Animates the scope when firing. * Animates the scope when firing. Called from the unified fired EH only for the local player.
* *
* Arguments: * Arguments:
* 0: Unit (Object) * None. Parameters inherited from EFUNC(common,firedEH)
* 1: Weapon (String)
* 2: Muzzle (String)
* 3: Mode (String)
* 4: Ammo (Object)
* 5: Magazine (String)
* 6: Projectile (Object)
* *
* Return Value: * Return Value:
* None * None
*/ */
#include "script_component.hpp" #include "script_component.hpp"
private ["_unit", "_weapon"]; //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);
_unit = _this select 0;
_weapon = _this select 1;
// check if compatible scope is used // check if compatible scope is used
private "_display"; private "_display";