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));
};
};
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class AGM_Optics {
clientFiredBIS = QUOTE(if (_this select 0 == ACE_player) then {_this call DFUNC(handleFired)};);
};
};
};

View File

@ -10,7 +10,7 @@ GVAR(camera) = objNull;
if ((!isNil {is3DEN}) && {is3DEN}) exitWith {
ACE_LOGINFO("Eden detected: disabling Optics PIP Camera");
};
waitUntil {!isNull ACE_player};
waitUntil {sleep 1; {_x != GVAR(camera)} count allMissionObjects "camera" == 0 && {isNull curatorCamera}};
@ -50,3 +50,6 @@ GVAR(camera) = objNull;
GVAR(camera) cameraEffect ["INTERNAL", "BACK", "ace_optics_rendertarget0"];
};
}] call EFUNC(common,addEventHandler);
// Register fire event handler
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);

View File

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