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 InstantHit crashing if blockable and target is dead #16756

Merged
merged 1 commit into from Jul 12, 2019

Conversation

@reaperrr
Copy link
Contributor

commented Jul 6, 2019

If the weapon has TargetActorCenter, the projectile is Blockable and the target dies the same tick the projectile is fired but before the 'blocked' check is performed, the target.CenterPosition lookup would crash since the target has become invalid.

Work around this by ignoring weapons' TargetActorCenter and using args.PassiveTarget position instead if the target is already dead.

Fixes #15338.

@reaperrr reaperrr added this to the Next Release milestone Jul 6, 2019

@reaperrr reaperrr force-pushed the reaperrr:fix-insta-hit branch from cdc464b to 6270a12 Jul 6, 2019

Fix InstantHit crashing if blockable and target is dead
If the weapon has TargetActorCenter, the projectile is Blockable
and the target dies the same tick the projectile is fired but before
the 'blocked' check is performed, the target.CenterPosition lookup
would crash since the target has become invalid.

Work around this by ignoring TargetActorCenter and using
args.PassiveTarget position instead if the target is already dead.

@reaperrr reaperrr force-pushed the reaperrr:fix-insta-hit branch from 6270a12 to 574f3c0 Jul 6, 2019

@pchote
pchote approved these changes Jul 7, 2019
Copy link
Member

left a comment

Looks reasonable, but not tested.

@pchote pchote added the PR: Needs +2 label Jul 7, 2019

@abcdefg30
Copy link
Member

left a comment

Couldn't reproduce the crash, but didn't spot any regressions either.

@abcdefg30 abcdefg30 merged commit 701b152 into OpenRA:bleed Jul 12, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@abcdefg30

This comment has been minimized.

Copy link
Member

commented Jul 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.