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 DamagedWithoutFoundation causing more damage than it should #10238

Merged
merged 2 commits into from Dec 20, 2015

Conversation

abcdefg30
Copy link
Member

to its damaged animation.

Unfortunately I didn't find a better way to fix the issue than two RunAfterTicks.
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.

@pchote
Copy link
Member

pchote commented Dec 16, 2015

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?

@abcdefg30
Copy link
Member Author

Updated.
After some more debugging I found the real issue (and fixed it):
Tick already decreased the health in addition to the decrement in AddedToWorld.

I still wonder why the animation wasn't changed to "damaged-" in the first place, though.

@pchote
Copy link
Member

pchote commented Dec 19, 2015

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

Copy link
Member

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.

@obrakmann obrakmann added this to the Next release milestone Dec 19, 2015
@obrakmann
Copy link
Contributor

Well, it works. 👍 after pchote's comments have been addressed.

@pchote
Copy link
Member

pchote commented Dec 19, 2015

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.

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.
@abcdefg30
Copy link
Member Author

Updated.

@abcdefg30 abcdefg30 changed the title Fix DamagedWithoutFoundation not updating the actors initial animation Fix DamagedWithoutFoundation causing more damage than it should Dec 20, 2015
@penev92
Copy link
Member

penev92 commented Dec 20, 2015

👍

penev92 added a commit that referenced this pull request Dec 20, 2015
Fix DamagedWithoutFoundation causing more damage than it should
@penev92 penev92 merged commit 7c0b308 into OpenRA:bleed Dec 20, 2015
@abcdefg30 abcdefg30 deleted the d2kFoundationDamage branch December 20, 2015 16:13
@penev92
Copy link
Member

penev92 commented Dec 20, 2015

Changelog

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.

None yet

4 participants