Rework spell casting animgoal#890
Draft
dolio wants to merge 1 commit intoGrognardsFromHell:masterfrom
Draft
Conversation
Contributor
Author
interrupt2.webmHere's an example of the new animation. The cleric starts casting bless, and is interrupted by the drow streaker. You can see that the cleric actually looks like he's casting a lengthy spell, and the heavenly choir only sounds once. If you try this in an unpatched game, the cleric will probably look like he's being hit with a taser, and the choir will keep playing in a glitchy-sounding loop. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR rewrites the state machine for the
ag_attempt_spell_w_cast_animanimgoal. This is responsible for the actual spell casting portion of the animation, although I don't think it's called directly, but indirectly via other goals.The new state machine is based on a lot of fiddling trying to figure out how everything fits together, and the comments try to explain how it works. The differences from the old machine are roughly as follows:
There's some other miscellaneous stuff here, too. I added some plausible names to the ASF enum, and
GetSpellAnimTypeappears to have been off by one.I've tested the new animation in controlled circumstances, but haven't played through the game extensively with it. It could use some thorough play testing when it gets included, because it's possible for certain animations to behave poorly. For instance, the
ConjurationConjuringanimation seems like it might be broken; the character just freezes in place while their arms glow, and the animation never actually has an end point. I included a work-around for this in the state machine (it skips the 'play the conjuring through at least once part'), but animations are not universal, so there could be other infinite animations that behave poorly. I could probably adjust things if more are found.