mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-13 04:39:36 +00:00
Document niche magic spell bug (#1526)
* document magic spell bug * Update src/overlays/actors/ovl_player_actor/z_player.c Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * adjust comment * fix renamed func and reformat --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
parent
5170f2de17
commit
83a13a64c7
1 changed files with 8 additions and 0 deletions
|
@ -5239,6 +5239,14 @@ void func_8083AF44(PlayState* play, Player* this, s32 magicSpell) {
|
|||
func_80835DE4(play, this, Player_Action_808507F4, 0);
|
||||
|
||||
this->actionVar1 = magicSpell - 3;
|
||||
|
||||
//! @bug `MAGIC_CONSUME_WAIT_PREVIEW` is not guaranteed to succeed.
|
||||
//! Ideally, the return value of `Magic_RequestChange` should be checked before allowing the process of
|
||||
//! using a spell to continue. If the magic state change request fails, `gSaveContext.magicTarget` will
|
||||
//! never be set correctly.
|
||||
//! When `MAGIC_STATE_CONSUME_SETUP` is set in `Player_Action_808507F4`, magic will eventually be
|
||||
//! consumed to a stale target value. If that stale target value is higher than the current
|
||||
//! magic value, it will be consumed to zero.
|
||||
Magic_RequestChange(play, sMagicSpellCosts[magicSpell], MAGIC_CONSUME_WAIT_PREVIEW);
|
||||
|
||||
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, &gPlayerAnim_link_magic_tame, 0.83f);
|
||||
|
|
Loading…
Reference in a new issue