mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
Fix animation in Ganon that is causing an OOB access during animation (#1764)
* Fix animation in Ganon that is causing an OOB access during animation * Fix function args
This commit is contained in:
parent
7906d70485
commit
7878b8f3e4
1 changed files with 8 additions and 0 deletions
|
@ -577,6 +577,14 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
BossGanon2_SetObjectSegment(this, globalCtx, OBJECT_GANON_ANIME3, false);
|
||||
func_8002DF54(globalCtx, &this->actor, 0x54);
|
||||
this->unk_314 = 3;
|
||||
|
||||
// At this point, the actor has Ganon's skeleton but is still playing an animation for Ganondorf. This
|
||||
// causes issues when trying to access the limb posotions as Ganon has more limbs than Ganondorf. When
|
||||
// animating, data from past the end of the animation data is accessed. This is a hack solution so
|
||||
// that we are at least playing an animation meant for Ganon. There is no visible change since Ganon is
|
||||
// off-screen. There is actually 1 frame where he is visible, and in the vanilla game he is an
|
||||
// explosion of limbs since half of them are in random positions from the junk data accessed.
|
||||
Animation_PlayOnce(&this->skelAnime, &gGanonUncurlAndFlailAnim);
|
||||
}
|
||||
// fake, tricks the compiler into using stack the way we need it to
|
||||
if (zero) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue