-
Notifications
You must be signed in to change notification settings - Fork 259
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 retaliation raids and shelling #3511
Conversation
As reported in #3419, retaliation raids currently cause infinite error spam if the bombardment that triggered the retaliation was from a temporary map that was disposed of by the time the raid was actually executed. Fix it by checking whether the target map for the raid is actually valid. While testing this, I found that retaliation shelling has also been broken since d90f3e1. Fix it by accounting for the case where the launcher is not spawned at all, since retaliation bombardment shells are "launched" by world pawns.
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-11541883961.zip |
Here's a test save with everything setup and a retaliation raid + shells already incoming: temp_map_bomb.rws.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer throws errors when shelling a caravan map that no longer exists.
As reported in #3419, retaliation raids currently cause infinite error spam if the bombardment that triggered the retaliation was from a temporary map that was disposed of by the time the raid was actually executed. Fix it by checking whether the target map for the raid is actually valid. While testing this, I found that retaliation shelling has also been broken since d90f3e1. Fix it by accounting for the case where the launcher is not spawned at all, since retaliation bombardment shells are "launched" by world pawns. Also ensure bombardments from other factions' settlements do not trigger a retaliation bombardment if the target faction isn't hostile to the owner of the tile, and introduce a configurable retaliation fire delay that scales with how damaged a site is.
2b14d2e
to
0e271eb
Compare
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-11604185016.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-11626033919.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug is fixed, and new shelling behavior is working as intended. We may want to amend the retaliatory raid message to make it clear what map the raid is targeting, but that doesn't need to hold up this PR.
Changes
As reported in #3419, retaliation raids currently cause infinite error spam if the bombardment that triggered the retaliation was from a temporary map that was disposed of by the time the raid was actually executed. Fix it by checking whether the target map for the raid is actually valid.
While testing this, I found that retaliation shelling has also been broken since d90f3e1. Fix it by accounting for the case where the launcher is not spawned at all, since retaliation bombardment shells are "launched" by world pawns.
Also ensure bombardments from other factions' settlements do not trigger a retaliation
bombardment if the target faction isn't hostile to the owner of the tile,
and introduce a configurable retaliation fire delay that scales with how damaged a
site is.
References
Testing
Check tests you have performed: