jak-project/goal_src/levels/beach/lurkerworm.gc
ManDude c245f37feb
[decomp] joint and related (#1003)
* update jak 2 config and hack to make game text dumpable

* update stuff

* update src

* do `cspace<-parented-transformq-joint!`

* progress.... kind of...

* more drawable stuff

* clagng

* bones begin

* more bones

* even more bones

* everything builds

* touches

* errors

* ?

* fix `quicksandlurker`

* updates

* update refs

* more fixes

* update refs
2021-12-26 11:43:16 -05:00

733 lines
28 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: lurkerworm.gc
;; name in dgo: lurkerworm
;; dgos: BEA, L1
(define-extern *lurkerworm-sg* skeleton-group)
;; DECOMP BEGINS
(deftype lurkerworm (process-drawable)
((root-override collide-shape-moving :offset 112)
(twister twister :offset-assert 176)
(head-tilt float :offset-assert 180)
(strike-count int32 :offset-assert 184)
(angle float :offset-assert 188)
(vulnerable symbol :offset-assert 192)
(part2 sparticle-launch-control :offset-assert 196)
)
:heap-base #x60
:method-count-assert 22
:size-assert #xc8
:flag-assert #x16006000c8
(:methods
(TODO-RENAME-20 (_type_) none 20)
(particle-effect (_type_) none 21)
)
(:states
lurkerworm-die
lurkerworm-idle
lurkerworm-rest
lurkerworm-rise
lurkerworm-sink
lurkerworm-spot
lurkerworm-strike
)
)
(defmethod relocate lurkerworm ((obj lurkerworm) (arg0 int))
(if (nonzero? (-> obj part2))
(&+! (-> obj part2) arg0)
)
(if (nonzero? (-> obj twister))
(&+! (-> obj twister) arg0)
)
(the-as lurkerworm ((method-of-type process-drawable relocate) obj arg0))
)
(defmethod deactivate lurkerworm ((obj lurkerworm))
(if (nonzero? (-> obj part2))
(kill-and-free-particles (-> obj part2))
)
((method-of-type process-drawable deactivate) obj)
(none)
)
(defskelgroup *lurkerworm-sg* lurkerworm
0
3
((1 (meters 999999)))
:bounds (static-spherem 0 2 0 6.5)
:longest-edge (meters 1.5)
)
(set! (-> *part-group-id-table* 157)
(new 'static 'sparticle-launch-group
:length 4
:duration #xbb8
:linger-duration #x5dc
:flags (sp-group-flag use-local-clock)
:name "group-beach-sandworm"
:launcher
(new 'static 'inline-array sparticle-group-item 4
(sp-item 656 :fade-after (meters 90.0) :period 900 :length 300)
(sp-item 657 :fade-after (meters 100.0) :period 900 :length 390)
(sp-item 658 :fade-after (meters 150.0) :period 900 :length 420 :offset 120)
(sp-item 659 :fade-after (meters 60.0) :period 900 :length 420 :offset 120)
)
:bounds (new 'static 'sphere :w 24576.0)
)
)
(set! (-> *part-group-id-table* 158)
(new 'static 'sparticle-launch-group
:length 3
:duration #xbb8
:linger-duration #x5dc
:flags (sp-group-flag use-local-clock)
:name "group-beach-sandworm-norocks"
:launcher
(new 'static 'inline-array sparticle-group-item 3
(sp-item 656 :fade-after (meters 90.0) :period 900 :length 300)
(sp-item 658 :fade-after (meters 150.0) :period 900 :length 420 :offset 120)
(sp-item 659 :fade-after (meters 60.0) :period 900 :length 420 :offset 120)
)
:bounds (new 'static 'sphere :w 24576.0)
)
)
(set! (-> *part-id-table* 656) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 21
(sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
(sp-flt spt-num 4.0)
(sp-rnd-flt spt-x (meters 3.0) (meters 5.0) 1.0)
(sp-flt spt-y (meters 1.0))
(sp-rnd-flt spt-scale-x (meters 1.0) (meters 2.0) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 130.0 20.0 1.0)
(sp-rnd-flt spt-g 90.0 20.0 1.0)
(sp-rnd-flt spt-b 50.0 8.0 1.0)
(sp-flt spt-a 0.0)
(sp-flt spt-vel-x (meters -0.02))
(sp-flt spt-vel-y (meters -0.0033333334))
(sp-rnd-flt spt-rotvel-z (degrees -0.15) (degrees 0.3) 1.0)
(sp-flt spt-fade-a 0.21333334)
(sp-int spt-timer 900)
(sp-cpuinfo-flags bit2 bit12)
(sp-int-plain-rnd spt-next-time 90 59 1)
(sp-launcher-by-id spt-next-launcher 660)
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 360.0) 1.0)
(sp-end)
)
)
)
(set! (-> *part-id-table* 660)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 2 (sp-flt spt-fade-a -0.21333334) (sp-end))
)
)
(set! (-> *part-id-table* 658) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 19
(sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
(sp-flt spt-num 0.4)
(sp-rnd-flt spt-x (meters 0.0) (meters 1.0) 1.0)
(sp-rnd-flt spt-scale-x (meters 2.0) (meters 1.0) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 90.0 60.0 1.0)
(sp-rnd-flt spt-g 90.0 10.0 1.0)
(sp-rnd-flt spt-b 50.0 8.0 1.0)
(sp-flt spt-a 0.0)
(sp-rnd-flt spt-vel-x (meters 0.0033333334) (meters 0.0033333334) 1.0)
(sp-flt spt-vel-y (meters 0.026666667))
(sp-rnd-int-flt spt-rotvel-z (degrees -0.3) 1 109.22667)
(sp-flt spt-fade-a 0.32)
(sp-flt spt-accel-y -4.096)
(sp-int spt-timer 300)
(sp-cpuinfo-flags bit2 bit12)
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 360.0) 1.0)
(sp-end)
)
)
)
(set! (-> *part-id-table* 659) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 19
(sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
(sp-flt spt-num 0.6)
(sp-rnd-flt spt-x (meters 0.0) (meters 1.0) 1.0)
(sp-rnd-flt spt-scale-x (meters 1.0) (meters 1.0) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 45.0 30.0 1.0)
(sp-rnd-flt spt-g 45.0 5.0 1.0)
(sp-rnd-flt spt-b 25.0 4.0 1.0)
(sp-flt spt-a 0.0)
(sp-rnd-flt spt-vel-x (meters 0.0033333334) (meters 0.0033333334) 1.0)
(sp-flt spt-vel-y (meters 0.026666667))
(sp-rnd-int-flt spt-rotvel-z (degrees -0.3) 1 109.22667)
(sp-flt spt-fade-a 0.42666668)
(sp-flt spt-accel-y -4.096)
(sp-int spt-timer 300)
(sp-cpuinfo-flags bit2 bit12)
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 360.0) 1.0)
(sp-end)
)
)
)
(set! (-> *part-id-table* 657) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 18
(sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
(sp-flt spt-num 0.5)
(sp-rnd-flt spt-x (meters 0.0) (meters 1.0) 1.0)
(sp-rnd-flt spt-scale-x (meters 0.05) (meters 0.4) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 75.0 45.0 1.0)
(sp-rnd-flt spt-g 75.0 10.0 1.0)
(sp-rnd-flt spt-b 40.0 6.0 1.0)
(sp-flt spt-a 96.0)
(sp-rnd-flt spt-vel-x (meters 0.0033333334) (meters 0.0033333334) 1.0)
(sp-rnd-flt spt-vel-y (meters 0.013333334) (meters 0.026666667) 1.0)
(sp-rnd-int-flt spt-rotvel-z (degrees -0.3) 1 109.22667)
(sp-flt spt-accel-y -4.096)
(sp-int spt-timer 450)
(sp-cpuinfo-flags bit2 bit12)
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 360.0) 1.0)
(sp-end)
)
)
)
(set! (-> *part-id-table* 661) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 20
(sp-tex spt-texture (new 'static 'texture-id :index #x19 :page #x2))
(sp-flt spt-num 0.1)
(sp-rnd-flt spt-x (meters -0.5) (meters 1.0) 1.0)
(sp-rnd-flt spt-z -2048.0 4096.0 1.0)
(sp-rnd-flt spt-scale-x (meters 2.0) (meters 1.0) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 90.0 60.0 1.0)
(sp-rnd-flt spt-g 90.0 10.0 1.0)
(sp-rnd-flt spt-b 50.0 8.0 1.0)
(sp-flt spt-a 0.0)
(sp-rnd-flt spt-vel-x (meters 0.0033333334) (meters 0.00083333335) 1.0)
(sp-rnd-int-flt spt-rotvel-z (degrees -0.3) 1 109.22667)
(sp-flt spt-fade-a 0.21333334)
(sp-flt spt-accel-y -0.54613334)
(sp-int spt-timer 600)
(sp-cpuinfo-flags bit2 bit12)
(sp-int spt-next-time 150)
(sp-launcher-by-id spt-next-launcher 662)
(sp-end)
)
)
)
(set! (-> *part-id-table* 662)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 2 (sp-flt spt-fade-a -0.10666667) (sp-end))
)
)
(defmethod TODO-RENAME-20 lurkerworm ((obj lurkerworm))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(vector-! s5-0 (target-pos 0) (-> obj root-override trans))
(set-target! (-> obj twister) (atan (-> s5-0 x) (-> s5-0 z)))
(TODO-RENAME-11 (-> obj twister))
(let* ((f0-5 (sqrtf (+ (* (-> s5-0 x) (-> s5-0 x)) (* (-> s5-0 z) (-> s5-0 z)))))
(f0-6 (atan (-> s5-0 y) f0-5))
)
(set! (-> obj head-tilt) (seek (-> obj head-tilt) f0-6 (* 5461.3335 (-> *display* seconds-per-frame))))
)
)
(set! (-> obj head-tilt) (fmin 8192.0 (fmax -5461.3335 (-> obj head-tilt))))
0
(none)
)
(defbehavior lurkerworm-prebind-function lurkerworm ((arg0 process) (arg1 int) (arg2 lurkerworm))
(let ((v1-0 arg2)
(s5-0 (new 'stack-no-clear 'quaternion))
(gp-0 (&-> arg0 stack 324))
)
(quaternion-axis-angle! s5-0 -1.0 0.0 0.0 (-> v1-0 head-tilt))
(quaternion*! (the-as quaternion gp-0) (the-as quaternion gp-0) s5-0)
)
0
(none)
)
(defun lurkerworm-joint-callback ((arg0 lurkerworm))
(let ((a1-0 arg0))
(TODO-RENAME-12 (-> a1-0 twister) a1-0)
)
0
(none)
)
(defmethod particle-effect lurkerworm ((obj lurkerworm))
(let ((a2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj node-list data 5))))
(sp-launch-particles-var
*sp-particle-system-2d*
(-> *part-id-table* 661)
a2-0
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
)
(let ((a2-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj node-list data 6))))
(sp-launch-particles-var
*sp-particle-system-2d*
(-> *part-id-table* 661)
a2-1
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
)
(let ((a2-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj node-list data 7))))
(sp-launch-particles-var
*sp-particle-system-2d*
(-> *part-id-table* 661)
a2-2
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
)
(let ((a2-3 (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj node-list data 8))))
(sp-launch-particles-var
*sp-particle-system-2d*
(-> *part-id-table* 661)
a2-3
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
)
0
(none)
)
(defbehavior lurkerworm-default-event-handler lurkerworm ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('attack)
(-> arg3 param 1)
(go lurkerworm-die)
)
(('touch)
(if ((method-of-type touching-shapes-entry prims-touching?)
(the-as touching-shapes-entry (-> arg3 param 0))
(-> self root-override)
(the-as uint 1)
)
(send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
)
)
)
)
(defbehavior lurkerworm-default-post-behavior lurkerworm ()
(TODO-RENAME-20 self)
(transform-post)
0
(none)
)
lurkerworm-default-event-handler
lurkerworm-default-post-behavior
(defstate lurkerworm-idle (lurkerworm)
:event
lurkerworm-default-event-handler
:enter
(behavior () (ja-channel-set! 0) (set! (-> self state-time) (-> *display* base-frame-counter)) (none))
:code
(behavior ()
(while #t
(if (and
(>= (- (-> *display* base-frame-counter) (-> self state-time)) 300)
*target*
(>= 81920.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
)
(go lurkerworm-spot)
)
(suspend)
)
(none)
)
:post
lurkerworm-default-post-behavior
)
(defstate lurkerworm-spot (lurkerworm)
:event
lurkerworm-default-event-handler
:enter
(behavior ()
(set! (-> self state-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "worm-rise1") (new-sound-id) 1024 0 0 1 #t)
(none)
)
:code
(behavior ()
(set! (-> self part local-clock) 0)
(while #t
(spawn (-> self part) (-> self root-override trans))
(particle-effect self)
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) 300)
(if (and *target* (>= 81920.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans))))
(go lurkerworm-rise)
(go lurkerworm-idle)
)
)
(suspend)
)
(none)
)
:post
lurkerworm-default-post-behavior
)
(defstate lurkerworm-rise (lurkerworm)
:event
lurkerworm-default-event-handler
:enter
(behavior () (set! (-> self state-time) (-> *display* base-frame-counter)) (none))
:code
(behavior ()
(ja-channel-set! 1)
(let ((a0-1 (-> self skel root-channel 0)))
(set! (-> a0-1 frame-group) (the-as art-joint-anim (-> self draw art-group data 4)))
(set! (-> a0-1 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 4)) data 0 length) -1))
)
(set! (-> a0-1 param 1) 1.0)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group! a0-1 (the-as art-joint-anim (-> self draw art-group data 4)) num-func-seek!)
)
(until (ja-done? 0)
(spawn (-> self part) (-> self root-override trans))
(particle-effect self)
(suspend)
(let ((a0-4 (-> self skel root-channel 0)))
(set! (-> a0-4 param 0) (the float (+ (-> a0-4 frame-group data 0 length) -1)))
(set! (-> a0-4 param 1) 1.0)
(joint-control-channel-group-eval! a0-4 (the-as art-joint-anim #f) num-func-seek!)
)
)
(set! (-> self strike-count) 3)
(go lurkerworm-rest)
(none)
)
:post
lurkerworm-default-post-behavior
)
(defstate lurkerworm-rest (lurkerworm)
:event
lurkerworm-default-event-handler
:enter
(behavior ()
(set! (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self vulnerable) #t)
(none)
)
:exit
(behavior () (set! (-> self vulnerable) #f) (none))
:code
(behavior ()
(let* ((f30-0 10.0)
(f28-0 100.0)
(v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-2 (the-as number (logior #x3f800000 v1-1)))
(s5-0 (the int (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-2))))))
(gp-1 (nonzero? (-> self strike-count)))
)
(if gp-1
(+! (-> self strike-count) -1)
)
(let ((a0-2 (-> self skel root-channel 0)))
(set! (-> a0-2 frame-group) (the-as art-joint-anim (-> self draw art-group data 3)))
(set! (-> a0-2 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 3)) data 0 length) -1))
)
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group! a0-2 (the-as art-joint-anim (-> self draw art-group data 3)) num-func-seek!)
)
(until (ja-done? 0)
(ja-blend-eval)
(particle-effect self)
(when gp-1
(let* ((f0-13
(- 1.0 (* 0.00009765625
(+ -16384.0 (if *target*
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
4096000.0
)
)
)
)
)
(f30-2 (* 0.2 f0-13))
(v1-31 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-32 (the-as number (logior #x3f800000 v1-31)))
)
(if (< (+ -1.0 (the-as float v1-32)) f30-2)
(go lurkerworm-strike)
)
)
)
(+! s5-0 -1)
(when (zero? s5-0)
(if gp-1
(go lurkerworm-strike)
(go lurkerworm-sink)
)
)
(suspend)
(let ((a0-7 (-> self skel root-channel 0)))
(set! (-> a0-7 param 0) (the float (+ (-> a0-7 frame-group data 0 length) -1)))
(set! (-> a0-7 param 1) 1.0)
(joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-seek!)
)
)
(if gp-1
(go lurkerworm-strike)
(go lurkerworm-sink)
)
)
(none)
)
:post
lurkerworm-default-post-behavior
)
(defstate lurkerworm-strike (lurkerworm)
:event
lurkerworm-default-event-handler
:code
(behavior ()
(let ((a0-0 (-> self skel root-channel 0)))
(set! (-> a0-0 param 0) 1.0)
(joint-control-channel-group! a0-0 (the-as art-joint-anim #f) num-func-loop!)
)
(ja-channel-push! 1 40)
(let ((gp-0 (-> self skel root-channel 0)))
(set! (-> gp-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 6)))
(set! (-> gp-0 param 0) (ja-aframe 13.0 0))
(set! (-> gp-0 param 1) 1.0)
(set! (-> gp-0 frame-num) 0.0)
(joint-control-channel-group! gp-0 (the-as art-joint-anim (-> self draw art-group data 6)) num-func-seek!)
)
(until (ja-done? 0)
(ja-blend-eval)
(particle-effect self)
(suspend)
(let ((gp-1 (-> self skel root-channel 0)))
(set! (-> gp-1 param 0) (ja-aframe 13.0 0))
(set! (-> gp-1 param 1) 1.0)
(joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!)
)
)
(let ((a0-8 (-> self skel root-channel 0)))
(set! (-> a0-8 param 0) (the float (+ (-> a0-8 frame-group data 0 length) -1)))
(set! (-> a0-8 param 1) 1.0)
(joint-control-channel-group! a0-8 (the-as art-joint-anim #f) num-func-seek!)
)
(ja-channel-push! 1 40)
(go lurkerworm-rest)
(none)
)
:post
lurkerworm-default-post-behavior
)
(defstate lurkerworm-sink (lurkerworm)
:event
lurkerworm-default-event-handler
:enter
(behavior () (set! (-> self state-time) (-> *display* base-frame-counter)) (none))
:code
(behavior ()
(let ((a0-0 (-> self skel root-channel 0)))
(set! (-> a0-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
(set! (-> a0-0 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 5)) data 0 length) -1))
)
(set! (-> a0-0 param 1) 1.0)
(set! (-> a0-0 frame-num) 0.0)
(joint-control-channel-group! a0-0 (the-as art-joint-anim (-> self draw art-group data 5)) num-func-seek!)
)
(until (ja-done? 0)
(spawn (-> self part2) (-> self root-override trans))
(particle-effect self)
(suspend)
(let ((a0-3 (-> self skel root-channel 0)))
(set! (-> a0-3 param 0) (the float (+ (-> a0-3 frame-group data 0 length) -1)))
(set! (-> a0-3 param 1) 1.0)
(joint-control-channel-group-eval! a0-3 (the-as art-joint-anim #f) num-func-seek!)
)
)
(go lurkerworm-idle)
(none)
)
:post
lurkerworm-default-post-behavior
)
(defstate lurkerworm-die (lurkerworm)
:event
(the-as
(function process int symbol event-message-block object :behavior lurkerworm)
process-drawable-death-event-handler
)
:code
(behavior ()
(logclear! (-> self mask) (process-mask actor-pause))
(let ((v1-3 (-> self root-override root-prim)))
(set! (-> v1-3 collide-with) (the-as uint 0))
(set! (-> v1-3 prim-core collide-as) (the-as uint 0))
)
0
(let ((a0-1 (-> self skel root-channel 0)))
(set! (-> a0-1 frame-group) (the-as art-joint-anim (-> self draw art-group data 7)))
(set! (-> a0-1 param 0)
(the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 7)) data 0 length) -1))
)
(set! (-> a0-1 param 1) 1.0)
(set! (-> a0-1 frame-num) 0.0)
(joint-control-channel-group! a0-1 (the-as art-joint-anim (-> self draw art-group data 7)) num-func-seek!)
)
(until (ja-done? 0)
(suspend)
(let ((a0-2 (-> self skel root-channel 0)))
(set! (-> a0-2 param 0) (the float (+ (-> a0-2 frame-group data 0 length) -1)))
(set! (-> a0-2 param 1) 1.0)
(joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-seek!)
)
)
(dummy-18 self)
(none)
)
:post
lurkerworm-default-post-behavior
)
(defmethod init-from-entity! lurkerworm ((obj lurkerworm) (arg0 entity-actor))
(set! (-> obj mask) (logior (process-mask enemy) (-> obj mask)))
(let ((s4-0 (new 'process 'collide-shape-moving obj (collide-list-enum usually-hit-by-player))))
(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)
)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 6) 0)))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set-vector! (-> s3-0 local-sphere) 0.0 10240.0 0.0 24576.0)
(set-root-prim! s4-0 s3-0)
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 256))
(set! (-> s2-0 collide-with) (the-as uint 16))
(set! (-> s2-0 prim-core action) (the-as uint 1))
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 3)
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 4096.0)
(append-prim s3-0 s2-0)
)
(let ((s2-1 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-1 prim-core collide-as) (the-as uint 256))
(set! (-> s2-1 collide-with) (the-as uint 16))
(set! (-> s2-1 prim-core action) (the-as uint 1))
(set! (-> s2-1 prim-core offense) 4)
(set! (-> s2-1 transform-index) 5)
(set-vector! (-> s2-1 local-sphere) 0.0 0.0 0.0 4096.0)
(append-prim s3-0 s2-1)
)
(let ((s2-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-2 prim-core collide-as) (the-as uint 256))
(set! (-> s2-2 collide-with) (the-as uint 16))
(set! (-> s2-2 prim-core action) (the-as uint 1))
(set! (-> s2-2 prim-core offense) 4)
(set! (-> s2-2 transform-index) 6)
(set-vector! (-> s2-2 local-sphere) 0.0 0.0 0.0 4096.0)
(append-prim s3-0 s2-2)
)
(let ((s2-3 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-3 prim-core collide-as) (the-as uint 256))
(set! (-> s2-3 collide-with) (the-as uint 16))
(set! (-> s2-3 prim-core action) (the-as uint 1))
(set! (-> s2-3 prim-core offense) 4)
(set! (-> s2-3 transform-index) 7)
(set-vector! (-> s2-3 local-sphere) 0.0 0.0 0.0 4096.0)
(append-prim s3-0 s2-3)
)
(let ((s2-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-4 prim-core collide-as) (the-as uint 256))
(set! (-> s2-4 collide-with) (the-as uint 16))
(set! (-> s2-4 prim-core action) (the-as uint 1))
(set! (-> s2-4 prim-core offense) 4)
(set! (-> s2-4 transform-index) 8)
(set-vector! (-> s2-4 local-sphere) 0.0 0.0 0.0 4096.0)
(append-prim s3-0 s2-4)
)
(let ((s2-5 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1))))
(set! (-> s2-5 prim-core collide-as) (the-as uint 256))
(set! (-> s2-5 collide-with) (the-as uint 16))
(set! (-> s2-5 prim-core offense) 2)
(set! (-> s2-5 transform-index) 11)
(set-vector! (-> s2-5 local-sphere) 0.0 0.0 0.0 6144.0)
(append-prim s3-0 s2-5)
)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
(initialize-skeleton obj *lurkerworm-sg* '())
(set! (-> obj fact)
(new 'process 'fact-info-enemy obj (pickup-type eco-pill-random) (-> *FACT-bank* default-pill-inc))
)
(set! (-> obj angle) 0.0)
(set! (-> obj vulnerable) #f)
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 157) obj))
(set! (-> obj part2) (create-launch-control (-> *part-group-id-table* 158) obj))
(set! (-> obj twister) (new 'process 'twister 3 15 1092.2667 72.81778 0.25 0.001))
(TODO-RENAME-9 (-> obj twister) 3 9 910.2222)
(set! (-> obj head-tilt) 0.0)
(set! (-> obj skel prebind-function)
(the-as (function pointer int process-drawable none) lurkerworm-prebind-function)
)
(set! (-> obj skel postbind-function) lurkerworm-joint-callback)
(set! (-> obj root-override nav-radius) 12288.0)
(nav-mesh-connect obj (-> obj root-override) (the-as nav-control #f))
(go lurkerworm-idle)
(none)
)