From 99f1f878b8fffb703e8983c72f026d02aa284453 Mon Sep 17 00:00:00 2001 From: Ethan Lafrenais <6609531+Francessco121@users.noreply.github.com> Date: Mon, 27 Jun 2022 22:10:54 -0400 Subject: [PATCH] Fix "last-hit" animations not playing for robotboss (#1569) * Fix "last-hit" animations not playing for robotboss This was causing destroyed parts of the robot to float in the air not moving for a moment. * Add comments --- goal_src/levels/finalboss/robotboss.gc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/goal_src/levels/finalboss/robotboss.gc b/goal_src/levels/finalboss/robotboss.gc index a9b74eb269..24f30fa182 100644 --- a/goal_src/levels/finalboss/robotboss.gc +++ b/goal_src/levels/finalboss/robotboss.gc @@ -1038,7 +1038,8 @@ (send-event (ppointer->process (-> self parent)) 'flash 255.0) (send-event (ppointer->process gp-1) 'anim-mode 'play1) (send-event (ppointer->process gp-1) 'rot-quat (-> self root-override quat)) - (send-event (ppointer->process gp-1) 'art-joint-anim "robotboss-yelloweco-yellow-last-hit") + ;; the zero passed here was missing in the original game, but is a bug that causes undefined behavior + (send-event (ppointer->process gp-1) 'art-joint-anim "robotboss-yelloweco-yellow-last-hit" 0) ) ) ((and (> (-> self hits-to-go) 0) (-> self took-hit)) @@ -1636,7 +1637,8 @@ (send-event (ppointer->process (-> self parent)) 'flash 255.0) (send-event (ppointer->process gp-1) 'anim-mode 'play1) (send-event (ppointer->process gp-1) 'rot-quat (-> self root-override quat)) - (send-event (ppointer->process gp-1) 'art-joint-anim "robotboss-redeco-red-last-hit") + ;; the zero passed here was missing in the original game, but is a bug that causes undefined behavior + (send-event (ppointer->process gp-1) 'art-joint-anim "robotboss-redeco-red-last-hit" 0) ) ) ((and (> (-> self hits-to-go) 0) (-> self took-hit)) @@ -2609,7 +2611,8 @@ (send-event (ppointer->process (-> self parent)) 'flash 255.0) (send-event (ppointer->process gp-2) 'anim-mode 'play1) (send-event (ppointer->process gp-2) 'rot-quat (-> self root-override quat)) - (send-event (ppointer->process gp-2) 'art-joint-anim "robotboss-blueeco-blue-last-hit") + ;; the zero passed here was missing in the original game, but is a bug that causes undefined behavior + (send-event (ppointer->process gp-2) 'art-joint-anim "robotboss-blueeco-blue-last-hit" 0) ) ) ((-> self took-hit)