Guidance handoff to guiding unit/laser shooter. This needs LOBL vs. LOAL capability.

This commit is contained in:
jaynus 2015-04-16 09:35:21 -07:00
parent 5117595ecc
commit 6d93fe45a6
6 changed files with 66 additions and 20 deletions

View File

@ -1,2 +1,3 @@
#include "script_component.hpp"
[QGVAR(handoff), {_this call FUNC(handleHandoff)}] call EFUNC(common,addEventHandler);

View File

@ -14,6 +14,9 @@ PREP(guidancePFH);
PREP(doAttackProfile);
PREP(doSeekerSearch);
PREP(doHandoff);
PREP(handleHandoff);
// Attack Profiles
PREP(attackProfile_LIN);
PREP(attackProfile_DIR);

View File

@ -0,0 +1,4 @@
#include "script_component.hpp"
PARAMS_2(_target,_args);
[QGVAR(handoff), [_target, _args]] call EFUNC(common,globalEvent);

View 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;

View File

@ -60,7 +60,7 @@ if(isNil "_target") then {
};
TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile);
[FUNC(guidancePFH), 0, [_this,
_args = [_this,
[_shooter,
[_target, _targetPos, _launchPos],
_seekerType,
@ -78,9 +78,19 @@ TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile
getNumber ( _config >> "seekerMaxRange" )
],
[ 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
(vehicle _shooter) setVariable [QGVAR(target), nil];
(vehicle _shooter) setVariable [QGVAR(seekerType), nil];

View 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()