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
This commit is contained in:
Ethan Lafrenais
2022-06-27 22:10:54 -04:00
committed by GitHub
parent 54937a95b1
commit 99f1f878b8
+6 -3
View File
@@ -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)