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

Handle being silenced during casting animation #2686

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

petchema
Copy link
Collaborator

If player is silenced, only readySpell is reset by SilenceCheck(): https://github.com/Interkarma/daggerfall-unity/blob/master/Assets/Scripts/Game/MagicAndEffects/EntityEffectManager.cs#L1941

If this happens during spellcasting animation, castInProgress is true, and stays at true after the animation is finished because the first thing PlayerSpellCasting_OnReleaseFrame() checks is whether readySpell is not null:
https://github.com/Interkarma/daggerfall-unity/blob/master/Assets/Scripts/Game/MagicAndEffects/EntityEffectManager.cs#L2101

Consequently, player cannot cast spells until (s)he reload a game.

This PR resets castInProgress unconditionally at the beginning of PlayerSpellCasting_OnReleaseFrame(), which is consistent with the animation being over.

Forums: https://forums.dfworkshop.net/viewtopic.php?t=6763

If player is silenced, only readySpell is reset by SilenceCheck():
https://github.com/Interkarma/daggerfall-unity/blob/master/Assets/Scripts/Game/MagicAndEffects/EntityEffectManager.cs#L1941

If this happens during spellcasting animation, castInProgress is true,
and stays at true after the animation is finished because the first
thing PlayerSpellCasting_OnReleaseFrame() checks is whether readySpell
is not null:
https://github.com/Interkarma/daggerfall-unity/blob/master/Assets/Scripts/Game/MagicAndEffects/EntityEffectManager.cs#L2101

Consequently, player cannot cast spells until (s)he reload a game.

This PR resets castInProgress unconditionally at the beginning of
PlayerSpellCasting_OnReleaseFrame(), which is consistent with the
animation being over.

Forums: https://forums.dfworkshop.net/viewtopic.php?t=6763
@petchema petchema added the bug label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant