;;-*-Lisp-*-
(in-package goal)

;; name: precurd-obs.gc
;; name in dgo: precurd-obs
;; dgos: PRECA, PRECD

;; DECOMP BEGINS

(defskelgroup skel-pre-tformer terraformer terraformer-lod0-jg terraformer-walk-ja
              ((terraformer-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 175 75 250)
              :origin-joint-index 3
              )

(defskelgroup skel-pre-tformer-leg-a terraformer-leg-a terraformer-leg-a-lod0-jg terraformer-leg-a-lf-walk-ja
              ((terraformer-leg-a-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 38 0 50)
              :origin-joint-index 3
              )

(defskelgroup skel-pre-tformer-leg-b terraformer-leg-b terraformer-leg-b-lod0-jg terraformer-leg-b-lf-walk-ja
              ((terraformer-leg-b-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 61 0 68)
              :origin-joint-index 4
              )

(defskelgroup skel-pre-tformer-leg-c terraformer-leg-c terraformer-leg-c-lod0-jg terraformer-leg-c-lf-walk-ja
              ((terraformer-leg-c-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 25 0 75)
              :origin-joint-index 5
              )

(defskelgroup skel-pre-tformer-spike terraformer-spike terraformer-spike-lod0-jg terraformer-spike-idle-ja
              ((terraformer-spike-lod0-mg (meters 20))
               (terraformer-spike-lod1-mg (meters 40))
               (terraformer-spike-lod2-mg (meters 999999))
               )
              :bounds (static-spherem 0 40 20 35)
              :origin-joint-index 3
              )

(deftype pre-tformer (process-drawable)
  ()
  (:state-methods
    idle
    )
  )


(defstate idle (pre-tformer)
  :virtual #t
  :code sleep-code
  :post ja-post
  )

;; WARN: Return type mismatch object vs none.
(defbehavior pre-tformer-spawn-leg-a process-drawable ()
  (let ((gp-0 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-0
      (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-0) 'prefix "lf-")
      )
    )
  (let ((gp-2 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-2
      (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-2) 'prefix "lm-")
      )
    )
  (let ((gp-4 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-4
      (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-4) 'prefix "lr-")
      )
    )
  (let ((gp-6 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-6
      (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-6) 'prefix "rf-")
      )
    )
  (let ((gp-8 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-8
      (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-8) 'prefix "rm-")
      )
    )
  (let ((gp-10 (process-spawn
                 manipy
                 :init manipy-init
                 (-> self root trans)
                 (-> self entity)
                 (art-group-get-by-name *level* "skel-pre-tformer-leg-a" (the-as (pointer level) #f))
                 #f
                 0
                 :name "manipy"
                 :to self
                 :stack-size #x20000
                 )
               )
        )
    (when gp-10
      (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-10) 'prefix "rr-")
      )
    )
  (none)
  )

;; WARN: Return type mismatch object vs none.
(defbehavior pre-tformer-spawn-leg-b process-drawable ()
  (let ((gp-0 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-0
      (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-0) 'prefix "lf-")
      )
    )
  (let ((gp-2 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-2
      (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-2) 'prefix "lm-")
      )
    )
  (let ((gp-4 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-4
      (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-4) 'prefix "lr-")
      )
    )
  (let ((gp-6 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-6
      (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-6) 'prefix "rf-")
      )
    )
  (let ((gp-8 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-8
      (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-8) 'prefix "rm-")
      )
    )
  (let ((gp-10 (process-spawn
                 manipy
                 :init manipy-init
                 (-> self root trans)
                 (-> self entity)
                 (art-group-get-by-name *level* "skel-pre-tformer-leg-b" (the-as (pointer level) #f))
                 #f
                 0
                 :name "manipy"
                 :to self
                 :stack-size #x20000
                 )
               )
        )
    (when gp-10
      (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-10) 'prefix "rr-")
      )
    )
  (none)
  )

;; WARN: Return type mismatch object vs none.
(defbehavior pre-tformer-spawn-leg-c process-drawable ()
  (let ((gp-0 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-0
      (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-0) 'prefix "lf-")
      )
    )
  (let ((gp-2 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-2
      (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-2) 'prefix "lm-")
      )
    )
  (let ((gp-4 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-4
      (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-4) 'prefix "lr-")
      )
    )
  (let ((gp-6 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-6
      (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-6) 'prefix "rf-")
      )
    )
  (let ((gp-8 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-8
      (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-8) 'prefix "rm-")
      )
    )
  (let ((gp-10 (process-spawn
                 manipy
                 :init manipy-init
                 (-> self root trans)
                 (-> self entity)
                 (art-group-get-by-name *level* "skel-pre-tformer-leg-c" (the-as (pointer level) #f))
                 #f
                 0
                 :name "manipy"
                 :to self
                 :stack-size #x20000
                 )
               )
        )
    (when gp-10
      (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-10) 'prefix "rr-")
      )
    )
  (none)
  )

;; WARN: Return type mismatch object vs none.
(defbehavior pre-tformer-spawn-spike process-drawable ()
  (let ((gp-0 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-0
      (send-event (ppointer->process gp-0) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-0) 'prefix "lf-")
      )
    )
  (let ((gp-2 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-2
      (send-event (ppointer->process gp-2) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-2) 'prefix "lm-")
      )
    )
  (let ((gp-4 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-4
      (send-event (ppointer->process gp-4) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-4) 'prefix "lr-")
      )
    )
  (let ((gp-6 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-6
      (send-event (ppointer->process gp-6) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-6) 'prefix "rf-")
      )
    )
  (let ((gp-8 (process-spawn
                manipy
                :init manipy-init
                (-> self root trans)
                (-> self entity)
                (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f))
                #f
                0
                :name "manipy"
                :to self
                :stack-size #x20000
                )
              )
        )
    (when gp-8
      (send-event (ppointer->process gp-8) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-8) 'prefix "rm-")
      )
    )
  (let ((gp-10 (process-spawn
                 manipy
                 :init manipy-init
                 (-> self root trans)
                 (-> self entity)
                 (art-group-get-by-name *level* "skel-pre-tformer-spike" (the-as (pointer level) #f))
                 #f
                 0
                 :name "manipy"
                 :to self
                 :stack-size #x20000
                 )
               )
        )
    (when gp-10
      (send-event (ppointer->process gp-10) 'anim-mode 'clone-anim)
      (send-event (ppointer->process gp-10) 'prefix "rr-")
      )
    )
  (none)
  )

(defmethod init-from-entity! ((this pre-tformer) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (set! (-> this root) (new 'process 'trsqv))
  (process-drawable-from-entity! this arg0)
  (initialize-skeleton
    this
    (the-as skeleton-group (art-group-get-by-name *level* "skel-pre-tformer" (the-as (pointer level) #f)))
    (the-as pair 0)
    )
  (logclear! (-> this mask) (process-mask actor-pause))
  (logior! (-> this mask) (process-mask enemy))
  (pre-tformer-spawn-leg-a)
  (pre-tformer-spawn-leg-b)
  (pre-tformer-spawn-leg-c)
  (pre-tformer-spawn-spike)
  (go (method-of-object this idle))
  )

(deftype wall-window-big (process-drawable)
  ()
  (:state-methods
    idle
    )
  )


(defskelgroup skel-wall-window-big precur-wall-window-big precur-wall-window-big-lod0-jg precur-wall-window-big-idle-ja
              ((precur-wall-window-big-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 1000)
              )

(define *precurd-obs-shake-time* (the-as time-frame 0))

(defstate idle (wall-window-big)
  :virtual #t
  :code (behavior ()
    (until #f
      (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
      (until (ja-done? 0)
        (suspend)
        (ja :num! (seek!))
        )
      )
    #f
    )
  :post ja-post
  )

(defmethod init-from-entity! ((this wall-window-big) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (set! (-> this root) (new 'process 'trsqv))
  (process-drawable-from-entity! this arg0)
  (initialize-skeleton
    this
    (the-as skeleton-group (art-group-get-by-name *level* "skel-wall-window-big" (the-as (pointer level) #f)))
    (the-as pair 0)
    )
  (set! (-> this draw lod-set lod 0 dist) 2048000.0)
  (go (method-of-object this idle))
  )

(defbehavior wall-window-big-init-by-other wall-window-big ((arg0 vector) (arg1 entity-actor))
  (process-entity-set! self arg1)
  (set! (-> self root) (new 'process 'trsqv))
  (vector-copy! (-> self root trans) arg0)
  (initialize-skeleton
    self
    (the-as skeleton-group (art-group-get-by-name *level* "skel-wall-window-big" (the-as (pointer level) #f)))
    (the-as pair 0)
    )
  (go-virtual idle)
  )

(defskelgroup skel-precurd-door-a precur-door-a precur-door-a-lod0-jg precur-door-a-idle-ja
              ((precur-door-a-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 6 0 10)
              )

(deftype precurd-door-a (com-airlock)
  ()
  )


(defmethod init-from-entity! ((this precurd-door-a) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
    (set! (-> s5-0 penetrated-by) (penetrate))
    (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
      (set! (-> s5-0 total-prims) (the-as uint 3))
      (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle))
      (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list))
      (set! (-> s4-0 prim-core action) (collide-action solid))
      (set-vector! (-> s4-0 local-sphere) 0.0 24576.0 0.0 40960.0)
      (set! (-> s5-0 root-prim) s4-0)
      )
    (let ((v1-8 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
      (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle))
      (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list))
      (set! (-> v1-8 prim-core action) (collide-action solid))
      (set! (-> v1-8 transform-index) 3)
      (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 40960.0)
      )
    (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
      (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle))
      (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list))
      (set! (-> v1-10 prim-core action) (collide-action solid))
      (set! (-> v1-10 transform-index) 4)
      (set-vector! (-> v1-10 local-sphere) 0.0 24576.0 0.0 40960.0)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (let ((v1-13 (-> s5-0 root-prim)))
      (set! (-> s5-0 backup-collide-as) (-> v1-13 prim-core collide-as))
      (set! (-> s5-0 backup-collide-with) (-> v1-13 prim-core collide-with))
      )
    (set! (-> this root) s5-0)
    )
  (initialize-skeleton
    this
    (the-as skeleton-group (art-group-get-by-name *level* "skel-precurd-door-a" (the-as (pointer level) #f)))
    (the-as pair 0)
    )
  (init-airlock! this)
  (go (method-of-object this close) #t)
  )

(define *precur-blocks-trigger-points* (new 'static 'boxed-array :type float
                                         525926.4
                                         880640.0
                                         974028.8
                                         1155891.2
                                         1220198.4
                                         1295564.8
                                         1335296.0
                                         1444249.6
                                         1433190.4
                                         1637990.4
                                         1682227.2
                                         1721958.4
                                         1800601.6
                                         1850982.4
                                         1890713.6
                                         1921843.2
                                         )
        )

(define *precur-path-trigger-points*
  (new 'static 'boxed-array :type float 532480.0 920780.8 1162854.4 1438924.8 1640038.4 1838284.8)
  )

(define *precur-path-2nd-trigger-points*
  (new 'static 'boxed-array :type float 866713.6 1123123.2 1401241.6 1626112.0 1807155.2 2109849.5)
  )

(define *precur-trigger-idx* 0)

(defun precur-bridge-reset ()
  #f
  )

(defun precur-bridge-path-trigger ((arg0 int))
  (when *target*
    (let ((gp-0 (new 'stack-no-clear 'vector)))
      (vector-copy! gp-0 (target-pos 0))
      (and (< (-> *precur-path-trigger-points* arg0) (-> gp-0 z))
           (< (-> gp-0 z) 2048000.0)
           (< -40960.0 (-> gp-0 x))
           (< (-> gp-0 x) 94208.0)
           (< 778240.0 (-> gp-0 y))
           (< (-> gp-0 y) 860160.0)
           )
      )
    )
  )

(defun precur-bridge-path-2nd-trigger ((arg0 int))
  (when *target*
    (let ((gp-0 (new 'stack-no-clear 'vector)))
      (vector-copy! gp-0 (target-pos 0))
      (and (< (-> *precur-path-2nd-trigger-points* arg0) (-> gp-0 z))
           (< (-> gp-0 z) 2129920.0)
           (< -40960.0 (-> gp-0 x))
           (< (-> gp-0 x) 94208.0)
           (< 778240.0 (-> gp-0 y))
           (< (-> gp-0 y) 860160.0)
           )
      )
    )
  )

(defun precur-bridge-blocks-trigger ((arg0 int))
  (when *target*
    (let ((gp-0 (new 'stack-no-clear 'vector)))
      (vector-copy! gp-0 (target-pos 0))
      (and (< (-> *precur-blocks-trigger-points* arg0) (-> gp-0 z))
           (< (-> gp-0 z) 2048000.0)
           (< -40960.0 (-> gp-0 x))
           (< (-> gp-0 x) 94208.0)
           (< 778240.0 (-> gp-0 y))
           (< (-> gp-0 y) 860160.0)
           )
      )
    )
  )

(defun precur-trigger-update ()
  0
  (none)
  )

(defskelgroup skel-precur-bridge-path-break precur-bridge-path-break precur-bridge-path-break-lod0-jg precur-bridge-path-break-idle-ja
              ((precur-bridge-path-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 3.5381 1.3474 -23.1812 89.6366)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-a-path-break precur-bridge-a-path-break precur-bridge-a-path-break-lod0-jg precur-bridge-a-path-break-idle-ja
              ((precur-bridge-a-path-break-lod0-mg (meters 999999)))
              :bounds (static-spherem -1.2239 0 0.6457 39.9771)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-b-path-break precur-bridge-b-path-break precur-bridge-b-path-break-lod0-jg precur-bridge-b-path-break-idle-ja
              ((precur-bridge-b-path-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 0.5849 0 -0.1007 37.7788)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-c-path-break precur-bridge-c-path-break precur-bridge-c-path-break-lod0-jg precur-bridge-c-path-break-idle-ja
              ((precur-bridge-c-path-break-lod0-mg (meters 999999)))
              :bounds (static-spherem -1.4207 0 1.3753 39.7237)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-d-path-break precur-bridge-d-path-break precur-bridge-d-path-break-lod0-jg precur-bridge-d-path-break-idle-ja
              ((precur-bridge-d-path-break-lod0-mg (meters 999999)))
              :bounds (static-spherem -1.4207 0 1.3753 37.9194)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-e-path-break precur-bridge-e-path-break precur-bridge-e-path-break-lod0-jg precur-bridge-e-path-break-idle-ja
              ((precur-bridge-e-path-break-lod0-mg (meters 999999)))
              :bounds (static-spherem -0.0382 -0.0803 -0.1898 52.5007)
              :origin-joint-index 3
              )

(deftype precur-bridge-path-break (process-drawable)
  ((root               collide-shape :override)
   (triggered?         symbol)
   (idx                uint8)
   (l-origin           matrix         :inline)
   (actor-group        (pointer actor-group))
   (actor-group-count  int32)
   (anim-1-time        time-frame)
   (delay-time         time-frame)
   (debris-handle      handle)
   )
  (:state-methods
    idle
    )
  (:methods
    (precur-bridge-path-break-method-21 (_type_) none)
    (init-collision! (_type_) none)
    (get-skel (_type_) art-group)
    (set-idx-by-name (_type_) none)
    (precur-bridge-path-break-method-25 (_type_ vector) none)
    (precur-bridge-path-break-method-26 (_type_) none)
    (precur-bridge-path-break-method-27 (_type_) none)
    )
  )


(defmethod precur-bridge-path-break-method-27 ((this precur-bridge-path-break))
  0
  (none)
  )

;; WARN: Return type mismatch matrix vs none.
(defmethod precur-bridge-path-break-method-26 ((this precur-bridge-path-break))
  (let ((v1-1 (-> this node-list data 3)))
    (matrix-4x4-inverse! (-> this l-origin) (-> v1-1 bone transform))
    )
  (none)
  )

(defmethod precur-bridge-path-break-method-25 ((this precur-bridge-path-break) (arg0 vector))
  (let ((s4-0 (-> this node-list data 3)))
    (vector<-cspace! (new 'stack-no-clear 'vector) s4-0)
    (matrix*! (the-as matrix arg0) (-> s4-0 bone transform) (-> this l-origin))
    )
  0
  (none)
  )

(defmethod set-idx-by-name ((this precur-bridge-path-break))
  (let ((s5-0 (-> this name)))
    (cond
      ((string= s5-0 "precur-bridge-path-break-1")
       (set! (-> this idx) (the-as uint 0))
       0
       )
      ((string= s5-0 "precur-bridge-path-break-2")
       (set! (-> this idx) (the-as uint 1))
       )
      ((string= s5-0 "precur-bridge-path-break-3")
       (set! (-> this idx) (the-as uint 2))
       )
      ((string= s5-0 "precur-bridge-path-break-4")
       (set! (-> this idx) (the-as uint 3))
       )
      ((string= s5-0 "precur-bridge-path-break-5")
       (set! (-> this idx) (the-as uint 4))
       )
      ((string= s5-0 "precur-bridge-path-break-6")
       (set! (-> this idx) (the-as uint 5))
       )
      )
    )
  (none)
  )

(defmethod get-skel ((this precur-bridge-path-break))
  (let* ((v1-1 (-> this idx))
         (v0-0 (cond
                 ((zero? v1-1)
                  (art-group-get-by-name *level* "skel-precur-bridge-path-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 1)
                  (art-group-get-by-name *level* "skel-precur-bridge-a-path-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 2)
                  (art-group-get-by-name *level* "skel-precur-bridge-b-path-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 3)
                  (art-group-get-by-name *level* "skel-precur-bridge-c-path-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 4)
                  (art-group-get-by-name *level* "skel-precur-bridge-d-path-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 5)
                  (art-group-get-by-name *level* "skel-precur-bridge-e-path-break" (the-as (pointer level) #f))
                  )
                 )
               )
         )
    (cond
      (v0-0
        (empty)
        v0-0
        )
      (else
        (art-group-get-by-name *level* "skel-precur-bridge-path-break" (the-as (pointer level) #f))
        )
      )
    )
  )

(defmethod init-collision! ((this precur-bridge-path-break))
  (set! (-> this root) #f)
  (let ((v1-0 (-> this idx)))
    (cond
      ((zero? v1-0)
       (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 9) 0)))
           (set! (-> s5-0 total-prims) (the-as uint 10))
           (set! (-> s4-0 prim-core collide-as) (collide-spec pusher))
           (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-0 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> s4-0 transform-index) 3)
           (set-vector! (-> s4-0 local-sphere) 14492.058 5518.95 -94950.195 367151.5)
           (set! (-> s5-0 root-prim) s4-0)
           )
         (pusher-init s5-0)
         (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-12 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-12 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-12 transform-index) 3)
           (set-vector! (-> v1-12 local-sphere) -3893.6577 286.3104 0.0 139815.73)
           )
         (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
           (set! (-> v1-14 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-14 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-14 transform-index) 4)
           (set-vector! (-> v1-14 local-sphere) 0.0 79.4624 -1256.6528 98625.945)
           )
         (let ((v1-16 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0))))
           (set! (-> v1-16 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-16 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-16 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-16 transform-index) 5)
           (set-vector! (-> v1-16 local-sphere) 0.0 1306.624 96.256 95901.29)
           )
         (let ((v1-18 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0))))
           (set! (-> v1-18 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-18 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-18 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-18 transform-index) 6)
           (set-vector! (-> v1-18 local-sphere) 2593.5872 -20.0704 0.0 104466.02)
           )
         (let ((v1-20 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 4) (the-as uint 0))))
           (set! (-> v1-20 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-20 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-20 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-20 transform-index) 7)
           (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 83188.53)
           )
         (let ((v1-22 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 5) (the-as uint 0))))
           (set! (-> v1-22 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-22 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-22 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-22 transform-index) 8)
           (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 127257.4)
           )
         (let ((v1-24 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 6) (the-as uint 0))))
           (set! (-> v1-24 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-24 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-24 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-24 transform-index) 9)
           (set-vector! (-> v1-24 local-sphere) -343.6544 47.104 928.9728 117174.27)
           )
         (let ((v1-26 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 7) (the-as uint 0))))
           (set! (-> v1-26 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-26 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-26 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-26 transform-index) 10)
           (set-vector! (-> v1-26 local-sphere) 0.0 -462.4384 0.0 70856.3)
           )
         (let ((v1-28 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 8) (the-as uint 0))))
           (set! (-> v1-28 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-28 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-28 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-28 transform-index) 11)
           (set-vector! (-> v1-28 local-sphere) 499.3024 366.1824 0.0 164432.69)
           )
         (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
         (let ((v1-31 (-> s5-0 root-prim)))
           (set! (-> s5-0 backup-collide-as) (-> v1-31 prim-core collide-as))
           (set! (-> s5-0 backup-collide-with) (-> v1-31 prim-core collide-with))
           )
         (set! (-> this root) s5-0)
         )
       )
      ((= v1-0 1)
       (let ((s5-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-1 (new 'process 'collide-shape-prim-group s5-1 (the-as uint 1) 0)))
           (set! (-> s5-1 total-prims) (the-as uint 2))
           (set! (-> s4-1 prim-core collide-as) (collide-spec pusher))
           (set! (-> s4-1 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-1 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> s4-1 transform-index) 3)
           (set-vector! (-> s4-1 local-sphere) -5013.094 0.0 2644.787 163746.2)
           (set! (-> s5-1 root-prim) s4-1)
           )
         (pusher-init s5-1)
         (let ((v1-44 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-44 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-44 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-44 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-44 transform-index) 3)
           (set-vector! (-> v1-44 local-sphere) 0.0 0.0 1480.704 135834.83)
           )
         (set! (-> s5-1 nav-radius) (* 0.75 (-> s5-1 root-prim local-sphere w)))
         (let ((v1-47 (-> s5-1 root-prim)))
           (set! (-> s5-1 backup-collide-as) (-> v1-47 prim-core collide-as))
           (set! (-> s5-1 backup-collide-with) (-> v1-47 prim-core collide-with))
           )
         (set! (-> this root) s5-1)
         )
       )
      ((= v1-0 2)
       (let ((s5-2 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-2 (new 'process 'collide-shape-prim-group s5-2 (the-as uint 1) 0)))
           (set! (-> s5-2 total-prims) (the-as uint 2))
           (set! (-> s4-2 prim-core collide-as) (collide-spec pusher))
           (set! (-> s4-2 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-2 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> s4-2 transform-index) 3)
           (set-vector! (-> s4-2 local-sphere) 2395.7505 0.0 -412.4672 154741.97)
           (set! (-> s5-2 root-prim) s4-2)
           )
         (pusher-init s5-2)
         (let ((v1-60 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-60 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-60 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-60 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-60 transform-index) 3)
           (set-vector! (-> v1-60 local-sphere) 0.0 0.0 344.8832 153374.72)
           )
         (set! (-> s5-2 nav-radius) (* 0.75 (-> s5-2 root-prim local-sphere w)))
         (let ((v1-63 (-> s5-2 root-prim)))
           (set! (-> s5-2 backup-collide-as) (-> v1-63 prim-core collide-as))
           (set! (-> s5-2 backup-collide-with) (-> v1-63 prim-core collide-with))
           )
         (set! (-> this root) s5-2)
         )
       )
      ((= v1-0 3)
       (let ((s5-3 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-3 (new 'process 'collide-shape-prim-group s5-3 (the-as uint 1) 0)))
           (set! (-> s5-3 total-prims) (the-as uint 2))
           (set! (-> s4-3 prim-core collide-as) (collide-spec pusher))
           (set! (-> s4-3 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-3 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> s4-3 transform-index) 3)
           (set-vector! (-> s4-3 local-sphere) -5819.187 0.0 5633.229 162708.28)
           (set! (-> s5-3 root-prim) s4-3)
           )
         (pusher-init s5-3)
         (let ((v1-76 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-76 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-76 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-76 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-76 transform-index) 3)
           (set-vector! (-> v1-76 local-sphere) 0.0 0.0 254.3616 131729.4)
           )
         (set! (-> s5-3 nav-radius) (* 0.75 (-> s5-3 root-prim local-sphere w)))
         (let ((v1-79 (-> s5-3 root-prim)))
           (set! (-> s5-3 backup-collide-as) (-> v1-79 prim-core collide-as))
           (set! (-> s5-3 backup-collide-with) (-> v1-79 prim-core collide-with))
           )
         (set! (-> this root) s5-3)
         )
       )
      ((= v1-0 4)
       (let ((s5-4 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-4 (new 'process 'collide-shape-prim-group s5-4 (the-as uint 1) 0)))
           (set! (-> s5-4 total-prims) (the-as uint 2))
           (set! (-> s4-4 prim-core collide-as) (collide-spec pusher))
           (set! (-> s4-4 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-4 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> s4-4 transform-index) 3)
           (set-vector! (-> s4-4 local-sphere) -5819.187 0.0 5633.229 155317.86)
           (set! (-> s5-4 root-prim) s4-4)
           )
         (pusher-init s5-4)
         (let ((v1-92 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-92 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-92 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-92 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-92 transform-index) 3)
           (set-vector! (-> v1-92 local-sphere) 1553.2032 0.0 -466.944 123079.48)
           )
         (set! (-> s5-4 nav-radius) (* 0.75 (-> s5-4 root-prim local-sphere w)))
         (let ((v1-95 (-> s5-4 root-prim)))
           (set! (-> s5-4 backup-collide-as) (-> v1-95 prim-core collide-as))
           (set! (-> s5-4 backup-collide-with) (-> v1-95 prim-core collide-with))
           )
         (set! (-> this root) s5-4)
         )
       )
      ((= v1-0 5)
       (let ((s5-6 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-5 (new 'process 'collide-shape-prim-group s5-6 (the-as uint 1) 0)))
           (set! (-> s5-6 total-prims) (the-as uint 2))
           (set! (-> s4-5 prim-core collide-as) (collide-spec pusher))
           (set! (-> s4-5 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-5 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> s4-5 transform-index) 3)
           (set-vector! (-> s4-5 local-sphere) -156.4672 -328.9088 -777.4208 215042.88)
           (set! (-> s5-6 root-prim) s4-5)
           )
         (pusher-init s5-6)
         (let ((v1-108 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-108 prim-core collide-as) (collide-spec pusher))
           (set! (-> v1-108 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-108 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
           (set! (-> v1-108 transform-index) 3)
           (set-vector! (-> v1-108 local-sphere) 1206.272 4508.4673 -5612.749 189132.39)
           )
         (set! (-> s5-6 nav-radius) (* 0.75 (-> s5-6 root-prim local-sphere w)))
         (let ((v1-111 (-> s5-6 root-prim)))
           (set! (-> s5-6 backup-collide-as) (-> v1-111 prim-core collide-as))
           (set! (-> s5-6 backup-collide-with) (-> v1-111 prim-core collide-with))
           )
         (set! (-> this root) s5-6)
         )
       )
      )
    )
  (when (not (-> this root))
    (let ((s5-7 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
      (let ((s4-6 (new 'process 'collide-shape-prim-mesh s5-7 (the-as uint 0) (the-as uint 0))))
        (set! (-> s4-6 prim-core collide-as) (collide-spec pusher))
        (set! (-> s4-6 prim-core collide-with) (collide-spec jak player-list))
        (set! (-> s4-6 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide))
        (set! (-> s4-6 transform-index) 0)
        (set-vector! (-> s4-6 local-sphere) 0.0 0.0 0.0 4096000.0)
        (set! (-> s5-7 total-prims) (the-as uint 1))
        (set! (-> s5-7 root-prim) s4-6)
        )
      (pusher-init s5-7)
      (set! (-> s5-7 nav-radius) (* 0.75 (-> s5-7 root-prim local-sphere w)))
      (let ((v1-126 (-> s5-7 root-prim)))
        (set! (-> s5-7 backup-collide-as) (-> v1-126 prim-core collide-as))
        (set! (-> s5-7 backup-collide-with) (-> v1-126 prim-core collide-with))
        )
      (set! (-> this root) s5-7)
      )
    )
  0
  (none)
  )

(defstate idle (precur-bridge-path-break)
  :virtual #t
  :enter (behavior ()
    (ja :num-func num-func-identity :frame-num 0.0)
    )
  :trans (behavior ()
    (rider-trans)
    )
  :code sleep-code
  :post (behavior ()
    (cond
      ((task-node-closed? (game-task-node precursor-destroy-ship-escape-continue))
       (if (not (handle->process (-> self debris-handle)))
           (set! (-> self debris-handle) (process->handle (process-by-name "precurd-debris-part-1" *active-pool*)))
           )
       (send-event (handle->process (-> self debris-handle)) 'start)
       (logclear! (-> self draw status) (draw-control-status no-draw))
       (send-event *target* 'get-pickup (pickup-type eco-pill-light) -1000.0)
       )
      (else
        (logior! (-> self draw status) (draw-control-status no-draw))
        )
      )
    (let ((gp-0 (new 'stack-no-clear 'vector)))
      (precur-bridge-path-break-method-25 self gp-0)
      (dotimes (s5-0 (-> self actor-group-count))
        (let ((s4-0 (-> self actor-group s5-0)))
          (dotimes (s3-0 (-> s4-0 length))
            (let ((a1-5 (new 'stack-no-clear 'event-message-block)))
              (set! (-> a1-5 from) (process->ppointer self))
              (set! (-> a1-5 num-params) 1)
              (set! (-> a1-5 message) 'xform)
              (set! (-> a1-5 param 0) (the-as uint gp-0))
              (let ((t9-5 send-event-function)
                    (v1-33 (-> s4-0 data s3-0 actor))
                    )
                (t9-5
                  (if v1-33
                      (-> v1-33 extra process)
                      )
                  a1-5
                  )
                )
              )
            )
          )
        )
      )
    (when (precur-bridge-reset)
      (ja :num-func num-func-identity :frame-num 0.0)
      (set! (-> self triggered?) #f)
      )
    (when *debug-segment*
      (if (zero? (-> self idx))
          (precur-trigger-update)
          )
      )
    (when (and (-> self triggered?) (ja-done? 0) (zero? (-> self anim-1-time)))
      (ja :group! precur-bridge-path-break-idle2-ja :num! min)
      (set-time! (-> self anim-1-time))
      (set! (-> self triggered?) #f)
      )
    (when (and (not (-> self triggered?))
               (nonzero? (-> self anim-1-time))
               (or (precur-bridge-path-2nd-trigger (the-as int (-> self idx)))
                   (time-elapsed? (-> self anim-1-time) (-> self delay-time))
                   )
               )
      (sound-play "plat-fall")
      (sound-play "plat-shake")
      (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock))
      (set! *precurd-obs-shake-time* (+ (current-time) (rand-vu-int-range (seconds 1) (seconds 2))))
      (set! (-> self triggered?) #t)
      (logclear! (-> self root root-prim prim-core action) (collide-action rideable))
      )
    (when (and (precur-bridge-path-trigger (the-as int (-> self idx)))
               (zero? (-> self anim-1-time))
               (not (-> self triggered?))
               )
      (sound-play "plat-separate")
      (sound-play "plat-shake")
      (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock))
      (set! *precurd-obs-shake-time* (+ (current-time) (rand-vu-int-range (seconds 2) (seconds 3))))
      (set! (-> self triggered?) #t)
      )
    (when (and (< *precurd-obs-shake-time* (current-time)) (precur-bridge-path-trigger 0))
      (sound-play "plat-shake")
      (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock))
      (set! *precurd-obs-shake-time* (+ (current-time) (rand-vu-int-range (seconds 3) (seconds 4))))
      )
    (if (-> self triggered?)
        (ja :num! (seek!))
        )
    (if (not (-> self triggered?))
        (ja :num-func num-func-identity :frame-num 0.0)
        )
    (rider-post)
    (if (= (-> self l-origin trans x) 0.0)
        (precur-bridge-path-break-method-26 self)
        )
    )
  )

(define *precur-path-delay-time* (new 'static 'boxed-array :type float 6.7 4.9 5.25 3.0 2.7 4.5))

(define *precurd-blow-snd-id* (new 'static 'sound-id))

(defun precur-play-blow-sound ()
  (when (and (zero? *precurd-blow-snd-id*)
             (task-node-closed? (game-task-node precursor-destroy-ship-escape-continue))
             )
    (set! *precurd-blow-snd-id* (new-sound-id))
    (sound-play "prec-blow-amb" :id *precurd-blow-snd-id* :pitch 1 :position (target-pos 0))
    )
  0
  (none)
  )

(defun precur-stop-blow-sound ()
  (when (nonzero? *precurd-blow-snd-id*)
    (sound-stop *precurd-blow-snd-id*)
    (set! *precurd-blow-snd-id* (new 'static 'sound-id))
    0
    )
  (none)
  )

(defmethod init-from-entity! ((this precur-bridge-path-break) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (local-vars (sv-16 res-tag))
  (set-idx-by-name this)
  (init-collision! this)
  (process-drawable-from-entity! this arg0)
  (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0))
  (set! (-> this anim-1-time) 0)
  (set! (-> this delay-time)
        (the-as time-frame (the int (* 300.0 (-> *precur-path-delay-time* (-> this idx)))))
        )
  (set! (-> this debris-handle) (the-as handle #f))
  (precur-bridge-reset)
  (set! sv-16 (new 'static 'res-tag))
  (let ((v1-13 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16))))
    (cond
      ((and v1-13 (nonzero? (-> sv-16 elt-count)))
       (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count)))
       (set! (-> this actor-group) (the-as (pointer actor-group) v1-13))
       )
      (else
        (format 0 "ERROR: ~S: entity missing actor-group!~%" (-> this name))
        )
      )
    )
  (set! (-> this draw lod-set lod 0 dist) 14336000.0)
  (set! (-> this draw lod-set lod 1 dist) 14336000.0)
  (set! (-> this draw lod-set lod 2 dist) 14336000.0)
  (set! (-> this triggered?) #f)
  (logclear! (-> this mask) (process-mask actor-pause))
  (let ((a0-16 (-> this skel root-channel 0)))
    (set! (-> a0-16 frame-group) (if (> (-> this skel active-channels) 0)
                                     (-> this skel root-channel 0 frame-group)
                                     )
          )
    (set! (-> a0-16 param 0) 1.0)
    (set! (-> a0-16 frame-num) 0.0)
    (joint-control-channel-group!
      a0-16
      (if (> (-> this skel active-channels) 0)
          (-> this skel root-channel 0 frame-group)
          )
      num-func-loop!
      )
    )
  (precur-stop-blow-sound)
  (go (method-of-object this idle))
  )

(defskelgroup skel-precur-bridge-a-blocks-break precur-bridge-a-blocks-break precur-bridge-a-blocks-break-lod0-jg precur-bridge-a-blocks-break-idle-ja
              ((precur-bridge-a-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 9.0334 0.2107 -3.8519 494.66)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-b-blocks-break precur-bridge-b-blocks-break precur-bridge-b-blocks-break-lod0-jg precur-bridge-b-blocks-break-idle-ja
              ((precur-bridge-b-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 3.4472 -1.3478 -0.911 304.626)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-c-blocks-break precur-bridge-c-blocks-break precur-bridge-c-blocks-break-lod0-jg precur-bridge-c-blocks-break-idle-ja
              ((precur-bridge-c-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 9.998 -0.1649 -1.0795 294.914)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-d-blocks-break precur-bridge-d-blocks-break precur-bridge-d-blocks-break-lod0-jg precur-bridge-d-blocks-break-idle-ja
              ((precur-bridge-d-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 1.386 -0.0346 -10.9652 321.94598)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-e-blocks-break precur-bridge-e-blocks-break precur-bridge-e-blocks-break-lod0-jg precur-bridge-e-blocks-break-idle-ja
              ((precur-bridge-e-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 1.0517 -0.4516 -13.2966 452.576)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-f-blocks-break precur-bridge-f-blocks-break precur-bridge-f-blocks-break-lod0-jg precur-bridge-f-blocks-break-idle-ja
              ((precur-bridge-f-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 3.9763 -0.4431 -3.0526 228.36398)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-g-blocks-break precur-bridge-g-blocks-break precur-bridge-g-blocks-break-lod0-jg precur-bridge-g-blocks-break-idle-ja
              ((precur-bridge-g-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 86.51)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-h-blocks-break precur-bridge-h-blocks-break precur-bridge-h-blocks-break-lod0-jg precur-bridge-h-blocks-break-idle-ja
              ((precur-bridge-h-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem -1.1676 0.2012 -9.3751 356.966)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-i-blocks-break precur-bridge-i-blocks-break precur-bridge-i-blocks-break-lod0-jg precur-bridge-i-blocks-break-idle-ja
              ((precur-bridge-i-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 6.7898 0.0443 0.6402 296.336)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-j-blocks-break precur-bridge-j-blocks-break precur-bridge-j-blocks-break-lod0-jg precur-bridge-j-blocks-break-idle-ja
              ((precur-bridge-j-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem -1.4829 0.4836 -4.9468 330.75598)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-k-blocks-break precur-bridge-k-blocks-break precur-bridge-k-blocks-break-lod0-jg precur-bridge-k-blocks-break-idle-ja
              ((precur-bridge-k-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 0.576 0.5238 -9.0496 389.09198)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-l-blocks-break precur-bridge-l-blocks-break precur-bridge-l-blocks-break-lod0-jg precur-bridge-l-blocks-break-idle-ja
              ((precur-bridge-l-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 2.2279 0.4542 -7.9808 363.432)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-m-blocks-break precur-bridge-m-blocks-break precur-bridge-m-blocks-break-lod0-jg precur-bridge-m-blocks-break-idle-ja
              ((precur-bridge-m-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem -3.1801 0.1337 -7.183 346.85797)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-n-blocks-break precur-bridge-n-blocks-break precur-bridge-n-blocks-break-lod0-jg precur-bridge-n-blocks-break-idle-ja
              ((precur-bridge-n-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem -3.7999 0.003 -5.6982 302.406)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-o-blocks-break precur-bridge-o-blocks-break precur-bridge-o-blocks-break-lod0-jg precur-bridge-o-blocks-break-idle-ja
              ((precur-bridge-o-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 3.0848 0.5307 -13.0752 387.26398)
              :origin-joint-index 3
              )

(defskelgroup skel-precur-bridge-p-blocks-break precur-bridge-p-blocks-break precur-bridge-p-blocks-break-lod0-jg precur-bridge-p-blocks-break-idle-ja
              ((precur-bridge-p-blocks-break-lod0-mg (meters 999999)))
              :bounds (static-spherem 3.2394 0.174 -3.3591 299.408)
              :origin-joint-index 3
              )

(deftype precur-bridge-blocks-break (process-drawable)
  ((root        collide-shape :override)
   (triggered?  symbol)
   (idx         uint8)
   (snds        sound-id       5)
   (toe-up?     symbol         5)
   )
  (:state-methods
    idle
    )
  (:methods
    (precur-bridge-blocks-break-method-21 (_type_) none)
    (init-collision! (_type_) none)
    (init-collision2! (_type_) none)
    (get-skel (_type_) art-group)
    (set-idx-by-name (_type_) none)
    )
  )


(defmethod set-idx-by-name ((this precur-bridge-blocks-break))
  (let ((s5-0 (-> this name)))
    (cond
      ((string= s5-0 "precur-bridge-blocks-break-1")
       (set! (-> this idx) (the-as uint 0))
       0
       )
      ((string= s5-0 "precur-bridge-blocks-break-2")
       (set! (-> this idx) (the-as uint 1))
       )
      ((string= s5-0 "precur-bridge-blocks-break-3")
       (set! (-> this idx) (the-as uint 2))
       )
      ((string= s5-0 "precur-bridge-blocks-break-4")
       (set! (-> this idx) (the-as uint 3))
       )
      ((string= s5-0 "precur-bridge-blocks-break-5")
       (set! (-> this idx) (the-as uint 4))
       )
      ((string= s5-0 "precur-bridge-blocks-break-6")
       (set! (-> this idx) (the-as uint 5))
       )
      ((string= s5-0 "precur-bridge-blocks-break-7")
       (set! (-> this idx) (the-as uint 6))
       )
      ((string= s5-0 "precur-bridge-blocks-break-8")
       (set! (-> this idx) (the-as uint 7))
       )
      ((string= s5-0 "precur-bridge-blocks-break-9")
       (set! (-> this idx) (the-as uint 8))
       )
      ((string= s5-0 "precur-bridge-blocks-break-10")
       (set! (-> this idx) (the-as uint 9))
       )
      ((string= s5-0 "precur-bridge-blocks-break-11")
       (set! (-> this idx) (the-as uint 10))
       )
      ((string= s5-0 "precur-bridge-blocks-break-12")
       (set! (-> this idx) (the-as uint 11))
       )
      ((string= s5-0 "precur-bridge-blocks-break-13")
       (set! (-> this idx) (the-as uint 12))
       )
      ((string= s5-0 "precur-bridge-blocks-break-14")
       (set! (-> this idx) (the-as uint 13))
       )
      ((string= s5-0 "precur-bridge-blocks-break-15")
       (set! (-> this idx) (the-as uint 14))
       )
      ((string= s5-0 "precur-bridge-blocks-break-16")
       (set! (-> this idx) (the-as uint 15))
       )
      )
    )
  (none)
  )

(defmethod get-skel ((this precur-bridge-blocks-break))
  (let* ((v1-1 (-> this idx))
         (v0-0 (cond
                 ((zero? v1-1)
                  (art-group-get-by-name *level* "skel-precur-bridge-a-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 1)
                  (art-group-get-by-name *level* "skel-precur-bridge-b-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 2)
                  (art-group-get-by-name *level* "skel-precur-bridge-c-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 3)
                  (art-group-get-by-name *level* "skel-precur-bridge-d-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 4)
                  (art-group-get-by-name *level* "skel-precur-bridge-e-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 5)
                  (art-group-get-by-name *level* "skel-precur-bridge-f-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 6)
                  (art-group-get-by-name *level* "skel-precur-bridge-g-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 7)
                  (art-group-get-by-name *level* "skel-precur-bridge-h-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 8)
                  (art-group-get-by-name *level* "skel-precur-bridge-i-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 9)
                  (art-group-get-by-name *level* "skel-precur-bridge-j-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 10)
                  (art-group-get-by-name *level* "skel-precur-bridge-k-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 11)
                  (art-group-get-by-name *level* "skel-precur-bridge-l-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 12)
                  (art-group-get-by-name *level* "skel-precur-bridge-m-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 13)
                  (art-group-get-by-name *level* "skel-precur-bridge-n-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 14)
                  (art-group-get-by-name *level* "skel-precur-bridge-o-blocks-break" (the-as (pointer level) #f))
                  )
                 ((= v1-1 15)
                  (art-group-get-by-name *level* "skel-precur-bridge-p-blocks-break" (the-as (pointer level) #f))
                  )
                 )
               )
         )
    (cond
      (v0-0
        (empty)
        v0-0
        )
      (else
        (art-group-get-by-name *level* "skel-precur-bridge-a-path-break" (the-as (pointer level) #f))
        )
      )
    )
  )

(defmethod init-collision2! ((this precur-bridge-blocks-break))
  (set! (-> this root) #f)
  (case (-> this idx)
    ((8)
     (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
       (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0)))
         (set! (-> s5-0 total-prims) (the-as uint 4))
         (set! (-> s4-0 prim-core collide-as) (collide-spec enemy))
         (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> s4-0 prim-core action) (collide-action solid deadly))
         (set! (-> s4-0 transform-index) 3)
         (set-vector! (-> s4-0 local-sphere) 27811.021 181.4528 2622.2593 60689.613)
         (set! (-> s5-0 root-prim) s4-0)
         )
       (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
         (set! (-> v1-10 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-10 prim-core action) (collide-action solid deadly))
         (set! (-> v1-10 transform-index) 3)
         (set-vector! (-> v1-10 local-sphere) -4582.605 0.0 0.0 17555.047)
         )
       (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
         (set! (-> v1-12 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-12 prim-core action) (collide-action solid deadly))
         (set! (-> v1-12 transform-index) 4)
         (set-vector! (-> v1-12 local-sphere) 2863.923 0.0 131.072 32398.951)
         )
       (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0))))
         (set! (-> v1-14 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-14 prim-core action) (collide-action solid deadly))
         (set! (-> v1-14 transform-index) 5)
         (set-vector! (-> v1-14 local-sphere) 3861.2993 0.0 0.0 20425.523)
         )
       (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
       (let ((v1-17 (-> s5-0 root-prim)))
         (set! (-> s5-0 backup-collide-as) (-> v1-17 prim-core collide-as))
         (set! (-> s5-0 backup-collide-with) (-> v1-17 prim-core collide-with))
         )
       (set! (-> this root) s5-0)
       )
     )
    ((9)
     (let ((s5-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
       (let ((s4-1 (new 'process 'collide-shape-prim-group s5-1 (the-as uint 3) 0)))
         (set! (-> s5-1 total-prims) (the-as uint 4))
         (set! (-> s4-1 prim-core collide-as) (collide-spec enemy))
         (set! (-> s4-1 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> s4-1 prim-core action) (collide-action solid deadly))
         (set! (-> s4-1 transform-index) 3)
         (set-vector! (-> s4-1 local-sphere) -6073.9585 1980.8256 -20262.094 67738.83)
         (set! (-> s5-1 root-prim) s4-1)
         )
       (let ((v1-28 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 0) (the-as uint 0))))
         (set! (-> v1-28 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-28 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-28 prim-core action) (collide-action solid deadly))
         (set! (-> v1-28 transform-index) 3)
         (set-vector! (-> v1-28 local-sphere) 0.0 0.0 1085.8496 31956.992)
         )
       (let ((v1-30 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 1) (the-as uint 0))))
         (set! (-> v1-30 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-30 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-30 prim-core action) (collide-action solid deadly))
         (set! (-> v1-30 transform-index) 4)
         (set-vector! (-> v1-30 local-sphere) 0.0 0.0 -3903.8977 18616.73)
         )
       (let ((v1-32 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 2) (the-as uint 0))))
         (set! (-> v1-32 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-32 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-32 prim-core action) (collide-action solid deadly))
         (set! (-> v1-32 transform-index) 5)
         (set-vector! (-> v1-32 local-sphere) -4066.9185 0.0 0.0 18914.1)
         )
       (set! (-> s5-1 nav-radius) (* 0.75 (-> s5-1 root-prim local-sphere w)))
       (let ((v1-35 (-> s5-1 root-prim)))
         (set! (-> s5-1 backup-collide-as) (-> v1-35 prim-core collide-as))
         (set! (-> s5-1 backup-collide-with) (-> v1-35 prim-core collide-with))
         )
       (set! (-> this root) s5-1)
       )
     )
    ((10)
     (let ((s5-2 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
       (let ((s4-2 (new 'process 'collide-shape-prim-group s5-2 (the-as uint 3) 0)))
         (set! (-> s5-2 total-prims) (the-as uint 4))
         (set! (-> s4-2 prim-core collide-as) (collide-spec enemy))
         (set! (-> s4-2 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> s4-2 prim-core action) (collide-action solid deadly))
         (set! (-> s4-2 transform-index) 3)
         (set-vector! (-> s4-2 local-sphere) 2359.296 2145.4849 -37067.16 79686.04)
         (set! (-> s5-2 root-prim) s4-2)
         )
       (let ((v1-46 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 0) (the-as uint 0))))
         (set! (-> v1-46 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-46 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-46 prim-core action) (collide-action solid deadly))
         (set! (-> v1-46 transform-index) 3)
         (set-vector! (-> v1-46 local-sphere) 3346.8416 0.0 3758.4895 21093.172)
         )
       (let ((v1-48 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 1) (the-as uint 0))))
         (set! (-> v1-48 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-48 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-48 prim-core action) (collide-action solid deadly))
         (set! (-> v1-48 transform-index) 4)
         (set-vector! (-> v1-48 local-sphere) 0.0 0.0 -3421.389 22275.277)
         )
       (let ((v1-50 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 2) (the-as uint 0))))
         (set! (-> v1-50 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-50 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-50 prim-core action) (collide-action solid deadly))
         (set! (-> v1-50 transform-index) 5)
         (set-vector! (-> v1-50 local-sphere) 3240.3457 0.0 2986.3936 32168.756)
         )
       (set! (-> s5-2 nav-radius) (* 0.75 (-> s5-2 root-prim local-sphere w)))
       (let ((v1-53 (-> s5-2 root-prim)))
         (set! (-> s5-2 backup-collide-as) (-> v1-53 prim-core collide-as))
         (set! (-> s5-2 backup-collide-with) (-> v1-53 prim-core collide-with))
         )
       (set! (-> this root) s5-2)
       )
     )
    ((11)
     (let ((s5-3 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
       (let ((s4-3 (new 'process 'collide-shape-prim-group s5-3 (the-as uint 3) 0)))
         (set! (-> s5-3 total-prims) (the-as uint 4))
         (set! (-> s4-3 prim-core collide-as) (collide-spec enemy))
         (set! (-> s4-3 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> s4-3 prim-core action) (collide-action solid deadly))
         (set! (-> s4-3 transform-index) 3)
         (set-vector! (-> s4-3 local-sphere) 9125.479 1860.4032 -32689.357 74430.875)
         (set! (-> s5-3 root-prim) s4-3)
         )
       (let ((v1-64 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 0) (the-as uint 0))))
         (set! (-> v1-64 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-64 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-64 prim-core action) (collide-action solid deadly))
         (set! (-> v1-64 transform-index) 3)
         (set-vector! (-> v1-64 local-sphere) -2207.3345 0.0 4195.5327 31714.51)
         )
       (let ((v1-66 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 1) (the-as uint 0))))
         (set! (-> v1-66 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-66 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-66 prim-core action) (collide-action solid deadly))
         (set! (-> v1-66 transform-index) 4)
         (set-vector! (-> v1-66 local-sphere) 0.0 0.0 442.368 17464.934)
         )
       (let ((v1-68 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 2) (the-as uint 0))))
         (set! (-> v1-68 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-68 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-68 prim-core action) (collide-action solid deadly))
         (set! (-> v1-68 transform-index) 5)
         (set-vector! (-> v1-68 local-sphere) 0.0 0.0 396.0832 30894.898)
         )
       (set! (-> s5-3 nav-radius) (* 0.75 (-> s5-3 root-prim local-sphere w)))
       (let ((v1-71 (-> s5-3 root-prim)))
         (set! (-> s5-3 backup-collide-as) (-> v1-71 prim-core collide-as))
         (set! (-> s5-3 backup-collide-with) (-> v1-71 prim-core collide-with))
         )
       (set! (-> this root) s5-3)
       )
     )
    ((12)
     (let ((s5-4 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
       (let ((s4-4 (new 'process 'collide-shape-prim-group s5-4 (the-as uint 3) 0)))
         (set! (-> s5-4 total-prims) (the-as uint 4))
         (set! (-> s4-4 prim-core collide-as) (collide-spec enemy))
         (set! (-> s4-4 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> s4-4 prim-core action) (collide-action solid deadly))
         (set! (-> s4-4 transform-index) 3)
         (set-vector! (-> s4-4 local-sphere) -13025.689 547.6352 -29421.568 71036.516)
         (set! (-> s5-4 root-prim) s4-4)
         )
       (let ((v1-82 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 0) (the-as uint 0))))
         (set! (-> v1-82 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-82 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-82 prim-core action) (collide-action solid deadly))
         (set! (-> v1-82 transform-index) 3)
         (set-vector! (-> v1-82 local-sphere) 0.0 0.0 1914.0608 20204.34)
         )
       (let ((v1-84 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 1) (the-as uint 0))))
         (set! (-> v1-84 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-84 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-84 prim-core action) (collide-action solid deadly))
         (set! (-> v1-84 transform-index) 4)
         (set-vector! (-> v1-84 local-sphere) 0.0 0.0 278.528 35575.4)
         )
       (let ((v1-86 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 2) (the-as uint 0))))
         (set! (-> v1-86 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-86 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-86 prim-core action) (collide-action solid deadly))
         (set! (-> v1-86 transform-index) 5)
         (set-vector! (-> v1-86 local-sphere) 0.0 0.0 -3116.6465 29947.904)
         )
       (set! (-> s5-4 nav-radius) (* 0.75 (-> s5-4 root-prim local-sphere w)))
       (let ((v1-89 (-> s5-4 root-prim)))
         (set! (-> s5-4 backup-collide-as) (-> v1-89 prim-core collide-as))
         (set! (-> s5-4 backup-collide-with) (-> v1-89 prim-core collide-with))
         )
       (set! (-> this root) s5-4)
       )
     )
    ((13)
     (let ((s5-5 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
       (let ((s4-5 (new 'process 'collide-shape-prim-group s5-5 (the-as uint 3) 0)))
         (set! (-> s5-5 total-prims) (the-as uint 4))
         (set! (-> s4-5 prim-core collide-as) (collide-spec enemy))
         (set! (-> s4-5 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> s4-5 prim-core action) (collide-action solid deadly))
         (set! (-> s4-5 transform-index) 3)
         (set-vector! (-> s4-5 local-sphere) -15564.391 12.288 -23339.828 61932.75)
         (set! (-> s5-5 root-prim) s4-5)
         )
       (let ((v1-100 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 0) (the-as uint 0))))
         (set! (-> v1-100 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-100 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-100 prim-core action) (collide-action solid deadly))
         (set! (-> v1-100 transform-index) 3)
         (set-vector! (-> v1-100 local-sphere) 0.0 0.0 4241.8174 19154.535)
         )
       (let ((v1-102 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 1) (the-as uint 0))))
         (set! (-> v1-102 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-102 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-102 prim-core action) (collide-action solid deadly))
         (set! (-> v1-102 transform-index) 4)
         (set-vector! (-> v1-102 local-sphere) 0.0 0.0 762.2656 34124.188)
         )
       (let ((v1-104 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 2) (the-as uint 0))))
         (set! (-> v1-104 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-104 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-104 prim-core action) (collide-action solid deadly))
         (set! (-> v1-104 transform-index) 5)
         (set-vector! (-> v1-104 local-sphere) 0.0 0.0 0.0 21233.664)
         )
       (set! (-> s5-5 nav-radius) (* 0.75 (-> s5-5 root-prim local-sphere w)))
       (let ((v1-107 (-> s5-5 root-prim)))
         (set! (-> s5-5 backup-collide-as) (-> v1-107 prim-core collide-as))
         (set! (-> s5-5 backup-collide-with) (-> v1-107 prim-core collide-with))
         )
       (set! (-> this root) s5-5)
       )
     )
    ((14)
     (let ((s5-6 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
       (let ((s4-6 (new 'process 'collide-shape-prim-group s5-6 (the-as uint 4) 0)))
         (set! (-> s5-6 total-prims) (the-as uint 5))
         (set! (-> s4-6 prim-core collide-as) (collide-spec enemy))
         (set! (-> s4-6 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> s4-6 prim-core action) (collide-action solid deadly))
         (set! (-> s4-6 transform-index) 3)
         (set-vector! (-> s4-6 local-sphere) 12635.341 2173.7473 -53556.02 79311.664)
         (set! (-> s5-6 root-prim) s4-6)
         )
       (let ((v1-118 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 0) (the-as uint 0))))
         (set! (-> v1-118 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-118 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-118 prim-core action) (collide-action solid deadly))
         (set! (-> v1-118 transform-index) 3)
         (set-vector! (-> v1-118 local-sphere) -2649.7024 0.0 0.0 17005.773)
         )
       (let ((v1-120 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 1) (the-as uint 0))))
         (set! (-> v1-120 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-120 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-120 prim-core action) (collide-action solid deadly))
         (set! (-> v1-120 transform-index) 4)
         (set-vector! (-> v1-120 local-sphere) -2694.3489 0.0 -2862.285 16540.057)
         )
       (let ((v1-122 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 2) (the-as uint 0))))
         (set! (-> v1-122 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-122 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-122 prim-core action) (collide-action solid deadly))
         (set! (-> v1-122 transform-index) 5)
         (set-vector! (-> v1-122 local-sphere) -5552.128 0.0 -3180.544 30642.586)
         )
       (let ((v1-124 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 3) (the-as uint 0))))
         (set! (-> v1-124 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-124 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-124 prim-core action) (collide-action solid deadly))
         (set! (-> v1-124 transform-index) 6)
         (set-vector! (-> v1-124 local-sphere) 0.0 0.0 -3341.5168 31176.703)
         )
       (set! (-> s5-6 nav-radius) (* 0.75 (-> s5-6 root-prim local-sphere w)))
       (let ((v1-127 (-> s5-6 root-prim)))
         (set! (-> s5-6 backup-collide-as) (-> v1-127 prim-core collide-as))
         (set! (-> s5-6 backup-collide-with) (-> v1-127 prim-core collide-with))
         )
       (set! (-> this root) s5-6)
       )
     )
    ((15)
     (let ((s5-8 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
       (let ((s4-7 (new 'process 'collide-shape-prim-group s5-8 (the-as uint 2) 0)))
         (set! (-> s5-8 total-prims) (the-as uint 3))
         (set! (-> s4-7 prim-core collide-as) (collide-spec enemy))
         (set! (-> s4-7 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> s4-7 prim-core action) (collide-action solid deadly))
         (set! (-> s4-7 transform-index) 3)
         (set-vector! (-> s4-7 local-sphere) 13268.582 712.704 -13758.874 61318.758)
         (set! (-> s5-8 root-prim) s4-7)
         )
       (let ((v1-138 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 0) (the-as uint 0))))
         (set! (-> v1-138 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-138 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-138 prim-core action) (collide-action solid deadly))
         (set! (-> v1-138 transform-index) 3)
         (set-vector! (-> v1-138 local-sphere) -3382.8865 0.0 1936.1792 32668.057)
         )
       (let ((v1-140 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 1) (the-as uint 0))))
         (set! (-> v1-140 prim-core collide-as) (collide-spec enemy))
         (set! (-> v1-140 prim-core collide-with) (collide-spec jak player-list))
         (set! (-> v1-140 prim-core action) (collide-action solid deadly))
         (set! (-> v1-140 transform-index) 4)
         (set-vector! (-> v1-140 local-sphere) 3927.2449 0.0 4255.744 35694.594)
         )
       (set! (-> s5-8 nav-radius) (* 0.75 (-> s5-8 root-prim local-sphere w)))
       (let ((v1-143 (-> s5-8 root-prim)))
         (set! (-> s5-8 backup-collide-as) (-> v1-143 prim-core collide-as))
         (set! (-> s5-8 backup-collide-with) (-> v1-143 prim-core collide-with))
         )
       (set! (-> this root) s5-8)
       )
     )
    )
  (when (not (-> this root))
    (format 0 "Unknown entity ~S found in precurd-obs~%" (-> this name))
    (let ((s5-9 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
      (let ((v1-149 (new 'process 'collide-shape-prim-mesh s5-9 (the-as uint 0) (the-as uint 0))))
        (set! (-> v1-149 prim-core collide-as) (collide-spec enemy))
        (set! (-> v1-149 prim-core collide-with) (collide-spec jak player-list))
        (set! (-> v1-149 prim-core action) (collide-action solid deadly))
        (set! (-> v1-149 transform-index) 0)
        (set-vector! (-> v1-149 local-sphere) 0.0 0.0 0.0 4096000.0)
        (set! (-> s5-9 total-prims) (the-as uint 1))
        (set! (-> s5-9 root-prim) v1-149)
        )
      (set! (-> s5-9 nav-radius) (* 0.75 (-> s5-9 root-prim local-sphere w)))
      (let ((v1-152 (-> s5-9 root-prim)))
        (set! (-> s5-9 backup-collide-as) (-> v1-152 prim-core collide-as))
        (set! (-> s5-9 backup-collide-with) (-> v1-152 prim-core collide-with))
        )
      (set! (-> this root) s5-9)
      )
    )
  0
  (none)
  )

(defmethod init-collision! ((this precur-bridge-blocks-break))
  (set! (-> this root) #f)
  (let ((v1-0 (-> this idx)))
    (cond
      ((zero? v1-0)
       (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0)))
           (set! (-> s5-0 total-prims) (the-as uint 4))
           (set! (-> s4-0 prim-core collide-as) (collide-spec enemy))
           (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-0 prim-core action) (collide-action solid deadly))
           (set! (-> s4-0 transform-index) 3)
           (set-vector! (-> s4-0 local-sphere) 37000.805 863.0272 -15777.383 101306.37)
           (set! (-> s5-0 root-prim) s4-0)
           )
         (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-10 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-10 prim-core action) (collide-action solid deadly))
           (set! (-> v1-10 transform-index) 3)
           (set-vector! (-> v1-10 local-sphere) -1275.904 -155.2384 -2952.3967 31805.85)
           )
         (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0))))
           (set! (-> v1-12 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-12 prim-core action) (collide-action solid deadly))
           (set! (-> v1-12 transform-index) 4)
           (set-vector! (-> v1-12 local-sphere) -1967.3088 0.0 -330.5472 33507.33)
           )
         (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0))))
           (set! (-> v1-14 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-14 prim-core action) (collide-action solid deadly))
           (set! (-> v1-14 transform-index) 5)
           (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 20190.004)
           )
         (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
         (let ((v1-17 (-> s5-0 root-prim)))
           (set! (-> s5-0 backup-collide-as) (-> v1-17 prim-core collide-as))
           (set! (-> s5-0 backup-collide-with) (-> v1-17 prim-core collide-with))
           )
         (set! (-> this root) s5-0)
         )
       )
      ((= v1-0 1)
       (let ((s5-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-1 (new 'process 'collide-shape-prim-group s5-1 (the-as uint 3) 0)))
           (set! (-> s5-1 total-prims) (the-as uint 4))
           (set! (-> s4-1 prim-core collide-as) (collide-spec enemy))
           (set! (-> s4-1 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-1 prim-core action) (collide-action solid deadly))
           (set! (-> s4-1 transform-index) 3)
           (set-vector! (-> s4-1 local-sphere) 14119.731 -5520.589 -3731.456 62387.406)
           (set! (-> s5-1 root-prim) s4-1)
           )
         (let ((v1-28 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-28 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-28 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-28 prim-core action) (collide-action solid deadly))
           (set! (-> v1-28 transform-index) 3)
           (set-vector! (-> v1-28 local-sphere) -3164.5696 0.0 1624.4736 28662.17)
           )
         (let ((v1-30 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 1) (the-as uint 0))))
           (set! (-> v1-30 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-30 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-30 prim-core action) (collide-action solid deadly))
           (set! (-> v1-30 transform-index) 4)
           (set-vector! (-> v1-30 local-sphere) 625.4592 0.0 2129.92 30461.133)
           )
         (let ((v1-32 (new 'process 'collide-shape-prim-mesh s5-1 (the-as uint 2) (the-as uint 0))))
           (set! (-> v1-32 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-32 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-32 prim-core action) (collide-action solid deadly))
           (set! (-> v1-32 transform-index) 5)
           (set-vector! (-> v1-32 local-sphere) -2308.9153 0.0 989.184 18648.27)
           )
         (set! (-> s5-1 nav-radius) (* 0.75 (-> s5-1 root-prim local-sphere w)))
         (let ((v1-35 (-> s5-1 root-prim)))
           (set! (-> s5-1 backup-collide-as) (-> v1-35 prim-core collide-as))
           (set! (-> s5-1 backup-collide-with) (-> v1-35 prim-core collide-with))
           )
         (set! (-> this root) s5-1)
         )
       )
      ((= v1-0 2)
       (let ((s5-2 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-2 (new 'process 'collide-shape-prim-group s5-2 (the-as uint 3) 0)))
           (set! (-> s5-2 total-prims) (the-as uint 4))
           (set! (-> s4-2 prim-core collide-as) (collide-spec enemy))
           (set! (-> s4-2 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-2 prim-core action) (collide-action solid deadly))
           (set! (-> s4-2 transform-index) 3)
           (set-vector! (-> s4-2 local-sphere) 40951.81 -675.4304 -4421.632 60398.387)
           (set! (-> s5-2 root-prim) s4-2)
           )
         (let ((v1-46 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-46 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-46 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-46 prim-core action) (collide-action solid deadly))
           (set! (-> v1-46 transform-index) 3)
           (set-vector! (-> v1-46 local-sphere) 0.0 0.0 3322.2656 19020.596)
           )
         (let ((v1-48 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 1) (the-as uint 0))))
           (set! (-> v1-48 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-48 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-48 prim-core action) (collide-action solid deadly))
           (set! (-> v1-48 transform-index) 4)
           (set-vector! (-> v1-48 local-sphere) -5020.0576 0.0 3517.6448 19905.332)
           )
         (let ((v1-50 (new 'process 'collide-shape-prim-mesh s5-2 (the-as uint 2) (the-as uint 0))))
           (set! (-> v1-50 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-50 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-50 prim-core action) (collide-action solid deadly))
           (set! (-> v1-50 transform-index) 5)
           (set-vector! (-> v1-50 local-sphere) 0.0 0.0 1477.4272 31325.799)
           )
         (set! (-> s5-2 nav-radius) (* 0.75 (-> s5-2 root-prim local-sphere w)))
         (let ((v1-53 (-> s5-2 root-prim)))
           (set! (-> s5-2 backup-collide-as) (-> v1-53 prim-core collide-as))
           (set! (-> s5-2 backup-collide-with) (-> v1-53 prim-core collide-with))
           )
         (set! (-> this root) s5-2)
         )
       )
      ((= v1-0 3)
       (let ((s5-3 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-3 (new 'process 'collide-shape-prim-group s5-3 (the-as uint 4) 0)))
           (set! (-> s5-3 total-prims) (the-as uint 5))
           (set! (-> s4-3 prim-core collide-as) (collide-spec enemy))
           (set! (-> s4-3 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-3 prim-core action) (collide-action solid deadly))
           (set! (-> s4-3 transform-index) 3)
           (set-vector! (-> s4-3 local-sphere) 5677.056 -141.7216 -44913.46 65934.54)
           (set! (-> s5-3 root-prim) s4-3)
           )
         (let ((v1-64 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-64 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-64 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-64 prim-core action) (collide-action solid deadly))
           (set! (-> v1-64 transform-index) 3)
           (set-vector! (-> v1-64 local-sphere) 0.0 0.0 888.0128 17994.137)
           )
         (let ((v1-66 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 1) (the-as uint 0))))
           (set! (-> v1-66 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-66 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-66 prim-core action) (collide-action solid deadly))
           (set! (-> v1-66 transform-index) 4)
           (set-vector! (-> v1-66 local-sphere) 0.0 0.0 -607.4368 28441.395)
           )
         (let ((v1-68 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 2) (the-as uint 0))))
           (set! (-> v1-68 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-68 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-68 prim-core action) (collide-action solid deadly))
           (set! (-> v1-68 transform-index) 5)
           (set-vector! (-> v1-68 local-sphere) 0.0 0.0 91.3408 16444.621)
           )
         (let ((v1-70 (new 'process 'collide-shape-prim-mesh s5-3 (the-as uint 3) (the-as uint 0))))
           (set! (-> v1-70 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-70 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-70 prim-core action) (collide-action solid deadly))
           (set! (-> v1-70 transform-index) 6)
           (set-vector! (-> v1-70 local-sphere) 0.0 0.0 3636.4287 17122.1)
           )
         (set! (-> s5-3 nav-radius) (* 0.75 (-> s5-3 root-prim local-sphere w)))
         (let ((v1-73 (-> s5-3 root-prim)))
           (set! (-> s5-3 backup-collide-as) (-> v1-73 prim-core collide-as))
           (set! (-> s5-3 backup-collide-with) (-> v1-73 prim-core collide-with))
           )
         (set! (-> this root) s5-3)
         )
       )
      ((= v1-0 4)
       (let ((s5-4 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-4 (new 'process 'collide-shape-prim-group s5-4 (the-as uint 3) 0)))
           (set! (-> s5-4 total-prims) (the-as uint 4))
           (set! (-> s4-4 prim-core collide-as) (collide-spec enemy))
           (set! (-> s4-4 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-4 prim-core action) (collide-action solid deadly))
           (set! (-> s4-4 transform-index) 3)
           (set-vector! (-> s4-4 local-sphere) 4307.763 -1849.7535 -54462.875 92687.56)
           (set! (-> s5-4 root-prim) s4-4)
           )
         (let ((v1-84 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-84 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-84 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-84 prim-core action) (collide-action solid deadly))
           (set! (-> v1-84 transform-index) 3)
           (set-vector! (-> v1-84 local-sphere) 3515.5967 0.0 -4386.4062 28917.35)
           )
         (let ((v1-86 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 1) (the-as uint 0))))
           (set! (-> v1-86 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-86 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-86 prim-core action) (collide-action solid deadly))
           (set! (-> v1-86 transform-index) 4)
           (set-vector! (-> v1-86 local-sphere) 0.0 0.0 -358.4 21415.527)
           )
         (let ((v1-88 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 2) (the-as uint 0))))
           (set! (-> v1-88 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-88 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-88 prim-core action) (collide-action solid deadly))
           (set! (-> v1-88 transform-index) 5)
           (set-vector! (-> v1-88 local-sphere) 2953.216 0.0 -1265.2544 30869.914)
           )
         (set! (-> s5-4 nav-radius) (* 0.75 (-> s5-4 root-prim local-sphere w)))
         (let ((v1-91 (-> s5-4 root-prim)))
           (set! (-> s5-4 backup-collide-as) (-> v1-91 prim-core collide-as))
           (set! (-> s5-4 backup-collide-with) (-> v1-91 prim-core collide-with))
           )
         (set! (-> this root) s5-4)
         )
       )
      ((= v1-0 5)
       (let ((s5-5 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-5 (new 'process 'collide-shape-prim-group s5-5 (the-as uint 3) 0)))
           (set! (-> s5-5 total-prims) (the-as uint 4))
           (set! (-> s4-5 prim-core collide-as) (collide-spec enemy))
           (set! (-> s4-5 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-5 prim-core action) (collide-action solid deadly))
           (set! (-> s4-5 transform-index) 3)
           (set-vector! (-> s4-5 local-sphere) 16286.925 -1814.9376 -12503.449 46768.945)
           (set! (-> s5-5 root-prim) s4-5)
           )
         (let ((v1-102 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-102 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-102 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-102 prim-core action) (collide-action solid deadly))
           (set! (-> v1-102 transform-index) 3)
           (set-vector! (-> v1-102 local-sphere) 0.0 0.0 3398.4512 18284.545)
           )
         (let ((v1-104 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 1) (the-as uint 0))))
           (set! (-> v1-104 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-104 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-104 prim-core action) (collide-action solid deadly))
           (set! (-> v1-104 transform-index) 4)
           (set-vector! (-> v1-104 local-sphere) 3489.792 0.0 -1718.6816 18917.377)
           )
         (let ((v1-106 (new 'process 'collide-shape-prim-mesh s5-5 (the-as uint 2) (the-as uint 0))))
           (set! (-> v1-106 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-106 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-106 prim-core action) (collide-action solid deadly))
           (set! (-> v1-106 transform-index) 5)
           (set-vector! (-> v1-106 local-sphere) 0.0 0.0 1899.7249 32303.514)
           )
         (set! (-> s5-5 nav-radius) (* 0.75 (-> s5-5 root-prim local-sphere w)))
         (let ((v1-109 (-> s5-5 root-prim)))
           (set! (-> s5-5 backup-collide-as) (-> v1-109 prim-core collide-as))
           (set! (-> s5-5 backup-collide-with) (-> v1-109 prim-core collide-with))
           )
         (set! (-> this root) s5-5)
         )
       )
      ((= v1-0 6)
       (let ((s5-6 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-6 (new 'process 'collide-shape-prim-group s5-6 (the-as uint 1) 0)))
           (set! (-> s5-6 total-prims) (the-as uint 2))
           (set! (-> s4-6 prim-core collide-as) (collide-spec enemy))
           (set! (-> s4-6 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-6 prim-core action) (collide-action solid deadly))
           (set! (-> s4-6 transform-index) 3)
           (set-vector! (-> s4-6 local-sphere) 0.0 0.0 0.0 17717.248)
           (set! (-> s5-6 root-prim) s4-6)
           )
         (let ((v1-120 (new 'process 'collide-shape-prim-mesh s5-6 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-120 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-120 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-120 prim-core action) (collide-action solid deadly))
           (set! (-> v1-120 transform-index) 3)
           (set-vector! (-> v1-120 local-sphere) 0.0 0.0 0.0 17717.248)
           )
         (set! (-> s5-6 nav-radius) (* 0.75 (-> s5-6 root-prim local-sphere w)))
         (let ((v1-123 (-> s5-6 root-prim)))
           (set! (-> s5-6 backup-collide-as) (-> v1-123 prim-core collide-as))
           (set! (-> s5-6 backup-collide-with) (-> v1-123 prim-core collide-with))
           )
         (set! (-> this root) s5-6)
         )
       )
      ((= v1-0 7)
       (let ((s5-8 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
         (let ((s4-7 (new 'process 'collide-shape-prim-group s5-8 (the-as uint 3) 0)))
           (set! (-> s5-8 total-prims) (the-as uint 4))
           (set! (-> s4-7 prim-core collide-as) (collide-spec enemy))
           (set! (-> s4-7 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> s4-7 prim-core action) (collide-action solid deadly))
           (set! (-> s4-7 transform-index) 3)
           (set-vector! (-> s4-7 local-sphere) -4782.4897 824.1152 -38400.41 73106.64)
           (set! (-> s5-8 root-prim) s4-7)
           )
         (let ((v1-134 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 0) (the-as uint 0))))
           (set! (-> v1-134 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-134 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-134 prim-core action) (collide-action solid deadly))
           (set! (-> v1-134 transform-index) 3)
           (set-vector! (-> v1-134 local-sphere) 2784.4607 0.0 1649.4592 22121.678)
           )
         (let ((v1-136 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 1) (the-as uint 0))))
           (set! (-> v1-136 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-136 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-136 prim-core action) (collide-action solid deadly))
           (set! (-> v1-136 transform-index) 4)
           (set-vector! (-> v1-136 local-sphere) 3878.912 0.0 542.72 33871.87)
           )
         (let ((v1-138 (new 'process 'collide-shape-prim-mesh s5-8 (the-as uint 2) (the-as uint 0))))
           (set! (-> v1-138 prim-core collide-as) (collide-spec enemy))
           (set! (-> v1-138 prim-core collide-with) (collide-spec jak player-list))
           (set! (-> v1-138 prim-core action) (collide-action solid deadly))
           (set! (-> v1-138 transform-index) 5)
           (set-vector! (-> v1-138 local-sphere) 0.0 0.0 -4243.8657 22156.492)
           )
         (set! (-> s5-8 nav-radius) (* 0.75 (-> s5-8 root-prim local-sphere w)))
         (let ((v1-141 (-> s5-8 root-prim)))
           (set! (-> s5-8 backup-collide-as) (-> v1-141 prim-core collide-as))
           (set! (-> s5-8 backup-collide-with) (-> v1-141 prim-core collide-with))
           )
         (set! (-> this root) s5-8)
         )
       )
      )
    )
  (if (not (-> this root))
      (init-collision2! this)
      )
  0
  (none)
  )

(define *precurd-panel-tear-off-time* (the-as time-frame 0))

(defstate idle (precur-bridge-blocks-break)
  :virtual #t
  :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
    (case message
      (('touch)
       (if (not (-> *setting-control* user-current freeze-screen))
           (send-event proc 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id))
                                                                                          (damage 2.0)
                                                                                          (vehicle-damage-factor 1.0)
                                                                                          (vehicle-impulse-factor 1.0)
                                                                                          (shove-back (meters 30))
                                                                                          (shove-up (meters 5))
                                                                                          )
                                                          )
                       )
           )
       #f
       )
      (('xform)
       (let ((v1-9 (-> block param 0)))
         (when (not (-> self triggered?))
           (vector-copy! (-> self root trans) (-> self entity extra trans))
           (vector+! (-> self root trans) (-> self root trans) (the-as vector (+ v1-9 48)))
           )
         )
       )
      (('exit)
       #t
       )
      )
    )
  :enter (behavior ()
    (ja :num-func num-func-identity :frame-num 0.0)
    )
  :trans (behavior ()
    (if (-> *setting-control* user-current freeze-screen)
        (rider-trans)
        )
    )
  :code (behavior ()
    (until #f
      (until (ja-max? 0)
        (suspend)
        )
      (dotimes (gp-0 5)
        (sound-stop (-> self snds gp-0))
        )
      (logior! (-> self draw status) (draw-control-status no-draw))
      )
    #f
    )
  :post (behavior ()
    (when (precur-bridge-reset)
      (ja :num-func num-func-identity :frame-num 0.0)
      (set! (-> self triggered?) #f)
      )
    (if (task-node-closed? (game-task-node precursor-destroy-ship-escape-continue))
        (logclear! (-> self draw status) (draw-control-status no-draw))
        (logior! (-> self draw status) (draw-control-status no-draw))
        )
    (when (and (precur-bridge-blocks-trigger (the-as int (-> self idx))) (not (ja-max? 0)))
      (let* ((a0-8 (-> self root root-prim))
             (gp-0 a0-8)
             (s5-0 (new 'stack-no-clear 'vector))
             )
        (when (= (-> a0-8 type) collide-shape-prim-group)
          (dotimes (s4-0 (the-as int (-> gp-0 specific 0)))
            (vector-copy!
              (new 'stack-no-clear 'vector)
              (-> (the-as collide-shape-prim-group gp-0) child s4-0 prim-core world-sphere)
              )
            (vector-copy! s5-0 (-> (the-as collide-shape-prim-group gp-0) child s4-0 prim-core world-sphere))
            (when (and (not (-> self toe-up? s4-0)) (< 831488.0 (-> s5-0 y)))
              (set! (-> self toe-up? s4-0) #t)
              (when (time-elapsed? *precurd-panel-tear-off-time* (seconds 1))
                (set! *precurd-panel-tear-off-time* (current-time))
                (sound-play "panel-tear-off" :position s5-0)
                )
              0
              )
            (when (and (< (- (-> s5-0 z) (-> (target-pos 0) z)) 8192.0) (< s4-0 5))
              (when (and (< s4-0 5) (zero? (-> self snds s4-0)))
                (set! (-> self snds s4-0) (new-sound-id))
                (sound-play "passby-whoosh" :id (-> self snds s4-0) :position s5-0)
                0
                )
              )
            (if #f
                (add-debug-sphere #t (bucket-id debug) s5-0 (-> s5-0 w) *color-blue*)
                )
            )
          (when (not (-> self triggered?))
            (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock))
            (set! (-> self triggered?) #t)
            (precur-play-blow-sound)
            )
          )
        )
      )
    (if (-> self triggered?)
        (ja :num! (seek!))
        )
    (transform-post)
    )
  )

(defmethod init-from-entity! ((this precur-bridge-blocks-break) (arg0 entity-actor))
  "Set up a newly created process from the entity that created it."
  (set-idx-by-name this)
  (init-collision! this)
  (process-drawable-from-entity! this arg0)
  (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0))
  (if (string-suffix= (-> this name) "-1")
      (set-setting! 'extra-bank '((precur1 precur4) (precur3 precur5)) 0.0 0)
      )
  (dotimes (v1-10 5)
    (set! (-> this snds v1-10) (new 'static 'sound-id))
    (set! (-> this toe-up? v1-10) #f)
    )
  (set! (-> this draw lod-set lod 0 dist) 14336000.0)
  (set! (-> this draw lod-set lod 1 dist) 14336000.0)
  (set! (-> this draw lod-set lod 2 dist) 14336000.0)
  (set! (-> this triggered?) #f)
  (logclear! (-> this mask) (process-mask actor-pause))
  (let ((a0-13 (-> this skel root-channel 0)))
    (set! (-> a0-13 frame-group) (if (> (-> this skel active-channels) 0)
                                     (-> this skel root-channel 0 frame-group)
                                     )
          )
    (set! (-> a0-13 param 0) 0.6)
    (set! (-> a0-13 frame-num) 0.0)
    (joint-control-channel-group!
      a0-13
      (if (> (-> this skel active-channels) 0)
          (-> this skel root-channel 0 frame-group)
          )
      num-func-loop!
      )
    )
  (go (method-of-object this idle))
  )
