mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Guidance handoff to guiding unit/laser shooter. This needs LOBL vs. LOAL capability.
This commit is contained in:
parent
5117595ecc
commit
6d93fe45a6
@ -1,2 +1,3 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
[QGVAR(handoff), {_this call FUNC(handleHandoff)}] call EFUNC(common,addEventHandler);
|
||||||
|
@ -14,6 +14,9 @@ PREP(guidancePFH);
|
|||||||
PREP(doAttackProfile);
|
PREP(doAttackProfile);
|
||||||
PREP(doSeekerSearch);
|
PREP(doSeekerSearch);
|
||||||
|
|
||||||
|
PREP(doHandoff);
|
||||||
|
PREP(handleHandoff);
|
||||||
|
|
||||||
// Attack Profiles
|
// Attack Profiles
|
||||||
PREP(attackProfile_LIN);
|
PREP(attackProfile_LIN);
|
||||||
PREP(attackProfile_DIR);
|
PREP(attackProfile_DIR);
|
||||||
|
4
addons/missileguidance/functions/fnc_doHandoff.sqf
Normal file
4
addons/missileguidance/functions/fnc_doHandoff.sqf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
PARAMS_2(_target,_args);
|
||||||
|
|
||||||
|
[QGVAR(handoff), [_target, _args]] call EFUNC(common,globalEvent);
|
6
addons/missileguidance/functions/fnc_handleHandoff.sqf
Normal file
6
addons/missileguidance/functions/fnc_handleHandoff.sqf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
PARAMS_2(_target,_args);
|
||||||
|
|
||||||
|
if(!local _target) exitWith {};
|
||||||
|
|
||||||
|
[FUNC(guidancePFH), 0, _args] call cba_fnc_addPerFrameHandler;
|
@ -60,7 +60,7 @@ if(isNil "_target") then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile);
|
TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile);
|
||||||
[FUNC(guidancePFH), 0, [_this,
|
_args = [_this,
|
||||||
[_shooter,
|
[_shooter,
|
||||||
[_target, _targetPos, _launchPos],
|
[_target, _targetPos, _launchPos],
|
||||||
_seekerType,
|
_seekerType,
|
||||||
@ -78,9 +78,19 @@ TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile
|
|||||||
getNumber ( _config >> "seekerMaxRange" )
|
getNumber ( _config >> "seekerMaxRange" )
|
||||||
],
|
],
|
||||||
[ diag_tickTime, [], [] ]
|
[ diag_tickTime, [], [] ]
|
||||||
]
|
];
|
||||||
] call cba_fnc_addPerFrameHandler;
|
|
||||||
|
|
||||||
|
// Hand off to the guiding unit. We just use local player so local PFH fires for now
|
||||||
|
// Laser code needs to give us a shooter for LOBL, or the seeker unit needs to be able to shift locality
|
||||||
|
// Based on its homing laser
|
||||||
|
// Lasers need to be handled in a special LOAL/LOBL case
|
||||||
|
_guidingUnit = ACE_player;
|
||||||
|
|
||||||
|
if(local _guidingUnit) then {
|
||||||
|
[FUNC(guidancePFH), 0, _args ] call cba_fnc_addPerFrameHandler;
|
||||||
|
} else {
|
||||||
|
[QGVAR(handoff), [_guidingUnit, _args] ] call FUNC(doHandoff);
|
||||||
|
};
|
||||||
/* Clears locking settings
|
/* Clears locking settings
|
||||||
(vehicle _shooter) setVariable [QGVAR(target), nil];
|
(vehicle _shooter) setVariable [QGVAR(target), nil];
|
||||||
(vehicle _shooter) setVariable [QGVAR(seekerType), nil];
|
(vehicle _shooter) setVariable [QGVAR(seekerType), nil];
|
||||||
|
22
tools/github_privates_bot.py
Normal file
22
tools/github_privates_bot.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
from pygithub3 import Github
|
||||||
|
|
||||||
|
def main():
|
||||||
|
gh = Github(user='acemod', repo='ACE3')
|
||||||
|
|
||||||
|
pull_requests = gh.pull_requests.list().all()
|
||||||
|
|
||||||
|
for request in pull_requests:
|
||||||
|
files = gh.pull_requests.list_files(request.number).all()
|
||||||
|
|
||||||
|
for file in files:
|
||||||
|
# print file.filename
|
||||||
|
if '.sqf' in file.filename:
|
||||||
|
print file
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
Reference in New Issue
Block a user