Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Moving the attack order while the Tempest charges its cannon cancels the shot but activates its reload time #6443

Open
Basilisk3 opened this issue Sep 11, 2024 · 4 comments
Labels
area: engine related to engine bugs/limitations area: sim Area that is affected by the Simulation of the Game feature: weapon firing cycle related to the weapon firing cycle type: bug

Comments

@Basilisk3
Copy link
Collaborator

Describe the Bug

As per the title. Especially relevant when groundfiring but also when targeting units regularly.

Reproduce the bug

Groundfire a Tempest and move the attack order while it is in the process of charging its cannon.

Screenshots

No response

Additional context

No response

@Hdt80bro
Copy link
Contributor

Sounds like this works as intended to me - can you elaborate?

@Basilisk3 Basilisk3 changed the title [Bug]: Moving the attack order while the Tempest charges its cannon cancels the shot [Bug]: Moving the attack order while the Tempest charges its cannon cancels the shot but activates its reload time Sep 11, 2024
@Basilisk3
Copy link
Collaborator Author

I updated the title. The shot itself is cancelled, but the game appears to think that the unit fired (probably due to the charge-up animation). This results in the reload time being triggered even though the weapon did not shoot, forcing you to wait 10 seconds before trying again.

@Hdt80bro
Copy link
Contributor

Ah, I see.

@lL1l1
Copy link
Contributor

lL1l1 commented Sep 12, 2024

This applies to every single unit that fires multiple projectiles per OnFire over a period of time. It also applies to units switching targets instantly due to AttackGroundTries. The engine simply doesn't keep track of how many projectiles were fired, it just fires the OnFire event when the aim is aligned within a tolerance of the firing solution.

I worked on a solution to this problem in #6166 by adding a salvo retargeting feature, but its a little tangled with other changes. Essentially it counts how many projectiles were actually fired and creates a thread allowing to bypass waiting for the engine's OnFire call when the weapon is aimed if not all projectiles of a rack were fired.
I don't think it solves the issue with AttackGroundTries aiming the weapon away during the salvo though, but if I remember correctly you can adjust the fire rate to be slower so that the engine doesn't aim the weapon away when the third OnFire event is given (fire rate cooldown intervals should be longer than salvo firing times).

@lL1l1 lL1l1 added area: engine related to engine bugs/limitations feature: weapon firing cycle related to the weapon firing cycle labels Sep 12, 2024
@lL1l1 lL1l1 added the area: sim Area that is affected by the Simulation of the Game label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: engine related to engine bugs/limitations area: sim Area that is affected by the Simulation of the Game feature: weapon firing cycle related to the weapon firing cycle type: bug
Projects
None yet
Development

No branches or pull requests

3 participants