Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert FiringState OnLostTarget working through HaltFire (FAForever#6289
) <!-- General useful tooling: - [ScreenToGif](https://www.screentogif.com/): Free, open source screen recorder that can export to MP4. If the changes are visual, these can help you tell us exactly what the changes imply! --> <!-- Feel free to remove unused parts of this template. --> ## Description of the proposed changes <!-- A clear and concise description (or visuals) of what the changes imply. --> <!-- If it closes an issue, make sure to link the issue by using "(Closes/Fixes/Resolves) #(Issue Number)" in your pull request. --> Essentially reverts it to Steam behavior, except we have the fix for the state to call the base class. - ✔️ Fixes ythotha storm not attacking the ground or allies by removing the `hasTarget` check and re-adding the base class call. - ✔️ Fixes projectile weapons (but not beams) not firing their last shot in `AttackGroundTries`. - ❌ Non-packing weapons will fire their salvo off into the air. Thankfully there are few of them. The actual solution to this is to add a proper salvo retargeting system, which is beyond the scope of the PR, so there are just some hack fix exceptions. ## Testing done on the proposed changes <!-- List all relevant testing that you've done to confirm the changes work. --> Tested units with various firing cycles, particularly relevant are Ravager, Ythotha and its storm, GC Beam after tractoring something, and Scathis. <details> <summary> Spawn units command: </summary> ``` CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xsl0301_missile', 0, 3.82, 0.50, 0.00000) CreateUnitAtMouse('dslk004', 0, 11.82, -4.50, 0.00000) CreateUnitAtMouse('delk002', 0, 8.82, -4.50, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xsb2301', 0, -4.24, 1.83, 2.64765) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xsb2401', 0, -8.24, -8.17, 0.00000) CreateUnitAtMouse('drl0204', 0, 10.15, -0.33, 0.02394) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('urb2108', 0, 9.76, 5.83, 0.00000) CreateUnitAtMouse('uel0001', 0, 2.17, 5.30, 0.51364) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('url0401', 0, -11.74, 7.08, -0.00668) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xsb2108', 0, 12.76, 6.83, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xel0306', 0, -2.10, 5.51, -0.57607) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xeb2306', 0, -8.24, 7.83, 2.60117) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xsl0401', 0, 14.76, 0.83, -0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xab1401', 0, -1.24, -8.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('url0304', 0, -5.25, 5.22, 0.23978) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('del0204', 0, 6.23, 5.95, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('drlk001', 0, 5.82, -4.50, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('xrb0304', 0, -0.24, -0.17, 0.00000) CreateUnitAtMouse('ual0401', 0, -18.30, -3.43, 0.21756) ``` </details> ## Checklist - [x] Changes are annotated, including comments where useful - [x] Changes are documented in the changelog for the next game version
- Loading branch information