Fixed crash in bhv_bowser_loop

This commit is contained in:
MysterD 2022-02-18 18:30:57 -08:00
parent 245d5009a9
commit 2378d9b230
1 changed files with 5 additions and 3 deletions

View File

@ -1246,9 +1246,11 @@ void bhv_bowser_loop(void) {
int angleToPlayer = obj_angle_to_object(o, player);
// look for animation difference and override
struct Animation* anim = o->oAnimations[networkBowserAnimationIndex];
if (anim != NULL &&o->header.gfx.unk38.curAnim != anim) {
geo_obj_init_animation(&o->header.gfx, &anim);
if (o->oAnimations != NULL && networkBowserAnimationIndex <= 26) {
struct Animation* anim = o->oAnimations[networkBowserAnimationIndex];
if (anim != NULL && o->header.gfx.unk38.curAnim != anim) {
geo_obj_init_animation(&o->header.gfx, &anim);
}
}
s16 angleToMario; // AngleToMario from Bowser's perspective