Skip to content

Commit

Permalink
air auto defense
Browse files Browse the repository at this point in the history
  • Loading branch information
tbox1911 committed May 21, 2024
1 parent 8353f20 commit cf82006
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core.liberation/scripts/client/misc/vehicle_defense.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ _vehicle removeAllEventHandlers "IncomingMissile";
_vehicle addEventHandler ["IncomingMissile", {
params ["_target", "_ammo", "_vehicle", "_instigator"];
if (objectParent player == _vehicle) then {hintSilent "Incoming Missile !!"};
_target action ["useWeapon", _target, commander _target, 0];
if (_vehicle isKindOf "Air") then {
_target action ["useWeapon", _target, driver _target, 0];
} else {
_target action ["useWeapon", _target, commander _target, 0];
};
}];

0 comments on commit cf82006

Please sign in to comment.