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

Fix depth charges not applying the ProjectilesToDeflect blueprint field #6507

Merged
merged 6 commits into from
Nov 12, 2024

Conversation

Garanas
Copy link
Member

@Garanas Garanas commented Nov 3, 2024

Description of the proposed changes

Fix an issue where the blueprint field ProjectilesToDeflect of a depth charge was ignored. It would always default to the value 3.

Testing done on the proposed changes

In the following test case I increased the redirect count of the depth charge of the UEF Destroyer to 10.

fix-depth-charge.mp4

Checklist

  • Changes are annotated, including comments where useful
  • Changes are documented in the changelog for the next game version

@Garanas Garanas changed the title Fix/depth charge Fix depth charge not applying the ProjectilesToDeflect field Nov 3, 2024
@Garanas Garanas changed the title Fix depth charge not applying the ProjectilesToDeflect field Fix depth charges not applying the ProjectilesToDeflect blueprint field Nov 3, 2024
@Garanas Garanas requested a review from Tagada14 November 3, 2024 15:07
@Garanas Garanas marked this pull request as ready for review November 3, 2024 15:07
Copy link
Contributor

@lL1l1 lL1l1 left a comment

Choose a reason for hiding this comment

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

"Depth charge" is confusing with the depth charge weapon. I think we should use "Anti-Torpedo Flare" because that makes sense when you know about Aeon tactical missile flares, and the name is already used by the Mermaid, Brick, Megalith, and Barracuda. UEF's display name is "Smart Charge AntiTorpedo" and Salem is an outlier with "Anti Torpedo Solution".

@Tagada14
Copy link
Collaborator

Tagada14 commented Nov 9, 2024

I tested it out with UEF destroyers and when I set the ProjectilesToDeflect to eg. 10 then the"depth charges" redirect nothing.
Maybe some of my other changes mess this up? Idk, will retest
Edit: Idk if it was something to do with the set up or my other changes but it works as intended when I cleaned up everything.

@lL1l1
Copy link
Contributor

lL1l1 commented Nov 9, 2024

You have to respawn the units for the changes to take effect since this mechanic uses the weapon's blueprint, and blueprints are cached on instantiation (self.Blueprint), so you have to respawn the unit and its weapon for it to update.
You may also find useful the hotkey "toggle collision debug information" (equal to dbg c console command) to see how the projectiles hits the flare's hitbox, and increasing the projectile lifetime in the antitorp weapon's blueprint so that it can catch more torpedoes.
{6E383769-F0F7-4ED6-925C-A448CD7117EC}

@Garanas
Copy link
Member Author

Garanas commented Nov 12, 2024

"Depth charge" is confusing with the depth charge weapon. I think we should use "Anti-Torpedo Flare" because that makes sense when you know about Aeon tactical missile flares, and the name is already used by the Mermaid, Brick, Megalith, and Barracuda. UEF's display name is "Smart Charge AntiTorpedo" and Salem is an outlier with "Anti Torpedo Solution".

I agree, but we should process that in a separate pull request. It's also a little tricky because if we change the names (of the Lua classes) then we'll also break mod compatibility.

@Garanas Garanas merged commit d8db806 into develop Nov 12, 2024
5 checks passed
@Garanas Garanas deleted the Fix/depth-charge branch November 12, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants