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 DamagedWithoutFoundation causing more damage than it should #10238
Conversation
It looks like the nested RunAfterTicks is simply working around some other code which uses only one RunAfterTick that otherwise overrides the animation state. Can you work out what the other code is, and fix that instead? |
00f612e
to
762d48b
Compare
Updated. I still wonder why the animation wasn't changed to "damaged-" in the first place, though. |
Confirmed that this fixes the initial flicker when repairing a newly placed structure. There is another issue however: the damage warhead always applies a fixed amount of damage, so it can still push the building below the damage threshold if it is repaired slightly and then allowed to decay again. |
@@ -125,7 +125,6 @@ public void Tick(Actor self) | |||
} | |||
|
|||
// Bonus is applied after finding players who can pay | |||
|
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.
This doesn't appear to be related to this pr at all.
Well, it works. 👍 after pchote's comments have been addressed. |
Note that i'm not asking for this to be fixed now. That would up the complexity of this pr to the point where we shouldn't take it for the release (but i'd also be okay with too, if you did want to do everything together). |
Tick caused extra damage in addition to the damage in AddedToWorld, which lead the actor to have less health than damageThreshold.
762d48b
to
fa260dd
Compare
Updated. |
👍 |
Fix DamagedWithoutFoundation causing more damage than it should
to its damaged animation.
Unfortunately I didn't find a better way to fix the issue than twoRunAfterTick
s.If we don't want to use that, I can remove the first commit, as the second one will hide the issue.
EDIT: Outdated description.