Files
jak-project/goal_src/jak3/levels/mine/prebot-setup.gc
T
water111 3ee2b4423c [decompiler] Cleanup for Jak 3 (#3845)
This PR does a few cleanups:
- improve method names/comments/flags for `enemy.gc` and a few other
files
- fix `new-stack-matrix0` not working for jak 3
- add `matrix-copy!` detection for jak 3
- add `vector-copy!` detection

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-20 10:31:29 -05:00

1102 lines
48 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: prebot-setup.gc
;; name in dgo: prebot-setup
;; dgos: MINED
;; +++prebot-flag
(defenum prebot-flag
:type uint32
:bitfield #t
(pf0 0)
(pf1 1)
(pf2 2)
(pf3 3)
(pf4 4)
(pf5 5)
(pf6 6)
(pf7 7)
(pf8 8)
)
;; ---prebot-flag
(declare-type prebot process-focusable)
(define-extern *prebot-sword-color-curve* curve-color-piecewise)
(define-extern *prebot-sword-white-red-curve* curve-color-piecewise)
(define-extern *prebot-sword-width-curve* curve2d-fast)
(define-extern *prebot-sword-color-array* light-trail-composition)
(define-extern prebot-neck-callback (function cspace transformq none :behavior prebot))
(define-extern prebot-light-pulse-off (function none :behavior prebot))
(define-extern prebot-go-next-stage (function object :behavior prebot))
;; DECOMP BEGINS
(defskelgroup skel-prebot-camera prebot-camera prebot-camera-lod0-jg -1
((prebot-camera-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 4)
)
(defskelgroup skel-cav-exit-door cav-exit-door cav-exit-door-lod0-jg cav-exit-door-idle-ja
((cav-exit-door-lod0-mg (meters 20)) (cav-exit-door-lod1-mg (meters 999999)))
:bounds (static-spherem 0 10 0 20)
:origin-joint-index 3
)
(defskelgroup skel-cav-break-bridge cav-break-bridge cav-break-bridge-lod0-jg cav-break-bridge-idle-ja
((cav-break-bridge-lod0-mg (meters 999999)))
:bounds (static-spherem 0 -20 0 50)
:origin-joint-index 3
)
(defskelgroup skel-cav-molten-pil cav-pillar cav-pillar-lod0-jg cav-pillar-idle-ja
((cav-pillar-lod0-mg (meters 999999)))
:bounds (static-spherem 0 -10 0 10)
:origin-joint-index 3
)
(defskelgroup skel-cav-molten-pil-b cav-pillar cav-pillar-b-lod0-jg cav-pillar-b-idle-ja
((cav-pillar-b-lod0-mg (meters 999999)))
:bounds (static-spherem 0 -10 0 10)
:origin-joint-index 3
)
(defskelgroup skel-cav-molten-pil-c cav-pillar cav-pillar-c-lod0-jg cav-pillar-c-idle-ja
((cav-pillar-c-lod0-mg (meters 999999)))
:bounds (static-spherem 0 -10 0 10)
:origin-joint-index 3
)
(defskelgroup skel-cav-molten-pil-d cav-pillar cav-pillar-d-lod0-jg cav-pillar-d-idle-ja
((cav-pillar-d-lod0-mg (meters 999999)))
:bounds (static-spherem 0 -10 0 10)
:origin-joint-index 3
)
(defskelgroup skel-cav-molten-pil-debris-a cav-pillar cav-pillar-debris-a-lod0-jg cav-pillar-debris-a-idle-ja
((cav-pillar-debris-a-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 2)
)
(defskelgroup skel-cav-molten-pil-debris-b cav-pillar cav-pillar-debris-b-lod0-jg cav-pillar-debris-b-idle-ja
((cav-pillar-debris-b-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 2)
)
(defskelgroup skel-cav-molten-pil-debris-c cav-pillar cav-pillar-debris-c-lod0-jg cav-pillar-debris-c-idle-ja
((cav-pillar-debris-c-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 2)
)
(defskelgroup skel-cav-molten-pil-debris-d cav-pillar cav-pillar-debris-d-lod0-jg cav-pillar-debris-d-idle-ja
((cav-pillar-debris-d-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 2)
)
(defskelgroup skel-cav-railblocker cav-railblocker cav-railblocker-lod0-jg cav-railblocker-idle-ja
((cav-railblocker-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 10)
:origin-joint-index 3
)
(defskelgroup skel-cav-railblocker-explode cav-railblocker cav-railblocker-explode-lod0-jg cav-railblocker-explode-idle-ja
((cav-railblocker-explode-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 10)
:origin-joint-index 3
)
(define *cav-railblocker-exploder-params*
(new 'static 'joint-exploder-static-params
:joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
(new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 18 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 19 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 20 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 21 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 22 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 23 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 24 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 25 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 26 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 27 :parent-joint-index -1)
)
:collide-spec (collide-spec backgnd)
)
)
(defskelgroup skel-cav-minecar min-bomb-train min-bomb-train-lod0-jg min-bomb-train-idle-ja
((min-bomb-train-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 10)
:origin-joint-index 3
)
(defskelgroup skel-prebot-tentacle prebot-tentacle prebot-tentacle-lod0-jg prebot-tentacle-idle-ja
((prebot-tentacle-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 10)
:origin-joint-index 3
)
(defskelgroup skel-prebot-shockwave prebot-shockwave prebot-shockwave-lod0-jg prebot-shockwave-shockwave-ja
((prebot-shockwave-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 62)
:origin-joint-index 3
)
(defskelgroup skel-prebot-sword prebot 80 prebot-sword-shadow-mg
((prebot-sword-lod0-jg (meters 999999)))
:bounds (static-spherem 0 20 0 20)
:origin-joint-index 4
)
(defskelgroup skel-prebot-gun prebot prebot-sword-r-swords-horizontal-L2R-complete-ja prebot-gun-shadow-mg
((prebot-gun-lod0-jg (meters 999999)))
:bounds (static-spherem 0 0 0 10)
:origin-joint-index 3
)
(defskelgroup skel-prebot prebot prebot-lod0-jg prebot-idle-ja
((prebot-lod0-mg (meters 999999)))
:bounds (static-spherem 0 -2 0 13.5)
:shadow prebot-shadow-mg
:origin-joint-index 3
)
(deftype prebot-eco-pillar-launch-spec (structure)
((offset vector)
(height float)
(style int8)
)
)
(deftype prebot-eco-pillar (process-drawable)
((root collide-shape-moving :override)
(vulnerable symbol)
(hot symbol)
(start-y float)
(end-y float)
(heat-part sparticle-launch-control)
(cool-part sparticle-launch-control)
)
(:state-methods
wait-to-die
heat-up
grow
cool-down
wait-to-cool
idle
)
)
(deftype cav-railblocker (process-focusable)
((incoming-attack-id uint32)
(hit-points float)
(notify-on-die entity)
(notify-on-die-2 entity)
(trackable symbol)
(red-tip-change-time time-frame)
(alt-red-tip-on symbol)
)
(:state-methods
idle
fall
)
(:methods
(cav-railblocker-method-30 (_type_ symbol) none)
)
)
(deftype cav-minecar (process-drawable)
()
(:state-methods
idle
)
)
(deftype prebot-sword (process-drawable)
((parent (pointer prebot) :override)
(root collide-shape-moving :override)
(prefix string)
(blade-scale cam-float-seeker :inline)
(blade-jm joint-mod)
(sword-sound sound-id)
(sword-sound-playing symbol)
(prev-position vector :inline)
(use-pos-pitch symbol)
(old-target-dist float)
(alternate-sound sound-spec)
(whoosh-lead float)
(allow-whoosh symbol)
(current-volume float)
)
(:state-methods
idle
)
)
(deftype prebot-shockwave (process-drawable)
()
(:state-methods
idle
)
)
(deftype prebot-gun (process-drawable)
((parent (pointer prebot) :override)
(root collide-shape-moving :override)
(prefix string)
)
(:state-methods
idle
)
)
(deftype prebot-tentacle (process-drawable)
((parent (pointer prebot) :override)
(root collide-shape-moving :override)
(prefix string)
(aim-jm joint-mod-polar-look-at)
(half-aim-jm joint-mod-polar-look-at)
(laser-sound sound-id)
(laser-sound-playing symbol)
)
(:state-methods
idle
)
)
(deftype prebot-ammo-tracker (structure)
((handle handle)
(where vector :inline)
(birth-next-time symbol)
(timer time-frame)
)
)
(deftype prebot (process-focusable)
((critters handle 28)
(critters-to-launch int8)
(gun handle)
(swords handle 2)
(tentacles handle 5)
(beam-projectile handle)
(pillars handle 5)
(original-position vector :inline)
(position cam-vector-seeker :inline)
(stage int8)
(stage-hit-points float)
(last-attack-id uint32)
(neck-angle cam-float-seeker :inline)
(no-collision-timer time-frame)
(num-attacks uint8)
(shoulder-aim-jm joint-mod-polar-look-at)
(shot-extra-y float)
(shot-extra-xz float)
(which-movie int8)
(light-flash cam-vector-seeker :inline)
(light-pulse oscillating-vector :inline)
(light-pulse-flicker delayed-rand-vector :inline)
(laugh-played symbol)
(grunt-played symbol)
(trythis-played symbol)
(laugh-timer time-frame)
(blocker handle)
(flags prebot-flag)
(pillar-hint-timer time-frame)
(minecar-hint-timer time-frame)
(ammo prebot-ammo-tracker 20 :inline)
)
(:state-methods
beaten
play-fma
play-hit-movie
destroy-pillars
watch-pillars
create-pillars
activate-tentacles
watch-critters
launch-critters
sweep-done
sweep
slam-done
slam
pre-slam
jump-to-hover
hidden
test
)
(:methods
(prebot-method-45 (_type_) none)
(prebot-method-46 (_type_) none)
)
)
(defbehavior prebot-eco-pillar-init-by-other prebot-eco-pillar ((arg0 vector) (arg1 prebot-eco-pillar-launch-spec))
(let ((v1-0 (-> arg1 style)))
(cond
((zero? v1-0)
(let ((s4-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) cshape-reaction-default)
(set! (-> s4-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((v1-7 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-7 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
(set! (-> v1-7 prim-core action) (collide-action solid))
(set! (-> v1-7 transform-index) 3)
(set-vector! (-> v1-7 local-sphere) 1337.7535 -32947.812 542.3104 36864.0)
(set! (-> s4-0 total-prims) (the-as uint 1))
(set! (-> s4-0 root-prim) v1-7)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-10 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-10 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-10 prim-core collide-with))
)
(set! (-> self root) s4-0)
)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil" (the-as (pointer level) #f)))
(the-as pair 0)
)
)
((= v1-0 1)
(let ((s4-2 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
(set! (-> s4-2 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-2 reaction) cshape-reaction-default)
(set! (-> s4-2 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-21 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-21 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
(set! (-> v1-21 prim-core action) (collide-action solid))
(set! (-> v1-21 transform-index) 3)
(set-vector! (-> v1-21 local-sphere) 1337.7535 -32947.812 542.3104 36864.0)
(set! (-> s4-2 total-prims) (the-as uint 1))
(set! (-> s4-2 root-prim) v1-21)
)
(set! (-> s4-2 nav-radius) (* 0.75 (-> s4-2 root-prim local-sphere w)))
(let ((v1-24 (-> s4-2 root-prim)))
(set! (-> s4-2 backup-collide-as) (-> v1-24 prim-core collide-as))
(set! (-> s4-2 backup-collide-with) (-> v1-24 prim-core collide-with))
)
(set! (-> self root) s4-2)
)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil-b" (the-as (pointer level) #f)))
(the-as pair 0)
)
)
((= v1-0 2)
(let ((s4-4 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
(set! (-> s4-4 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-4 reaction) cshape-reaction-default)
(set! (-> s4-4 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-4 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-35 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-35 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
(set! (-> v1-35 prim-core action) (collide-action solid))
(set! (-> v1-35 transform-index) 3)
(set-vector! (-> v1-35 local-sphere) 1337.7535 -32947.812 542.3104 36864.0)
(set! (-> s4-4 total-prims) (the-as uint 1))
(set! (-> s4-4 root-prim) v1-35)
)
(set! (-> s4-4 nav-radius) (* 0.75 (-> s4-4 root-prim local-sphere w)))
(let ((v1-38 (-> s4-4 root-prim)))
(set! (-> s4-4 backup-collide-as) (-> v1-38 prim-core collide-as))
(set! (-> s4-4 backup-collide-with) (-> v1-38 prim-core collide-with))
)
(set! (-> self root) s4-4)
)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil-c" (the-as (pointer level) #f)))
(the-as pair 0)
)
)
(else
(let ((s4-6 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
(set! (-> s4-6 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-6 reaction) cshape-reaction-default)
(set! (-> s4-6 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((v1-49 (new 'process 'collide-shape-prim-mesh s4-6 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-49 prim-core collide-as) (collide-spec obstacle))
(set! (-> v1-49 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
(set! (-> v1-49 prim-core action) (collide-action solid))
(set! (-> v1-49 transform-index) 3)
(set-vector! (-> v1-49 local-sphere) 1337.7535 -32947.812 542.3104 36864.0)
(set! (-> s4-6 total-prims) (the-as uint 1))
(set! (-> s4-6 root-prim) v1-49)
)
(set! (-> s4-6 nav-radius) (* 0.75 (-> s4-6 root-prim local-sphere w)))
(let ((v1-52 (-> s4-6 root-prim)))
(set! (-> s4-6 backup-collide-as) (-> v1-52 prim-core collide-as))
(set! (-> s4-6 backup-collide-with) (-> v1-52 prim-core collide-with))
)
(set! (-> self root) s4-6)
)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil-d" (the-as (pointer level) #f)))
(the-as pair 0)
)
)
)
)
(set! (-> self root event-self) 'touched)
(let ((s4-8 (new 'stack-no-clear 'vector)))
(let* ((s3-4 sincos!)
(s2-0 s4-8)
(f30-0 -16384.0)
(f28-0 32768.0)
(v1-61 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-62 (the-as number (logior #x3f800000 v1-61)))
)
(s3-4 s2-0 (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-62)))))
)
(quaternion-set! (-> self root quat) 0.0 (-> s4-8 x) 0.0 (-> s4-8 y))
)
(vector-copy! (-> self root trans) arg0)
(set! (-> self start-y) (-> self root trans y))
(set! (-> self end-y) (+ (-> arg0 y) (-> arg1 height)))
(set! (-> self vulnerable) #f)
(set! (-> self hot) #f)
(set! (-> self heat-part) (create-launch-control (-> *part-group-id-table* 1336) self))
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 1337) self))
(set! (-> self cool-part) (create-launch-control (-> *part-group-id-table* 1338) self))
(go-virtual heat-up)
)
(when (or (zero? *prebot-sword-color-curve*) (!= loading-level global))
(set! *prebot-sword-color-curve* (new 'loading-level 'curve-color-piecewise))
(allocate! *prebot-sword-color-curve* 2 'loading-level #t)
)
(set! (-> *prebot-sword-color-curve* pts data 0 first) 0.0)
(set! (-> *prebot-sword-color-curve* pts data 0 second x) 1.0)
(set! (-> *prebot-sword-color-curve* pts data 0 second y) 0.0)
(set! (-> *prebot-sword-color-curve* pts data 0 second z) 0.0)
(set! (-> *prebot-sword-color-curve* pts data 0 second w) 1.0)
(set! (-> *prebot-sword-color-curve* pts data 1 first) 1.0)
(set! (-> *prebot-sword-color-curve* pts data 1 second x) 1.0)
(set! (-> *prebot-sword-color-curve* pts data 1 second y) 1.0)
(set! (-> *prebot-sword-color-curve* pts data 1 second z) 0.0)
(set! (-> *prebot-sword-color-curve* pts data 1 second w) 1.0)
(when (or (zero? *prebot-sword-white-red-curve*) (!= loading-level global))
(set! *prebot-sword-white-red-curve* (new 'loading-level 'curve-color-piecewise))
(allocate! *prebot-sword-white-red-curve* 3 'loading-level #t)
)
(set! (-> *prebot-sword-white-red-curve* pts data 0 first) 0.0)
(set! (-> *prebot-sword-white-red-curve* pts data 0 second x) 1.0)
(set! (-> *prebot-sword-white-red-curve* pts data 0 second y) 0.3125)
(set! (-> *prebot-sword-white-red-curve* pts data 0 second z) 0.3125)
(set! (-> *prebot-sword-white-red-curve* pts data 0 second w) 1.0)
(set! (-> *prebot-sword-white-red-curve* pts data 1 first) 0.5)
(set! (-> *prebot-sword-white-red-curve* pts data 1 second x) 1.0)
(set! (-> *prebot-sword-white-red-curve* pts data 1 second y) 0.078125)
(set! (-> *prebot-sword-white-red-curve* pts data 1 second z) 0.078125)
(set! (-> *prebot-sword-white-red-curve* pts data 1 second w) 1.0)
(set! (-> *prebot-sword-white-red-curve* pts data 2 first) 1.0)
(set! (-> *prebot-sword-white-red-curve* pts data 2 second x) 1.0)
(set! (-> *prebot-sword-white-red-curve* pts data 2 second y) 0.0)
(set! (-> *prebot-sword-white-red-curve* pts data 2 second z) 0.0)
(set! (-> *prebot-sword-white-red-curve* pts data 2 second w) 1.0)
(if #t
(set! *prebot-sword-width-curve* (new 'static 'curve2d-fast
:xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0)
:ys (new 'static 'vector :x 1.0 :y 1.0 :z 2.0 :w 3.0)
:one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0)
)
)
)
(if (or (zero? *prebot-sword-color-array*) (!= loading-level global))
(set! *prebot-sword-color-array* (new 'loading-level 'light-trail-composition))
)
(set! (-> *prebot-sword-color-array* color-mode) (the-as uint 0))
(set! (-> *prebot-sword-color-array* color-repeat-dist) 4096.0)
(set! (-> *prebot-sword-color-array* alpha-1-mode) (the-as uint 0))
(set! (-> *prebot-sword-color-array* alpha-2-mode) (the-as uint 6))
(set! (-> *prebot-sword-color-array* base-alpha) 1.0)
(set! (-> *prebot-sword-color-array* alpha-repeat-dist) 4096.0)
(set! (-> *prebot-sword-color-array* width-mode) (the-as uint 0))
(set! (-> *prebot-sword-color-array* base-width) 1.0)
(set! (-> *prebot-sword-color-array* width-repeat-dist) 4096.0)
(set! (-> *prebot-sword-color-array* uv-mode) (the-as uint 3))
(set! (-> *prebot-sword-color-array* uv-repeat-dist) 40960.0)
(set! (-> *prebot-sword-color-array* lie-mode) (lie-mode appearance0))
(set! (-> *prebot-sword-color-array* max-age) (seconds 0.3))
(if #f
(set! (-> *prebot-sword-color-array* tex-id)
(lookup-texture-id-by-name (the-as string #f) (the-as string #f))
)
(set! (-> *prebot-sword-color-array* tex-id) (new 'static 'texture-id :index #x3 :page #x1))
)
(set! (-> *prebot-sword-color-array* width-curve) (the-as curve2d-piecewise *prebot-sword-width-curve*))
(set! (-> *prebot-sword-color-array* color-curve) *prebot-sword-white-red-curve*)
(set! (-> *prebot-sword-color-array* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*))
(set! (-> *prebot-sword-color-array* alpha-curve-2) #f)
(set! (-> *prebot-sword-color-array* zbuffer?) #t)
(vector-copy! (-> *prebot-sword-color-array* lie-vector) *up-vector*)
(set! (-> *prebot-sword-color-array* use-tape-mode?) #t)
(set! (-> *prebot-sword-color-array* blend-mode) (the-as uint 1))
(set! (-> *prebot-sword-color-array* frame-stagger) (the-as uint 1))
(defbehavior prebot-sword-init-by-other prebot-sword ((arg0 string) (arg1 vector) (arg2 basic) (arg3 sound-spec))
(let ((s2-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
(set! (-> s2-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s2-0 reaction) cshape-reaction-default)
(set! (-> s2-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((v1-6 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-6 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-6 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
(set! (-> v1-6 prim-core action) (collide-action solid))
(set! (-> v1-6 transform-index) 4)
(set-vector! (-> v1-6 local-sphere) 0.0 45056.0 0.0 49152.0)
(set! (-> s2-0 total-prims) (the-as uint 1))
(set! (-> s2-0 root-prim) v1-6)
)
(set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w)))
(let ((v1-9 (-> s2-0 root-prim)))
(set! (-> s2-0 backup-collide-as) (-> v1-9 prim-core collide-as))
(set! (-> s2-0 backup-collide-with) (-> v1-9 prim-core collide-with))
)
(set! (-> s2-0 event-self) 'touched)
(set! (-> self root) s2-0)
)
(set! (-> self root pause-adjust-distance) 409600.0)
(vector-copy! (-> self root trans) arg1)
(vector-copy! (-> self prev-position) arg1)
(set! (-> self old-target-dist) 204800.0)
(set! (-> self prefix) arg0)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-sword" (the-as (pointer level) #f)))
(the-as pair 0)
)
(let ((v1-21 (-> self parent)))
(set! (-> self draw light-index) (-> (the-as prebot (if v1-21
(the-as prebot (-> v1-21 0 self))
)
)
draw
light-index
)
)
)
(logior! (-> self mask) (process-mask enemy))
(let ((v1-28 (-> self node-list data)))
(set! (-> v1-28 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!))
(set! (-> v1-28 0 param1) (the-as basic (-> self parent)))
(set! (-> v1-28 0 param2) arg2)
)
(set! (-> self event-hook) (-> (method-of-object self idle) event))
(let ((s5-1 (new 'stack-no-clear 'weapon-trail-tracker-spawn-params)))
(set! (-> s5-1 tracked-obj) (process->handle self))
(set! (-> s5-1 max-num-crumbs) 200)
(set! (-> s5-1 joint0) 3)
(set! (-> s5-1 joint1) 5)
(set! (-> s5-1 appearance) *prebot-sword-color-array*)
(set! (-> *prebot-sword-color-array* tex-id) (lookup-texture-id-by-name "sword-trail-low" (the-as string #f)))
(let* ((v1-43 (estimate-light-trail-mem-usage
(the-as uint (-> s5-1 max-num-crumbs))
(the-as uint (= (-> s5-1 appearance lie-mode) (lie-mode use-two-strips)))
)
)
(s4-2 (get-process *default-dead-pool* weapon-trail-tracker (+ v1-43 8192) 1))
(s5-2 (-> (when s4-2
(let ((t9-8 (method-of-type process activate)))
(t9-8 s4-2 (ppointer->process (-> self parent)) "light-trail" (the-as pointer #x70004000))
)
(run-now-in-process s4-2 weapon-trail-tracker-init-by-other s5-1)
(-> s4-2 ppointer)
)
0
)
)
(s3-2 (-> (level-get *level* 'mined) draw-index))
(s4-3 (vu1-bucket-map s3-2 4 (merc-mode mercneric2)))
(v1-50 (vu1-bucket-map s3-2 4 (merc-mode mm5)))
)
(set! (-> (the-as weapon-trail-tracker s5-2) trail strip bucket) s4-3)
(set! (-> (the-as weapon-trail-tracker s5-2) trail strip sink) (the-as uint v1-50))
)
)
(init (-> self blade-scale) 1.0 0.03 0.2 0.9)
(set! (-> self blade-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) self 4))
(set! (-> self blade-jm track-mode) (track-mode no-trans no-rotate))
(set-vector! (-> self blade-jm scale) 1.0 1.0 1.0 1.0)
(set! (-> self sword-sound) (new-sound-id))
(set! (-> self sword-sound-playing) #f)
(set! (-> self use-pos-pitch) #f)
(set! (-> self alternate-sound) arg3)
(set! (-> self allow-whoosh) #f)
(set! (-> self whoosh-lead) 20480.0)
(set! (-> self current-volume) 1.0)
(go-virtual idle)
)
(defbehavior prebot-shockwave-init-by-other prebot-shockwave ((arg0 vector) (arg1 quaternion))
(let ((s4-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) cshape-reaction-default)
(set! (-> s4-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((v1-6 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> v1-6 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-6 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
(set! (-> v1-6 prim-core action) (collide-action solid))
(set! (-> v1-6 transform-index) 3)
(set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 4096.0)
(set! (-> s4-0 total-prims) (the-as uint 1))
(set! (-> s4-0 root-prim) v1-6)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-9 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-9 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-9 prim-core collide-with))
)
(set! (-> s4-0 event-self) 'touched)
(set! (-> self root) s4-0)
)
(set! (-> self root pause-adjust-distance) 409600.0)
(vector-copy! (-> self root trans) arg0)
(quaternion-copy! (-> self root quat) arg1)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-shockwave" (the-as (pointer level) #f)))
(the-as pair 0)
)
(set! (-> self event-hook) (-> (method-of-object self idle) event))
(go-virtual idle)
)
(defbehavior prebot-gun-init-by-other prebot-gun ((arg0 string) (arg1 vector))
(let ((s4-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) cshape-reaction-default)
(set! (-> s4-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0)))
(set! (-> s4-0 total-prims) (the-as uint 2))
(set! (-> s3-0 prim-core collide-as) (collide-spec enemy))
(set! (-> s3-0 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
(set! (-> s3-0 prim-core action) (collide-action solid))
(set! (-> s3-0 transform-index) 3)
(set-vector! (-> s3-0 local-sphere) 0.0 -32768.0 0.0 49152.0)
(set! (-> s4-0 root-prim) s3-0)
)
(let ((v1-13 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> v1-13 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-13 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
(set! (-> v1-13 prim-core action) (collide-action solid))
(set! (-> v1-13 transform-index) 3)
(set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 4096.0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-16 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-16 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-16 prim-core collide-with))
)
(set! (-> s4-0 event-self) 'touched)
(set! (-> self root) s4-0)
)
(set! (-> self root pause-adjust-distance) 409600.0)
(vector-copy! (-> self root trans) arg1)
(set! (-> self prefix) arg0)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-gun" (the-as (pointer level) #f)))
(the-as pair 0)
)
(let ((v1-26 (-> self parent)))
(set! (-> self draw light-index) (-> (the-as prebot (if v1-26
(the-as prebot (-> v1-26 0 self))
)
)
draw
light-index
)
)
)
(logior! (-> self mask) (process-mask enemy))
(let ((v1-33 (-> self node-list data)))
(set! (-> v1-33 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!))
(set! (-> v1-33 0 param1) (the-as basic (-> self parent)))
(set! (-> v1-33 0 param2) (the-as basic 44))
)
(set! (-> self event-hook) (-> (method-of-object self idle) event))
(go-virtual idle)
)
(defbehavior prebot-tentacle-init-by-other prebot-tentacle ((arg0 string) (arg1 vector) (arg2 int))
(let ((s3-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
(set! (-> s3-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s3-0 reaction) cshape-reaction-default)
(set! (-> s3-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s2-0 (new 'process 'collide-shape-prim-group s3-0 (the-as uint 1) 0)))
(set! (-> s3-0 total-prims) (the-as uint 2))
(set! (-> s2-0 prim-core collide-as) (collide-spec enemy))
(set! (-> s2-0 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
(set! (-> s2-0 prim-core action) (collide-action solid))
(set! (-> s2-0 transform-index) 4)
(set-vector! (-> s2-0 local-sphere) 0.0 -32768.0 0.0 49152.0)
(set! (-> s3-0 root-prim) s2-0)
)
(let ((v1-13 (new 'process 'collide-shape-prim-sphere s3-0 (the-as uint 0))))
(set! (-> v1-13 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-13 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list))
(set! (-> v1-13 prim-core action) (collide-action solid))
(set! (-> v1-13 transform-index) 4)
(set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 4096.0)
)
(set! (-> s3-0 nav-radius) (* 0.75 (-> s3-0 root-prim local-sphere w)))
(let ((v1-16 (-> s3-0 root-prim)))
(set! (-> s3-0 backup-collide-as) (-> v1-16 prim-core collide-as))
(set! (-> s3-0 backup-collide-with) (-> v1-16 prim-core collide-with))
)
(set! (-> s3-0 event-self) 'touched)
(set! (-> self root) s3-0)
)
(set! (-> self root pause-adjust-distance) 409600.0)
(vector-copy! (-> self root trans) arg1)
(set! (-> self prefix) arg0)
(initialize-skeleton
self
(the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-tentacle" (the-as (pointer level) #f)))
(the-as pair 0)
)
(let ((v1-26 (-> self parent)))
(set! (-> self draw light-index) (-> (the-as prebot (if v1-26
(the-as prebot (-> v1-26 0 self))
)
)
draw
light-index
)
)
)
(logior! (-> self mask) (process-mask enemy))
(let ((v1-33 (-> self node-list data)))
(set! (-> v1-33 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!))
(set! (-> v1-33 0 param1) (the-as basic (-> self parent)))
(set! (-> v1-33 0 param2) (the-as basic arg2))
)
(set! (-> self aim-jm) (new 'process 'joint-mod-polar-look-at))
(initialize (-> self aim-jm) self 13)
(set! (-> self aim-jm ear) 2)
(set! (-> self aim-jm up) 0)
(set! (-> self aim-jm nose) 1)
(set! (-> self half-aim-jm) (new 'process 'joint-mod-polar-look-at))
(initialize (-> self half-aim-jm) self 12)
(set! (-> self half-aim-jm ear) 2)
(set! (-> self half-aim-jm up) 0)
(set! (-> self half-aim-jm nose) 1)
(set! (-> self laser-sound) (new-sound-id))
(set! (-> self laser-sound-playing) #f)
(set! (-> self event-hook) (-> (method-of-object self idle) event))
(go-virtual idle)
)
(defmethod init-from-entity! ((this prebot) (arg0 entity-actor))
"Set up a newly created process from the entity that created it."
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) cshape-reaction-default)
(set! (-> s4-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 18) 0)))
(set! (-> s4-0 total-prims) (the-as uint 19))
(set! (-> s3-0 prim-core collide-as) (collide-spec enemy))
(set! (-> s3-0 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> s3-0 prim-core action) (collide-action solid))
(set! (-> s3-0 transform-index) 8)
(set-vector! (-> s3-0 local-sphere) 0.0 -20480.0 0.0 61440.0)
(set! (-> s4-0 root-prim) s3-0)
)
(let ((v1-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-13 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-13 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-13 prim-core action) (collide-action solid))
(set! (-> v1-13 transform-index) 10)
(set-vector! (-> v1-13 local-sphere) 0.0 2957.7217 3380.8384 20891.238)
)
(let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0))))
(set! (-> v1-15 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-15 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-15 prim-core action) (collide-action solid))
(set! (-> v1-15 transform-index) 15)
(set-vector! (-> v1-15 local-sphere) 0.0 7224.115 0.0 16506.88)
)
(let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0))))
(set! (-> v1-17 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-17 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-17 prim-core action) (collide-action solid))
(set! (-> v1-17 transform-index) 13)
(set-vector! (-> v1-17 local-sphere) 423.5264 3772.0063 0.0 10656.973)
)
(let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0))))
(set! (-> v1-19 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-19 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-19 prim-core action) (collide-action solid))
(set! (-> v1-19 transform-index) 12)
(set-vector! (-> v1-19 local-sphere) -0.4096 0.0 0.0 11988.992)
)
(let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0))))
(set! (-> v1-21 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-21 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-21 prim-core action) (collide-action solid))
(set! (-> v1-21 transform-index) 31)
(set-vector! (-> v1-21 local-sphere) 0.0 7223.7056 0.0 16506.88)
)
(let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 5) (the-as uint 0))))
(set! (-> v1-23 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-23 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-23 prim-core action) (collide-action solid))
(set! (-> v1-23 transform-index) 29)
(set-vector! (-> v1-23 local-sphere) -423.5264 3772.0063 0.0 10656.973)
)
(let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 0))))
(set! (-> v1-25 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-25 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-25 prim-core action) (collide-action solid))
(set! (-> v1-25 transform-index) 28)
(set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 11988.992)
)
(let ((v1-27 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 0))))
(set! (-> v1-27 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-27 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-27 prim-core action) (collide-action solid))
(set! (-> v1-27 transform-index) 8)
(set-vector! (-> v1-27 local-sphere) 0.0 1914.0608 1339.392 24913.51)
)
(let ((v1-29 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 0))))
(set! (-> v1-29 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-29 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-29 prim-core action) (collide-action solid))
(set! (-> v1-29 transform-index) 5)
(set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 13063.373)
)
(let ((v1-31 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 0))))
(set! (-> v1-31 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-31 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-31 prim-core action) (collide-action solid))
(set! (-> v1-31 transform-index) 56)
(set-vector! (-> v1-31 local-sphere) 791.3472 14204.108 -1401.6512 12302.336)
)
(let ((v1-33 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 0))))
(set! (-> v1-33 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-33 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-33 prim-core action) (collide-action solid))
(set! (-> v1-33 transform-index) 57)
(set-vector! (-> v1-33 local-sphere) 120.0128 13062.144 1252.1472 11315.609)
)
(let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 0))))
(set! (-> v1-35 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-35 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-35 prim-core action) (collide-action solid))
(set! (-> v1-35 transform-index) 54)
(set-vector! (-> v1-35 local-sphere) 557.056 12469.043 1004.3392 23741.234)
)
(let ((v1-37 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 12) (the-as uint 0))))
(set! (-> v1-37 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-37 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-37 prim-core action) (collide-action solid))
(set! (-> v1-37 transform-index) 52)
(set-vector! (-> v1-37 local-sphere) 1070.2848 7083.6226 264.6016 14952.857)
)
(let ((v1-39 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 13) (the-as uint 0))))
(set! (-> v1-39 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-39 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-39 prim-core action) (collide-action solid))
(set! (-> v1-39 transform-index) 63)
(set-vector! (-> v1-39 local-sphere) -790.528 14204.519 -1401.6512 12301.927)
)
(let ((v1-41 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 14) (the-as uint 0))))
(set! (-> v1-41 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-41 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-41 prim-core action) (collide-action solid))
(set! (-> v1-41 transform-index) 64)
(set-vector! (-> v1-41 local-sphere) -120.4224 13062.963 1252.5568 11315.2)
)
(let ((v1-43 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 15) (the-as uint 0))))
(set! (-> v1-43 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-43 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-43 prim-core action) (collide-action solid))
(set! (-> v1-43 transform-index) 61)
(set-vector! (-> v1-43 local-sphere) -556.6464 12469.453 1004.3392 23741.645)
)
(let ((v1-45 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 16) (the-as uint 0))))
(set! (-> v1-45 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-45 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-45 prim-core action) (collide-action solid))
(set! (-> v1-45 transform-index) 59)
(set-vector! (-> v1-45 local-sphere) -1069.8752 7083.6226 264.192 14952.448)
)
(let ((v1-47 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 17) (the-as uint 0))))
(set! (-> v1-47 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-47 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile))
(set! (-> v1-47 prim-core action) (collide-action solid))
(set! (-> v1-47 transform-index) 50)
(set-vector! (-> v1-47 local-sphere) 0.0 -3032.2688 430.08 11688.755)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(let ((v1-50 (-> s4-0 root-prim)))
(set! (-> s4-0 backup-collide-as) (-> v1-50 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-50 prim-core collide-with))
)
(set! (-> s4-0 event-self) 'touched)
(set! (-> this root) s4-0)
)
(set! (-> this root pause-adjust-distance) 409600.0)
(process-drawable-from-entity! this arg0)
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-prebot" (the-as (pointer level) #f)))
(the-as pair 0)
)
(logior! (-> this mask) (process-mask enemy))
(vector-copy! (-> this original-position) (-> this root trans))
(init (-> this position) (-> this original-position) 0.004096 2048.0 0.125)
(set! (-> this draw light-index) (the-as uint 10))
(dotimes (v1-64 28)
(set! (-> this critters v1-64) (the-as handle #f))
)
(set! (-> this gun) (the-as handle #f))
(dotimes (v1-67 2)
(set! (-> this swords v1-67) (the-as handle #f))
)
(dotimes (v1-70 5)
(set! (-> this tentacles v1-70) (the-as handle #f))
)
(set! (-> this beam-projectile) (the-as handle #f))
(dotimes (v1-73 5)
(set! (-> this pillars v1-73) (the-as handle #f))
)
(set! (-> this last-attack-id) (the-as uint 0))
(let ((a0-133 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0)))
(if a0-133
(change-to a0-133 this)
)
)
(init (-> this neck-angle) 0.0 0.01 0.1 0.9)
(let ((a0-135 (-> this node-list data 9)))
(set! (-> a0-135 param0) prebot-neck-callback)
)
(prebot-method-45 this)
(set! (-> this shoulder-aim-jm) (new 'process 'joint-mod-polar-look-at))
(initialize (-> this shoulder-aim-jm) this 28)
(set! (-> this shoulder-aim-jm ear) 2)
(set! (-> this shoulder-aim-jm up) 0)
(set! (-> this shoulder-aim-jm nose) 1)
(let ((v1-92 (-> this root root-prim)))
(set! (-> this root backup-collide-as) (-> v1-92 prim-core collide-as))
(set! (-> this root backup-collide-with) (-> v1-92 prim-core collide-with))
)
(set! (-> this no-collision-timer) 0)
(init (-> this light-flash) (the-as vector #f) 0.01 0.1 0.9)
(set-params! (-> this light-pulse) (the-as vector #f) 0.01 0.1 0.9)
(prebot-light-pulse-off)
(set-params! (-> this light-pulse-flicker) 15 120 0.1 0.1)
(set! (-> this laugh-timer) 0)
(set! (-> this blocker) (the-as handle #f))
(let ((v1-102 (-> this entity extra perm)))
(logior! (-> v1-102 status) (entity-perm-status bit-5))
(set! (-> this flags) (the-as prebot-flag (-> v1-102 user-object 0)))
)
(dotimes (v1-104 20)
(set! (-> this ammo v1-104 handle) (the-as handle #f))
(set! (-> this ammo v1-104 birth-next-time) #f)
)
(prebot-go-next-stage)
)