jak-project/goal_src/jak1/levels/sunken/orbit-plat.gc
Tyler Wilding c162c66118
g/j1: Cleanup all main issues in the formatter and format all of goal_src/jak1 (#3535)
This PR does two main things:
1. Work through the main low-hanging fruit issues in the formatter
keeping it from feeling mature and usable
2. Iterate and prove that point by formatting all of the Jak 1 code
base. **This has removed around 100K lines in total.**
- The decompiler will now format it's results for jak 1 to keep things
from drifting back to where they were. This is controlled by a new
config flag `format_code`.

How am I confident this hasn't broken anything?:
- I compiled the entire project and stored it's `out/jak1/obj` files
separately
- I then recompiled the project after formatting and wrote a script that
md5's each file and compares it (`compare-compilation-outputs.py`
- The results (eventually) were the same:

![Screenshot 2024-05-25
132900](https://github.com/open-goal/jak-project/assets/13153231/015e6f20-8d19-49b7-9951-97fa88ddc6c2)
> This proves that the only difference before and after is non-critical
whitespace for all code/macros that is actually in use.

I'm still aware of improvements that could be made to the formatter, as
well as general optimization of it's performance. But in general these
are for rare or non-critical situations in my opinion and I'll work
through them before doing Jak 2. The vast majority looks great and is
working properly at this point. Those known issues are the following if
you are curious:

![image](https://github.com/open-goal/jak-project/assets/13153231/0edfaba1-6d36-40f5-ab23-0642209867c4)
2024-06-05 22:17:31 -04:00

520 lines
23 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
(bundles "SUN.DGO")
(require "engine/nav/navigate.gc")
(require "engine/common-obs/baseplat.gc")
(declare-type orbit-plat baseplat)
;; DECOMP BEGINS
(deftype orbit-plat-bottom (process-drawable)
((parent-override (pointer orbit-plat) :overlay-at parent)
(part2 sparticle-launch-control))
(:methods
(orbit-plat-bottom-method-20 (_type_ vector vector) none))
(:states
orbit-plat-bottom-idle))
(defskelgroup *orbit-plat-bottom-sg*
orbit-plat-bottom
orbit-plat-bottom-lod0-jg
orbit-plat-bottom-idle-ja
((orbit-plat-bottom-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 2.8))
(deftype orbit-plat (baseplat)
((other entity-actor)
(rot-dir float)
(reset-trans vector :inline)
(is-reset? symbol)
(reset-length float)
(timeout float)
(plat-status uint64))
(:methods
(orbit-plat-method-27 (_type_) symbol)
(orbit-plat-method-28 (_type_) symbol))
(:states
orbit-plat-idle
orbit-plat-reset
orbit-plat-riding
orbit-plat-rotating
orbit-plat-still
orbit-plat-wait-for-other))
(defskelgroup *orbit-plat-sg*
orbit-plat
orbit-plat-lod0-jg
orbit-plat-idle-ja
((orbit-plat-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 3.4))
(defpartgroup group-orbit-plat-jet
:id 440
:bounds (static-bspherem 0 0 0 6)
:parts
((sp-item 1715 :fade-after (meters 100) :falloff-to (meters 120) :period (seconds 0.5) :length (seconds 0.25))
(sp-item 1715 :fade-after (meters 100) :falloff-to (meters 120) :period (seconds 0.25) :length (seconds 0.32))
(sp-item 1715 :fade-after (meters 140) :falloff-to (meters 160) :period (seconds 0.3) :length (seconds 0.2))
(sp-item 1716 :fade-after (meters 100) :falloff-to (meters 100))))
(defpart 1716
:init-specs
((:texture (new 'static 'texture-id :page #x2))
(:num 0.0 1.0)
(:scale-x (meters 1) (meters 0.5))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 0.0)
(:g 64.0)
(:b 48.0)
(:a 32.0 96.0)
(:vel-z (meters 0.02) (meters 0.0033333334))
(:scalevel-x (meters -0.013333334) (meters 0.006666667))
(:rotvel-z (degrees -1.2) (degrees 2.4))
(:scalevel-y :copy scalevel-x)
(:fade-a -1.7066667)
(:timer (seconds 0.25))
(:flags (bit2))
(:rotate-y (degrees 0) (degrees 15))))
(defpart 1715
:init-specs
((:texture (new 'static 'texture-id :page #x2))
(:num 1.0 2.0)
(:sound (static-sound-spec "steam-medium" :num 0.05 :volume 80.0))
(:scale-x (meters 0.75) (meters 0.75))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 0.0)
(:g 96.0)
(:b 128.0)
(:a 16.0 32.0)
(:vel-z (meters 0.053333335) (meters 0.0033333334))
(:scalevel-x (meters -0.013333334) (meters 0.006666667))
(:rotvel-z (degrees -1.2) (degrees 2.4))
(:scalevel-y :copy scalevel-x)
(:fade-a -0.8)
(:friction 0.96)
(:timer (seconds 0.25))
(:flags (bit2))
(:rotate-y (degrees 0) (degrees 15))))
(defpart 1717
:init-specs
((:texture (new 'static 'texture-id :index #xf :page #x2))
(:num 1.0 3.0)
(:scale-x (meters 1.7) (meters 0.3))
(:scale-y :copy scale-x)
(:r 32.0)
(:g 16.0 96.0)
(:b 255.0)
(:a 64.0)
(:vel-z (meters 0.45) (meters 0.05))
(:fade-r -0.08888889)
(:timer (seconds 1.2))
(:flags (bit2 launch-along-z))
(:conerot-x (degrees 0))
(:conerot-y (degrees 0))
(:conerot-radius (meters -3) (meters 4))))
(defmethod orbit-plat-bottom-method-20 ((this orbit-plat-bottom) (arg0 vector) (arg1 vector))
(let* ((s5-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0))
(f30-0 (vector-length s5-1)))
(let ((f28-0 (* 0.0005022321 f30-0)))
(set! (-> *part-id-table* 1717 init-specs 13 initial-valuef) (vector-y-angle s5-1))
(set! (-> *part-id-table* 1717 init-specs 12 initial-valuef) (- (vector-x-angle s5-1)))
(set! (-> *part-id-table* 1717 init-specs 9 initial-valuef) (/ -32.0 f28-0))
(set! (-> *part-id-table* 1717 init-specs 10 initial-valuef) (the-as float (the int f28-0))))
(set! (-> *part-id-table* 1717 init-specs 1 random-rangef) (* 0.000009494358 f30-0)))
(launch-particles (-> *part-id-table* 1717) arg0)
0
(none))
(defstate orbit-plat-bottom-idle (orbit-plat-bottom)
:code
(behavior ()
(loop
(set! (-> self root trans quad) (-> self parent-override 0 root trans quad))
(+! (-> self root trans y) -5324.8)
(spawn (-> self part2) (-> self root trans))
(let* ((a0-6 (-> self parent-override 0 other))
(v1-9 (if a0-6 (-> a0-6 extra process))))
(when v1-9
(let ((f30-0 (atan (- (-> (the-as orbit-plat v1-9) root trans x) (-> self root trans x))
(- (-> (the-as orbit-plat v1-9) root trans z) (-> self root trans z)))))
(quaternion-axis-angle! (-> self root quat) 0.0 1.0 0.0 f30-0)
(let ((v1-16 (-> self parent-override 0 plat-status))
(f30-1 (+ 16384.0 f30-0)))
(cond
((= v1-16 2)
(let ((gp-0 (new 'stack-no-clear 'vector)))
(set-vector! gp-0 0.0 -2048.0 8192.0 1.0)
(if (< (-> self parent-override 0 rot-dir) 0.0) (set! f30-1 (+ 32768.0 f30-1)))
(vector-rotate-around-y! gp-0 gp-0 f30-1)
(set! (-> *part-id-table* 1716 init-specs 16 initial-valuef) f30-1)
(set! (-> *part-id-table* 1715 init-specs 18 initial-valuef) f30-1)
(vector+! gp-0 gp-0 (-> self root trans))
(spawn (-> self part) gp-0)))
(else
(let* ((a0-18 (-> self parent-override 0 other))
(v1-32 (if a0-18 (-> a0-18 extra process))))
(when (and v1-32 (= (-> (the-as orbit-plat v1-32) plat-status) 2))
(let ((gp-1 (new 'stack-no-clear 'vector))
(s5-0 (new 'stack-no-clear 'vector)))
(let ((s4-0 (new 'stack-no-clear 'vector)))
(set! (-> gp-1 quad) (-> self root trans quad))
(+! (-> gp-1 y) -2048.0)
(set! (-> s5-0 quad) (-> (the-as orbit-plat v1-32) root trans quad))
(+! (-> s5-0 y) -7372.8)
(vector-! s4-0 s5-0 gp-1)
(vector-normalize! s4-0 1.0)
(vector+*! s5-0 gp-1 s4-0 26624.0)
(vector+*! gp-1 gp-1 s4-0 8192.0))
(orbit-plat-bottom-method-20 self gp-1 s5-0))))))))))
(suspend)))
:post ja-post)
(defmethod relocate ((this orbit-plat-bottom) (arg0 int))
(if (nonzero? (-> this part2)) (&+! (-> this part2) arg0))
(the-as orbit-plat-bottom ((method-of-type process-drawable relocate) this arg0)))
(defmethod deactivate ((this orbit-plat-bottom))
(if (nonzero? (-> this part2)) (kill-and-free-particles (-> this part2)))
((method-of-type process-drawable deactivate) this)
(none))
(defbehavior orbit-plat-bottom-init-by-other orbit-plat-bottom ((arg0 entity-actor) (arg1 orbit-plat))
(set! (-> self entity) arg0)
(logior! (-> self mask) (process-mask platform))
(set! (-> self root) (new 'process 'trsqv))
(set! (-> self root trans quad) (-> arg1 root trans quad))
(quaternion-copy! (-> self root quat) (-> arg1 root quat))
(set! (-> self root scale quad) (-> arg1 root scale quad))
(+! (-> self root trans y) -5324.8)
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 440) self))
(set! (-> self part2) (create-launch-control (-> *part-group-id-table* 107) self))
(initialize-skeleton self *orbit-plat-bottom-sg* '())
(ja-channel-set! 1)
(ja :group! orbit-plat-bottom-idle-ja :num! min)
(go orbit-plat-bottom-idle)
(none))
(defstate orbit-plat-idle (orbit-plat)
:event
(behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('bonk) (baseplat-method-22 self))
(('go) (go orbit-plat-rotating))
(('query-reset)
(if (not (-> self is-reset?)) (go orbit-plat-reset))
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 0)
(set! (-> a1-1 message) 'reset)
(let ((t9-3 send-event-function)
(v1-8 (-> self other)))
(t9-3 (if v1-8 (-> v1-8 extra process)) a1-1))))
(('reset) (go orbit-plat-reset))))
:trans plat-trans
:code
(behavior ()
(set! (-> self plat-status) (the-as uint 0))
(ja-no-eval :num! (seek! 0.0))
(dotimes (gp-0 2)
(transform-post)
(suspend)
(if (not (ja-done? 0)) (ja :num! (seek! 0.0))))
(loop
(when (nonzero? (-> self root riders num-riders))
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-2 from) self)
(set! (-> a1-2 num-params) 0)
(set! (-> a1-2 message) 'go)
(let ((t9-4 send-event-function)
(v1-14 (-> self other)))
(t9-4 (if v1-14 (-> v1-14 extra process)) a1-2)))
(go orbit-plat-riding))
(suspend)
(if (not (ja-done? 0)) (ja :num! (seek! 0.0)))
(when (not (-> self is-reset?))
(let ((a1-4 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-4 from) self)
(set! (-> a1-4 num-params) 0)
(set! (-> a1-4 message) 'query-reset)
(let ((t9-8 send-event-function)
(v1-26 (-> self other)))
(t9-8 (if v1-26 (-> v1-26 extra process)) a1-4))))))
:post plat-post)
(defmethod orbit-plat-method-28 ((this orbit-plat))
(when (time-elapsed? (-> this state-time) (the int (* 300.0 (-> this timeout))))
(cond
(*target*
(let ((s5-0 (target-pos 0)))
(if (or (>= (vector-vector-xz-distance s5-0 (-> this root trans)) 102400.0)
(>= (- (-> this root trans y) (-> s5-0 y)) 16384.0))
(return #t))))
(else (return #t))))
#f)
(defstate orbit-plat-still (orbit-plat)
:event
(behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('bonk) (baseplat-method-22 self))
(('go) (go orbit-plat-rotating))))
:trans plat-trans
:code
(behavior ()
(set! (-> self plat-status) (the-as uint 0))
(set-time! (-> self state-time))
(ja-no-eval :num! (seek! 0.0))
(until (orbit-plat-method-28 self)
(when (nonzero? (-> self root riders num-riders))
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 0)
(set! (-> a1-1 message) 'go)
(let ((t9-1 send-event-function)
(v1-10 (-> self other)))
(t9-1 (if v1-10 (-> v1-10 extra process)) a1-1)))
(go orbit-plat-riding))
(suspend)
(if (not (ja-done? 0)) (ja :num! (seek! 0.0))))
(go orbit-plat-idle))
:post plat-post)
(defstate orbit-plat-riding (orbit-plat)
:event plat-event
:trans plat-trans
:code
(behavior ()
(set! (-> self plat-status) (the-as uint 1))
(ja-no-eval :num! (seek!))
(loop
(when (zero? (-> self root riders num-riders))
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 0)
(set! (-> a1-1 message) 'stop)
(let ((t9-1 send-event-function)
(v1-13 (-> self other)))
(t9-1 (if v1-13 (-> v1-13 extra process)) a1-1)))
(go orbit-plat-still))
(suspend)
(if (not (ja-done? 0)) (ja :num! (seek!)))))
:post plat-post)
(defun get-rotate-point! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 float) (arg5 float))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(let ((s2-0 (new 'stack-no-clear 'vector)))
(vector-! s5-0 arg2 arg1)
(when (!= arg4 0.0)
(set! (-> s2-0 x) (* arg4 (-> s5-0 z)))
(set! (-> s2-0 y) 0.0)
(set! (-> s2-0 z) (- (* arg4 (-> s5-0 x))))
(vector-normalize! s2-0 (* arg5 (seconds-per-frame)))
(+! (-> s5-0 x) (-> s2-0 x))
(+! (-> s5-0 z) (-> s2-0 z))))
(vector-normalize! s5-0 (the-as float arg3))
(vector+! arg0 arg1 s5-0))
arg0)
(defun get-nav-point! ((arg0 vector) (arg1 orbit-plat) (arg2 vector) (arg3 float))
(set! (-> arg1 nav target-pos quad) (-> arg2 quad))
(logclear! (-> arg1 nav flags) (nav-control-flags navcf19))
(nav-control-method-11 (-> arg1 nav) (-> arg1 nav target-pos))
(let ((f0-0 (vector-length (-> arg1 nav travel))))
(if (< arg3 f0-0) (set! f0-0 arg3))
(vector-normalize! (-> arg1 nav travel) (* f0-0 (seconds-per-frame))))
(set! (-> arg0 x) (+ (-> arg1 root trans x) (-> arg1 nav travel x)))
(set! (-> arg0 y) (-> arg1 root trans x))
(set! (-> arg0 z) (+ (-> arg1 root trans z) (-> arg1 nav travel z)))
arg0)
(defstate orbit-plat-rotating (orbit-plat)
:event
(behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('bonk) (baseplat-method-22 self))
(('stop) (go orbit-plat-still))))
:trans plat-trans
:code
(behavior ()
(set! (-> self plat-status) (the-as uint 2))
(set! (-> self is-reset?) #f)
(let ((gp-0 (new 'stack-no-clear 'vector)))
0.0
(let ((a0-0 (new 'stack-no-clear 'vector))
(s5-0 (new 'stack-no-clear 'vector)))
(let ((v1-1 gp-0)
(a1-0 (-> self other)))
(set! (-> v1-1 quad) (-> (the-as orbit-plat (if a1-0 (-> a1-0 extra process))) root trans quad)))
(vector-! a0-0 (-> self basetrans) gp-0)
(let ((f30-0 (vector-length a0-0)))
(set! (-> self reset-length) f30-0)
(ja-no-eval :num! (seek! 0.0))
(label cfg-3)
(dotimes (s4-0 2)
(get-rotate-point! s5-0 gp-0 (-> self basetrans) (the-as vector f30-0) (-> self rot-dir) 40960.0)
(b! (not (nav-control-method-16 (-> self nav) s5-0)) cfg-6 :delay (empty-form))
(set! (-> self basetrans quad) (-> s5-0 quad))
(b! #t cfg-9 :delay (nop!))
(label cfg-6)
(set! (-> self rot-dir) (- (-> self rot-dir)))))))
(label cfg-9)
(suspend)
(if (not (ja-done? 0)) (ja :num! (seek! 0.0)))
(b! #t cfg-3 :delay (nop!)))
:post plat-post)
;; WARN: disable def twice: 132. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
(defmethod orbit-plat-method-27 ((this orbit-plat))
(local-vars (v0-11 object))
(let* ((v1-0 (-> this other))
(s5-0 (if v1-0 (-> v1-0 extra process))))
(the-as symbol
(cond
((and s5-0
(< (vector-vector-xz-distance (the-as vector (&-> s5-0 stack 96)) (the-as vector (&-> s5-0 stack 128)))
(vector-vector-xz-distance (-> this basetrans) (-> this reset-trans))))
(cond
((-> (the-as orbit-plat s5-0) is-reset?)
(when (!= (-> this plat-status) 2)
(set! (-> this plat-status) (the-as uint 2))
(let ((f30-1 (atan (- (-> this basetrans x) (-> (the-as orbit-plat s5-0) basetrans x))
(- (-> this basetrans z) (-> (the-as orbit-plat s5-0) basetrans z))))
(f0-9 (atan (- (-> this reset-trans x) (-> (the-as orbit-plat s5-0) basetrans x))
(- (-> this reset-trans z) (-> (the-as orbit-plat s5-0) basetrans z)))))
(if (>= (deg- f0-9 f30-1) 0.0) (set! (-> this rot-dir) 1.0) (set! (-> this rot-dir) -1.0))))
(let ((s4-0 (new 'stack-no-clear 'vector)))
0.0
(let ((a0-7 (new 'stack-no-clear 'vector))
(s5-1 (new 'stack-no-clear 'vector)))
(let ((v1-9 s4-0)
(a1-5 (-> this other)))
(set! (-> v1-9 quad) (-> (the-as orbit-plat (if a1-5 (-> a1-5 extra process))) root trans quad)))
(vector-! a0-7 (-> this basetrans) s4-0)
(let ((f30-2 (vector-length a0-7)))
(get-rotate-point! s5-1 s4-0 (-> this basetrans) (the-as vector f30-2) (-> this rot-dir) 40960.0)
(cond
((nav-control-method-16 (-> this nav) s5-1) (set! (-> this basetrans quad) (-> s5-1 quad)))
(else
(set! (-> this rot-dir) (- (-> this rot-dir)))
(get-rotate-point! s5-1 s4-0 (-> this basetrans) (the-as vector f30-2) (-> this rot-dir) 40960.0)
(if (nav-control-method-16 (-> this nav) s5-1) (set! (-> this basetrans quad) (-> s5-1 quad))))))))
(when (>= 614.4 (vector-vector-xz-distance (-> this basetrans) (-> this reset-trans)))
(set! v0-11 (logior (nav-control-flags navcf19) (-> this nav flags)))
(set! (-> this nav flags) (the-as nav-control-flags v0-11))
v0-11))
(else
(let ((s5-2 (new 'stack-no-clear 'vector)))
(let ((s4-1 (new 'stack-no-clear 'vector)))
(get-nav-point! s5-2 this (-> this reset-trans) 40960.0)
(let ((v1-20 s4-1)
(a0-19 (-> this other)))
(set! (-> v1-20 quad) (-> (the-as orbit-plat (if a0-19 (-> a0-19 extra process))) root trans quad)))
(set! (-> s5-2 y) (-> s4-1 y))
(vector-! s5-2 s5-2 s4-1)
(vector-normalize! s5-2 (-> this reset-length))
(vector+! s5-2 s5-2 s4-1)
(when (not (nav-control-method-16 (-> this nav) s5-2))
(logclear! (-> this nav flags) (nav-control-flags navcf19))
(get-rotate-point! s5-2 s4-1 (-> this basetrans) (the-as vector (-> this reset-length)) 0.0 40960.0)
(when (not (nav-control-method-16 (-> this nav) s5-2))
(get-rotate-point! s5-2 s4-1 (-> this basetrans) (the-as vector (-> this reset-length)) (-> this rot-dir) 40960.0)
(when (not (nav-control-method-16 (-> this nav) s5-2))
(set! (-> this rot-dir) (- (-> this rot-dir)))
(get-rotate-point! s5-2 s4-1 (-> this basetrans) (the-as vector (-> this reset-length)) (-> this rot-dir) 40960.0)))))
(set! (-> s5-2 y) (-> this basetrans y))
(set! v0-11 (-> this basetrans))
(set! (-> (the-as vector v0-11) quad) (-> s5-2 quad)))
v0-11)))
(else
(let ((s5-3 (new 'stack-no-clear 'vector)))
(set! (-> s5-3 quad) (-> this basetrans quad))
(get-nav-point! (-> this basetrans) this (-> this reset-trans) 40960.0)
(set! (-> this basetrans y) (-> s5-3 y))))))))
(defstate orbit-plat-reset (orbit-plat)
:event
(behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('bonk) (baseplat-method-22 self))
(('go) (go orbit-plat-rotating))))
:trans plat-trans
:code
(behavior ()
(set! (-> self plat-status) (the-as uint 3))
(logclear! (-> self nav flags) (nav-control-flags navcf19))
(ja-no-eval :num! (seek! 0.0))
(while (not (logtest? (nav-control-flags navcf19) (-> self nav flags)))
(orbit-plat-method-27 self)
(when (nonzero? (-> self root riders num-riders))
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 0)
(set! (-> a1-1 message) 'go)
(let ((t9-2 send-event-function)
(v1-13 (-> self other)))
(t9-2 (if v1-13 (-> v1-13 extra process)) a1-1)))
(go orbit-plat-riding))
(suspend)
(if (not (ja-done? 0)) (ja :num! (seek! 0.0))))
(set! (-> self is-reset?) #t)
(go orbit-plat-idle))
:post plat-post)
(defstate orbit-plat-wait-for-other (orbit-plat)
:code
(behavior ()
(set! (-> self plat-status) (the-as uint 0))
(ja-no-eval :num! (seek! 0.0))
(loop
(let ((v1-3 (-> self other))) (when (if v1-3 (-> v1-3 extra process)) (suspend) (go orbit-plat-idle)))
(suspend)
(if (not (ja-done? 0)) (ja :num! (seek! 0.0)))))
:post ja-post)
(defmethod init-from-entity! ((this orbit-plat) (arg0 entity-actor))
(set! (-> this plat-status) (the-as uint 0))
(logior! (-> this mask) (process-mask platform))
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) (the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing))
(alloc-riders s4-0 1)
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> s3-0 prim-core collide-as) (collide-kind ground-object))
(set! (-> s3-0 collide-with) (collide-kind target))
(set! (-> s3-0 prim-core action) (collide-action solid rider-plat-sticky))
(set! (-> s3-0 prim-core offense) (collide-offense indestructible))
(set! (-> s3-0 transform-index) 3)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 13926.4)
(set-root-prim! s4-0 s3-0))
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(backup-collide-with-as s4-0)
(set! (-> this root) s4-0))
(process-drawable-from-entity! this arg0)
(initialize-skeleton this *orbit-plat-sg* '())
(logior! (-> this skel status) (janim-status inited))
(ja-channel-set! 1)
(let ((s4-1 (-> this skel root-channel 0)))
(joint-control-channel-group-eval! s4-1 (the-as art-joint-anim (-> this draw art-group data 2)) num-func-identity)
(set! (-> s4-1 frame-num) 0.0))
(ja-post)
(update-transforms! (-> this root))
(baseplat-method-21 this)
(set! (-> this nav) (new 'process 'nav-control (-> this root) 16 40960.0))
(logior! (-> this nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
(set! (-> this nav gap-event) 'blocked)
(set! (-> this other) (entity-actor-lookup arg0 'alt-actor 0))
(let ((f0-7 (res-lump-float arg0 'scale :default 1.0))) (set-vector! (-> this root scale) f0-7 f0-7 f0-7 1.0))
(set! (-> this timeout) (res-lump-float arg0 'timeout :default 10.0))
(set! (-> this rot-dir) 1.0)
(set! (-> this reset-trans quad) (-> this basetrans quad))
(set! (-> this is-reset?) #t)
(process-spawn orbit-plat-bottom (-> this entity) this :to this)
(go orbit-plat-wait-for-other)
(none))