Untitled
unknown
plain_text
4 months ago
1.7 kB
2
Indexable
IADS_HookGuidanceLogic = { params ["_missileType", "_missile", "_target", "_launchVehicle", "_launcher"]; if(!isServer) exitWith { [_missileType, _missile, _target, _launchVehicle, _launcher] remoteExec ["IADS_HookGuidanceLogic", 2]; }; private _missileParams = IADS_Missiles getOrDefault [_missileType, [{}, {}, [], [], []]]; _missileParams params ["_seekerName", "_fuzeCode", "_guidancePhases", "_seekerPerformance", "_flightParams", "_verticallyLaunched"]; if(_verticallyLaunched) then { _missile setDir (_missile getDir _target); [_missile, 90, 0] call BIS_fnc_setPitchBank; }; private _seekerHead = IADS_Seekers get _seekerName; private _missileID = [_missileType, _missile] call IADS_RegisterNewMissile; if(!(isNil "_missileID")) then { [ IADS_GuidanceComputer, 0, [ _guidancePhases, _seekerHead, _fuzeCode, _missileID, _missile, _flightParams, _seekerPerformance, _target, _launchVehicle ] ] call CBA_fnc_addPerFrameHandler; private _missileList = _target getVariable ["missileList", []]; _missileList pushBack _missileID; _target setVariable ["missileList", _missileList, true]; if(!(isNull _launchVehicle)) then { [_missile, _launchVehicle] remoteExecCall ["disableCollisionWith", 0]; private _currentVelocity = velocity _launchVehicle; _missile setVelocity _currentVelocity; }; }; };
Editor is loading...
Leave a Comment