Apply the ufeh to ACE_FCS

This commit is contained in:
esteldunedain 2016-02-06 16:29:58 -03:00
parent 6d9068e306
commit b2bd11ed77
3 changed files with 7 additions and 39 deletions

View File

@ -76,36 +76,3 @@ class Extended_Respawn_EventHandlers {
};
};
};
class Extended_FiredBIS_EventHandlers {
class Tank {
class ADDON {
firedBIS = QUOTE(_this call FUNC(firedEH));
};
};
class Car {
class ADDON {
firedBIS = QUOTE(_this call FUNC(firedEH));
};
};
class Helicopter {
class ADDON {
firedBIS = QUOTE(_this call FUNC(firedEH));
};
};
class Plane {
class ADDON {
firedBIS = QUOTE(_this call FUNC(firedEH));
};
};
class Ship_F {
class ADDON {
firedBIS = QUOTE(_this call FUNC(firedEH));
};
};
class StaticWeapon {
class ADDON {
firedBIS = QUOTE(_this call FUNC(firedEH));
};
};
};

View File

@ -15,5 +15,9 @@ if (!hasInterface) exitWith {};
};
}] call EFUNC(common,addEventHandler);
// Register fire event handler
["firedPlayerVehicle", DFUNC(firedEH)] call EFUNC(common,addEventHandler);
["firedPlayerVehicleNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler);
// Register event for global updates
[QGVAR(forceUpdate), {[ACE_player] call FUNC(onForceUpdate)}] call EFUNC(common,addEventHandler);

View File

@ -1,9 +1,9 @@
/*
* Author: KoffeinFlummi
* Adjusts the direction of a shell.
* Adjusts the direction of a shell. Only gets called if the gunner is a player
*
* Arguments:
* -> arguments of the FiredBIS EH
* None. Parameters inherited from EFUNC(common,firedEH)
*
* Return Value:
* None
@ -12,9 +12,6 @@
*/
#include "script_component.hpp"
params ["_vehicle", "_weapon", "", "", "_ammo", "_magazine", "_projectile"];
private _gunner = [_vehicle, _weapon] call EFUNC(common,getGunner);
private _turret = _gunner call EFUNC(common,getTurretIndex);
// Exit if the unit isn't a player
@ -36,7 +33,7 @@ private _offset = 0;
[_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, 0] call EFUNC(common,changeProjectileDirection);
// Remove the platform velocity
// Remove the platform velocity
if (vectorMagnitude velocity _vehicle > 2) then {
private _sumVelocity = (velocity _projectile) vectorDiff (velocity _vehicle);