Skip to content

Conversation

tbeswick96
Copy link
Contributor

@tbeswick96 tbeswick96 commented Sep 2, 2020

When merged this pull request will:

  • Use proper source for attack profile and laser code (both set on vehicle, currently retrieved from player)
  • Don't use E variant macros inside laser for own variables and functions
  • Check list of remote targets for the locked target as one of the fallbacks for hellfire ARH onFired, to enable firing on datalink track files without needing LOS on the target or radar sensor on
    • If target is a remote track, the missile isn't set as active off the rail so it doesn't go maddog

…remote targets

- Use correct object for attack profile and laser code (set on vehicle, retrieved from player)
- Don't use E variant macros inside laser for own variables and functions
- Check list of remote targets for hellfire ARH onFired, to enable firing on datalink tracks without needing LOS or radar on

(cherry picked from commit edb216f)
@PabstMirror
Copy link
Contributor

think about FFV guy shooting javelin, you want to use the shooter of the missle (themself), not vehicle player (the car)
ref https://github.com/acemod/ACE3/blob/master/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf#L28-L35
it uses CBA_fnc_canUseWeapon

@tbeswick96
Copy link
Contributor Author

Ah damn, hadn't considered that case, will make an edit later today to factor it in

@tbeswick96 tbeswick96 marked this pull request as draft September 3, 2020 08:11
- Uses same logic to select the laser and attackprofile source as the laser and attack profile functions
@tbeswick96 tbeswick96 marked this pull request as ready for review September 3, 2020 16:11
@tbeswick96
Copy link
Contributor Author

@PabstMirror Does that look correct now? Uses the same logic as the laser and attack profile source

@jonpas jonpas added this to the 3.13.5 milestone Nov 7, 2020
@jonpas jonpas added the kind/bug-fix Release Notes: **FIXED:** label Nov 7, 2020
@jonpas jonpas requested a review from PabstMirror November 7, 2020 23:31

private _config = configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON);

private _configurationSource = _shooter;
Copy link
Contributor

@PabstMirror PabstMirror Nov 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have an example where _configurationSource will be different from _shooter
This even will be triggered from the object that fired the missile
edit: _shooter is arg0, not the newish arg7

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to get a vanilla repro this evening, but I was testing with an Apache, where the hellfires are launched by the gunner.
For months until I investigated and made this change, my pilot guys had hellfires never track the laser if the laser wasn't the default code. I enabled tracing and found that the laser was being set on the player object rather than the vehicle.

_currentShooter setVariable [QGVAR(code), _newLaserCode, true];

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work with

private _vehicleLockMode = _vehicle getVariable [QEGVAR(missileguidance,attackProfile), _defaultAttackProfile];
? I am worried about this breaking something somewhere else unintentionally, I think this was assumed to be the vehicle from the get-go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants