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

;; name: nestb-scenes.gc
;; name in dgo: nestb-scenes
;; dgos: NEB

;; DECOMP BEGINS

(set-subtask-hook!
  *game-info*
  (game-task-node nest-boss-resolution)
  TASK_MANAGER_INIT_HOOK
  (lambda :behavior scene-player
    ()
    0.0
    (let ((a1-0 (new 'stack-no-clear 'event-message-block)))
      (set! (-> a1-0 from) (process->ppointer self))
      (set! (-> a1-0 num-params) 1)
      (set! (-> a1-0 message) 'test-pickup)
      (set! (-> a1-0 param 0) (the-as uint 7))
      (let ((f30-0 (send-event-function *target* a1-0)))
        (suspend-for (seconds 0.1)
          )
        (send-event *target* 'change-mode 'darkjak #f (darkjak-stage no-anim))
        (suspend-for (seconds 0.1)
          )
        (send-event *target* 'get-pickup (pickup-type eco-pill-dark) f30-0)
        )
      )
    (send-event *target* 'end-mode)
    (none)
    )
  )

(defskelgroup skel-metalkor-fma-spinner metalkor-fma-spinner metalkor-fma-spinner-lod0-jg metalkor-fma-spinner-idle-ja
              ((metalkor-fma-spinner-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 20)
              :origin-joint-index 3
              )

(defpartgroup group-nest-break-precipice-explosion
  :id 1239
  :linger-duration (seconds 3)
  :flags (use-local-clock)
  :bounds (static-bspherem 0 0 0 64)
  :parts ((sp-item 5290) (sp-item 5291) (sp-item 5292) (sp-item 5293))
  )

(defpart 5290
  :init-specs ((:texture (bigpuff effects))
    (:num 10.0)
    (:x (meters 0) (meters 0.6))
    (:y (meters 4))
    (:scale-x (meters 9) (meters 5))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 96.0 32.0)
    (:b 64.0 32.0)
    (:a 16.0 32.0)
    (:vel-y (meters 0.033333335) (meters 0.04))
    (:scalevel-x (meters 0.016666668) (meters 0.016666668))
    (:rotvel-z (degrees -0.12) (degrees 0.24))
    (:scalevel-y :copy scalevel-x)
    (:fade-a 0.32 0.32)
    (:friction 0.94 0.04)
    (:timer (seconds 8))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:next-time (seconds 0.235) (seconds 0.097))
    (:next-launcher 5294)
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    )
  )

(defpart 5294
  :init-specs ((:scalevel-x (meters 0.008333334))
    (:scalevel-y :copy scalevel-x)
    (:fade-a 0.0)
    (:next-time (seconds 0.335) (seconds 0.497))
    (:next-launcher 5295)
    )
  )

(defpart 5295
  :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x) (:fade-a -0.21333334 -0.10666667))
  )

(defpart 5291
  :init-specs ((:texture (specs effects))
    (:num 10.0 20.0)
    (:x (meters 0.25))
    (:y (meters 4))
    (:scale-x (meters 1) (meters 2))
    (:rot-z (degrees 0) (degrees 360))
    (:scale-y :copy scale-x)
    (:r 128.0)
    (:g 96.0 32.0)
    (:b 64.0 32.0)
    (:a 16.0 32.0)
    (:vel-y (meters 0) (meters 0.13333334))
    (:scalevel-x (meters 0.006666667) (meters 0.0033333334))
    (:rotvel-z (degrees -0.12) (degrees 0.24))
    (:scalevel-y :copy scalevel-x)
    (:accel-y (meters -0.00016666666) (meters -0.00066666666))
    (:friction 0.88 0.02)
    (:timer (seconds 20))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:next-time (seconds 0.235) (seconds 0.097))
    (:next-launcher 5296)
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    (:conerot-radius (meters 0) (meters 3))
    )
  )

(defpart 5296
  :init-specs ((:scalevel-x (meters 0.01))
    (:scalevel-y :copy scalevel-x)
    (:next-time (seconds 0.3) (seconds 0.097))
    (:next-launcher 5297)
    )
  )

(defpart 5297
  :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x) (:fade-a -0.053333335 -0.053333335))
  )

(defpart 5292
  :init-specs ((:birth-func 'birth-func-texture-group)
    (:num 10.0 20.0)
    (:y (meters 4))
    (:scale-x (meters 6) (meters 3))
    (:rot-z (degrees 0) (degrees 3600) :store)
    (:scale-y (meters 8) (meters 3.5))
    (:r 128.0)
    (:g 96.0 32.0)
    (:b 64.0 32.0)
    (:a 16.0 32.0)
    (:vel-y (meters 0.05) (meters 0.1))
    (:scalevel-x (meters 0.033333335) (meters 0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.13333334)
    (:friction 0.92 0.02)
    (:timer (seconds 6.667))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:userdata :data (new 'static 'boxed-array :type int32 80 1 0 #xc00000 #xc03300))
    (:next-time (seconds 0.167))
    (:next-launcher 5298)
    (:conerot-x '*sp-temp*)
    (:conerot-y (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    (:conerot-radius (meters 0) (meters 2))
    )
  )

(defpart 5293
  :init-specs ((:texture (explosion-wave effects))
    (:num 10.0 20.0)
    (:y (meters 4))
    (:scale-x (meters 6) (meters 3))
    (:rot-x 4)
    (:rot-z (degrees 0) (degrees 360) :store)
    (:scale-y (meters 8) (meters 3.5))
    (:r 128.0)
    (:g 96.0 32.0)
    (:b 64.0 32.0)
    (:a 16.0 32.0)
    (:vel-y (meters 0.05) (meters 0.1))
    (:scalevel-x (meters 0.033333335) (meters 0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.13333334)
    (:friction 0.92 0.02)
    (:timer (seconds 6.667))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:func 'sparticle-motion-blur)
    (:next-time (seconds 0.167))
    (:next-launcher 5298)
    (:conerot-x '*sp-temp*)
    (:conerot-y (degrees 0) (degrees 3600))
    (:rotate-y (degrees 0))
    (:conerot-radius (meters 0) (meters -5))
    )
  )

(defpart 5298
  :init-specs ((:scalevel-x (meters 0.033333335) (meters 0.033333335))
    (:scalevel-y :copy scalevel-x)
    (:next-time (seconds 0.2) (seconds 0.065))
    (:next-launcher 5299)
    )
  )

(defpart 5299
  :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) (:scalevel-y :copy scalevel-x) (:fade-a -0.18 -0.12))
  )

(defpartgroup group-nest-break-precipice-trailer
  :id 1240
  :bounds (static-bspherem 0 0 0 15)
  :parts ((sp-item 5300))
  )

(defpart 5300
  :init-specs ((:texture (bigpuff effects))
    (:num 1.0)
    (:x (meters -0.25) (meters 1))
    (:scale-x (meters 1) (meters 2))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 1) (meters 2))
    (:r 128.0)
    (:g 96.0 32.0)
    (:b 64.0 32.0)
    (:a 16.0 32.0)
    (:vel-y (meters -0.013333334) (meters -0.013333334))
    (:scalevel-x (meters 0.006666667) (meters 0.006666667))
    (:rotvel-z (degrees -0.3) (degrees 0.6))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.08 -0.08)
    (:friction 0.95 0.03)
    (:timer (seconds 4))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpartgroup group-nest-break-precipice-billow
  :id 1241
  :flags (always-draw)
  :bounds (static-bspherem 0 0 0 15)
  :parts ((sp-item 5301))
  )

(defpart 5301
  :init-specs ((:texture (bigpuff effects))
    (:num 1.0 0.5)
    (:x (meters -6) (meters 12))
    (:scale-x (meters 1) (meters 2))
    (:rot-z (degrees 0) (degrees 3600))
    (:scale-y (meters 1) (meters 2))
    (:r 128.0)
    (:g 96.0 32.0)
    (:b 64.0 32.0)
    (:a 16.0 32.0)
    (:vel-x (meters 0.02) (meters 0.02))
    (:scalevel-x (meters 0.033333335) (meters 0.006666667))
    (:rotvel-z (degrees -0.3) (degrees 0.6))
    (:scalevel-y :copy scalevel-x)
    (:fade-a -0.04 -0.08)
    (:accel-y (meters 0.00066666666))
    (:friction 0.95 0.03)
    (:timer (seconds 4.335))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
    (:rotate-y (degrees 0) (degrees 3600))
    )
  )

(defpartgroup group-nestb-precursor-stone-glow
  :id 1242
  :bounds (static-bspherem 0 0 0 3)
  :parts ((sp-item 5302 :flags (bit6)))
  )

(defpart 5302
  :init-specs ((:texture (glow-soft effects))
    (:num 1.0)
    (:scale-x (meters 3.5))
    (:rot-x (degrees 45))
    (:scale-y :copy scale-x)
    (:r 16.0)
    (:g 192.0)
    (:b 16.0)
    (:a 24.0)
    (:timer (seconds 0.017))
    (:flags (glow))
    (:userdata 4096.0)
    )
  )

(defpartgroup group-nest-metalkor-shot-anticipate
  :id 1243
  :bounds (static-bspherem 0 0 0 160)
  :parts ((sp-item 5303 :fade-after (meters 80) :falloff-to (meters 80))
    (sp-item 5304 :fade-after (meters 220) :flags (bit6))
    )
  )

(defpart 5303
  :init-specs ((:texture (hotdot effects))
    (:num 8.0)
    (:scale-x (meters 0))
    (:rot-z (degrees 90))
    (:scale-y :copy scale-x)
    (:r 255.0)
    (:g 255.0)
    (:b 255.0)
    (:a 32.0)
    (:vel-y (meters -0.02))
    (:scalevel-x (meters 0.005) (meters 0.005))
    (:rotvel-z (degrees -1.2) (degrees 2.4))
    (:scalevel-y :copy scalevel-x)
    (:fade-r -0.98)
    (:fade-g -0.98)
    (:fade-a 0.19393939)
    (:timer (seconds 0.835))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3))
    (:next-time (seconds 0.55))
    (:next-launcher 5305)
    (:conerot-x (degrees 0) (degrees 3600))
    (:conerot-y (degrees 0) (degrees 3600))
    (:conerot-radius (meters 4))
    )
  )

(defpart 5305
  :init-specs ((:fade-a -0.7529412) (:friction 0.1))
  )

(defpart 5304
  :init-specs ((:texture (glow-soft effects))
    (:num 1.0)
    (:scale-x (meters 8))
    (:rot-x (degrees 6.7500005))
    (:scale-y :copy scale-x)
    (:r 128.0 16.0)
    (:g 146.0 16.0)
    (:b 128.0 16.0)
    (:a 32.0)
    (:omega (degrees 4518))
    (:timer (seconds 0.017))
    (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
    (:userdata 8192.0)
    )
  )

(defun movie-nest-metalkor-shot-draw-fire ((arg0 vector) (arg1 vector))
  (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0)))
    (draw-beam (-> *part-id-table* 624) arg0 s5-1 #f #t)
    (let* ((a0-4 (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-1 8192.0))
           (v1-3 (vector+! (new 'stack-no-clear 'vector) arg0 a0-4))
           (t9-2 sp-launch-particles-var)
           (a0-5 *sp-particle-system-2d*)
           (a1-4 (-> *part-id-table* 625))
           (a2-2 *launch-matrix*)
           )
      (set! (-> a2-2 trans quad) (-> v1-3 quad))
      (t9-2 a0-5 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
      )
    )
  0
  (none)
  )

(defun movie-nest-metalkor-shot-draw-moving ((arg0 vector) (arg1 vector) (arg2 float))
  (rlet ((acc :class vf)
         (vf0 :class vf)
         (vf4 :class vf)
         (vf5 :class vf)
         (vf6 :class vf)
         (vf7 :class vf)
         )
    (init-vf0-vector)
    (let ((s4-0 (new 'stack-no-clear 'vector)))
      (set! (-> s4-0 quad) (-> arg0 quad))
      (let ((gp-0 (new 'stack-no-clear 'vector)))
        (set! (-> gp-0 quad) (-> arg1 quad))
        (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 s4-0)))
          (let ((s1-0 s4-0))
            (let ((s3-0 s4-0))
              (let ((s2-0 s5-1))
                (let ((v1-5 (lerp-scale -0.5 0.5 arg2 2475.0 2499.0)))
                  (.mov vf7 v1-5)
                  )
                (.lvf vf5 (&-> s2-0 quad))
                )
              (.lvf vf4 (&-> s3-0 quad))
              )
            (.add.x.vf.w vf6 vf0 vf0)
            (.mul.x.vf.xyz acc vf5 vf7)
            (.add.mul.w.vf.xyz vf6 vf4 vf0 acc)
            (.svf (&-> s1-0 quad) vf6)
            )
          (vector+! gp-0 s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-1 49152.0))
          (vector-! s5-1 gp-0 s4-0)
          (let ((f30-0 (vector-length s5-1)))
            (let ((s3-2 (new 'stack-no-clear 'vector)))
              (let ((v1-10 s4-0))
                (let ((a0-5 s5-1))
                  (let ((a1-6 0.8))
                    (.mov vf7 a1-6)
                    )
                  (.lvf vf5 (&-> a0-5 quad))
                  )
                (.lvf vf4 (&-> v1-10 quad))
                )
              (.add.x.vf.w vf6 vf0 vf0)
              (.mul.x.vf.xyz acc vf5 vf7)
              (.add.mul.w.vf.xyz vf6 vf4 vf0 acc)
              (.svf (&-> s3-2 quad) vf6)
              (let ((f28-0 (-> *part-id-table* 621 init-specs 4 initial-valuef)))
                (set! (-> *part-id-table* 621 init-specs 4 initial-valuef) (fmin f28-0 f30-0))
                (draw-beam (-> *part-id-table* 621) s4-0 s5-1 #f #t)
                (set! (-> *part-id-table* 621 init-specs 4 initial-valuef) f28-0)
                )
              (vector-normalize! s5-1 1.0)
              (launch-particles (-> *part-id-table* 622) s3-2)
              )
            (let ((s4-1 (new 'stack-no-clear 'matrix))
                  (f26-0 (/ f30-0 (meters 12)))
                  (f30-1 (-> *part-id-table* 623 init-specs 3 initial-valuef))
                  (f28-1 (-> *part-id-table* 623 init-specs 5 initial-valuef))
                  )
              (forward-up->inv-matrix s4-1 s5-1 *up-vector*)
              (set! (-> s4-1 trans quad) (-> gp-0 quad))
              (set! (-> *part-id-table* 623 init-specs 3 initial-valuef) (* f26-0 f30-1))
              (set! (-> *part-id-table* 623 init-specs 5 initial-valuef) (* f26-0 f28-1))
              (launch-particles (-> *part-id-table* 623) s4-1 :origin-is-matrix #t)
              (set! (-> *part-id-table* 623 init-specs 3 initial-valuef) f30-1)
              (set! (-> *part-id-table* 623 init-specs 5 initial-valuef) f28-1)
              )
            )
          )
        )
      )
    0
    (none)
    )
  )

(defun movie-nest-metalkor-shot-draw-impact ((arg0 scene-player) (arg1 vector) (arg2 vector))
  (local-vars
    (sv-240 (function vector entity-actor skeleton-group vector object none :behavior manipy))
    (sv-256 vector)
    (sv-272 entity-actor)
    )
  (let ((v0-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) arg2 arg1) 2048.0))
        (gp-0 (new 'stack-no-clear 'vector))
        )
    (set! (-> gp-0 quad) (-> arg1 quad))
    (vector+! gp-0 gp-0 v0-0)
    (let ((s4-0 (get-process *default-dead-pool* part-tracker #x4000)))
      (when s4-0
        (let ((t9-2 (method-of-type part-tracker activate)))
          (t9-2
            (the-as part-tracker s4-0)
            *entity-pool*
            (symbol->string (-> part-tracker symbol))
            (the-as pointer #x70004000)
            )
          )
        (let ((t9-3 run-function-in-process)
              (a0-7 s4-0)
              (a1-6 part-tracker-init)
              (a2-5 (-> *part-group-id-table* 141))
              (a3-1 0)
              (t0-0 #f)
              (t1-0 #f)
              (t2-0 #f)
              (t3-0 *launch-matrix*)
              )
          (set! (-> t3-0 trans quad) (-> gp-0 quad))
          ((the-as (function object object object object object object object object none) t9-3)
           a0-7
           a1-6
           a2-5
           a3-1
           t0-0
           t1-0
           t2-0
           t3-0
           )
          )
        (-> s4-0 ppointer)
        )
      )
    )
  (let ((s4-1 (new 'stack-no-clear 'vector)))
    (set! (-> s4-1 quad) (-> arg1 quad))
    (let ((gp-1 (new 'stack-no-clear 'quaternion)))
      (let ((s3-0 (lambda :behavior scene-player
                    ()
                    (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 1.0)
                    (cond
                      ((>= 10.0 (ja-aframe-num 0))
                       (let ((v0-1 (the-as vector (-> self draw color-emissive))))
                         (set! (-> (the-as rgbaf v0-1) x) 1.0)
                         (set! (-> (the-as rgbaf v0-1) y) 1.0)
                         (set! (-> (the-as rgbaf v0-1) z) 1.0)
                         (set! (-> (the-as rgbaf v0-1) w) 1.0)
                         v0-1
                         )
                       )
                      ((>= 20.0 (ja-aframe-num 0))
                       (vector-lerp!
                         (-> self draw color-emissive)
                         (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
                         (new 'static 'vector :x 0.5 :z 0.5 :w 1.0)
                         (lerp-scale 0.0 1.0 (ja-aframe-num 0) 10.0 20.0)
                         )
                       )
                      (else
                        (vector-lerp!
                          (-> self draw color-emissive)
                          (new 'static 'vector :x 0.5 :z 0.5 :w 1.0)
                          (new 'static 'vector :w 1.0)
                          (lerp-scale 0.0 1.0 (ja-aframe-num 0) 20.0 30.0)
                          )
                        )
                      )
                    )
                  )
            )
        (let ((s2-0 (new 'stack-no-clear 'matrix)))
          (vector-normalize-copy! (-> s2-0 vector 1) (vector-! (new 'stack-no-clear 'vector) arg2 arg1) -1.0)
          (cond
            ((and (< (fabs (-> s2-0 vector 1 y)) (fabs (-> s2-0 vector 1 x)))
                  (< (fabs (-> s2-0 vector 1 y)) (fabs (-> s2-0 vector 1 z)))
                  )
             (set-vector! (-> s2-0 vector 2) (-> s2-0 vector 1 z) 0.0 (- (-> s2-0 vector 1 x)) 1.0)
             )
            ((< (fabs (-> s2-0 vector 1 z)) (fabs (-> s2-0 vector 1 x)))
             (set-vector! (-> s2-0 vector 2) (-> s2-0 vector 1 y) (- (-> s2-0 vector 1 x)) 0.0 1.0)
             )
            (else
              (set-vector! (-> s2-0 vector 2) 0.0 (-> s2-0 vector 1 z) (- (-> s2-0 vector 1 y)) 0.0)
              )
            )
          (vector-normalize! (-> s2-0 vector 2) 1.0)
          (vector-cross! (the-as vector (-> s2-0 vector)) (-> s2-0 vector 1) (-> s2-0 vector 2))
          (matrix->quaternion gp-1 s2-0)
          )
        (sound-play "nboss-shoot-hit")
        (let* ((s1-2 (get-process *default-dead-pool* manipy #x4000))
               (s2-2 (when s1-2
                       (let ((t9-10 (method-of-type manipy activate)))
                         (t9-10 (the-as manipy s1-2) arg0 (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
                         )
                       (let ((s2-3 run-function-in-process)
                             (s0-1 s1-2)
                             )
                         (set! sv-240 manipy-init)
                         (set! sv-256 s4-1)
                         (set! sv-272 (-> arg0 entity))
                         (let ((t0-2 (art-group-get-by-name *level* "skel-bomb-blast" (the-as (pointer uint32) #f)))
                               (t1-2 #f)
                               (t2-2 0)
                               )
                           ((the-as (function object object object object object object object none) s2-3)
                            s0-1
                            sv-240
                            sv-256
                            sv-272
                            t0-2
                            t1-2
                            t2-2
                            )
                           )
                         )
                       (-> s1-2 ppointer)
                       )
                     )
               )
          (when s2-2
            (send-event (ppointer->process s2-2) 'anim-mode 'play1)
            (send-event (ppointer->process s2-2) 'anim "idle")
            (set-vector! (-> (the-as process-drawable (-> s2-2 0)) root scale) 1.0 1.0 1.0 1.0)
            (send-event (ppointer->process s2-2) 'trans-hook s3-0)
            (send-event (ppointer->process s2-2) 'rot-quat gp-1)
            )
          )
        )
      (let ((s3-1 (process-spawn
                    manipy
                    :init manipy-init
                    s4-1
                    (-> arg0 entity)
                    (art-group-get-by-name *level* "skel-generic-blast" (the-as (pointer uint32) #f))
                    #f
                    0
                    :to arg0
                    )
                  )
            )
        (when s3-1
          (send-event (ppointer->process s3-1) 'anim-mode 'play1)
          (send-event (ppointer->process s3-1) 'anim "idle")
          (set-vector! (-> (the-as process-drawable (-> s3-1 0)) root scale) 1.0 1.0 1.0 1.0)
          (send-event (ppointer->process s3-1) 'rot-quat gp-1)
          )
        )
      )
    )
  0
  (none)
  )

(scene-method-16
  (new 'static 'scene
    :name "nest-kor-boss-fight-intro-b"
    :extra #f
    :info #f
    :mask-to-clear (process-mask movie enemy platform projectile)
    :entity "scene-stage-91"
    :art-group "scenecamera"
    :anim "nest-kor-boss-fight-intro-b"
    :parts 49
    :command-list '((0
        (kill "metalkor-1")
        (kill "nest-break-precipice-1")
        (kill "crate-942")
        (kill "crate-943")
        (kill "crate-944")
        (kill "crate-945")
        (kill "crate-946")
        (kill "crate-947")
        (kill "crate-948")
        (kill "crate-949")
        (setting-reset gem mode #t)
        (setting-reset music mode 'danger4)
        (send-event
          "darkjak-highres"
          'trans-hook
          ,(lambda :behavior scene-player () (set-darkjak-highres-nest-texture-morph! 0.0) (none))
          )
        (fadein (frame-time-30 5))
        (part-tracker
          "group-nestb-precursor-stone-glow"
          entity
          "precursor-stone"
          joint
          "main"
          track
          #t
          duration
          (frame-range 0 2555)
          )
        )
      (78
        (setting-reset gem mode #f)
        (part-tracker
          "group-nestb-force-field"
          entity
          "kid-highres"
          joint
          "main"
          track
          #t
          duration
          (frame-range 78 276)
          )
        )
      (204 (setting-reset gem mode #t))
      (276
        (setting-reset gem mode #f)
        (part-tracker
          "group-nestb-force-field-upclose"
          entity
          "kid-highres"
          joint
          "main"
          track
          #t
          duration
          (frame-range 276 321)
          )
        )
      (376
        (setting-reset gem mode #t)
        (part-tracker
          "group-nestb-force-field"
          entity
          "kid-highres"
          joint
          "main"
          track
          #t
          duration
          (frame-range 376 506)
          )
        )
      (559
        (setting-reset gem mode #f)
        (part-tracker
          "group-nestb-force-field-upclose"
          entity
          "kid-highres"
          joint
          "main"
          track
          #t
          duration
          (frame-range 559 611)
          )
        )
      (611 (setting-reset gem mode #t))
      (1223
        (part-tracker
          "group-nestb-force-field-upclose-2"
          entity
          "kid-highres"
          joint
          "main"
          track
          #t
          duration
          (frame-range 1223 1417)
          )
        )
      (2412
        (part-tracker
          "group-nest-metalkor-shot-anticipate"
          entity
          "metalkor-highres"
          joint
          "head"
          track
          #t
          duration
          (frame-range 2412 2475)
          )
        )
      (2475
        (send-event
          "metalkor-highres"
          'trans-hook
          ,(lambda :behavior scene-player
             ()
             (let ((f30-0 (ja-aframe-num 0))
                   (gp-0 (the-as target (command-get-process "metalkor-highres" *target*)))
                   (v1-0 (the-as target (command-get-process "nest-break-precipice" *target*)))
                   )
               (when (and gp-0 v1-0)
                 (let ((gp-1 (-> gp-0 node-list data 6 bone transform trans))
                       (s5-0 (-> v1-0 node-list data 9 bone transform trans))
                       )
                   (if (and (>= f30-0 2475.0) (< f30-0 2476.0))
                       (movie-nest-metalkor-shot-draw-fire gp-1 s5-0)
                       )
                   (if (and (>= f30-0 2476.0) (< f30-0 2499.0))
                       (movie-nest-metalkor-shot-draw-moving gp-1 s5-0 f30-0)
                       )
                   )
                 )
               )
             (none)
             )
          )
        )
      (2499
        (part-tracker
          "group-target-hit"
          entity
          "darkjak-highres"
          joint
          "Lball"
          track
          #f
          duration
          (frame-range 2499 2514)
          )
        (send-event
          "nest-break-precipice"
          'eval
          ,(lambda :behavior scene-player
             ()
             (ja-aframe-num 0)
             (let ((gp-0 (the-as target (command-get-process "metalkor-highres" *target*)))
                   (v1-0 (the-as target (command-get-process "nest-break-precipice" *target*)))
                   )
               (when (and gp-0 v1-0)
                 (let ((a2-0 (-> gp-0 node-list data 6 bone transform trans))
                       (a1-2 (-> v1-0 node-list data 9 bone transform trans))
                       )
                   (movie-nest-metalkor-shot-draw-impact self a1-2 a2-0)
                   )
                 )
               )
             (none)
             )
          )
        )
      (2500
        (part-tracker
          "group-nest-break-precipice-explosion"
          entity
          "nest-break-precipice"
          joint
          "ah"
          track
          #t
          duration
          (frame-range 2500 2502)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "bf"
          track
          #t
          duration
          (frame-range 2500 2512)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "bg"
          track
          #t
          duration
          (frame-range 2500 2512)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "d"
          track
          #t
          duration
          (frame-range 2500 2512)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "t"
          track
          #t
          duration
          (frame-range 2500 2512)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "bi"
          track
          #t
          duration
          (frame-range 2500 2512)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "u"
          track
          #t
          duration
          (frame-range 2500 2512)
          )
        )
      (2502
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "c"
          track
          #t
          duration
          (frame-range 2502 2512)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "v"
          track
          #t
          duration
          (frame-range 2502 2512)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "i"
          track
          #t
          duration
          (frame-range 2502 2512)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "al"
          track
          #t
          duration
          (frame-range 2502 2512)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "e"
          track
          #t
          duration
          (frame-range 2502 2512)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "f"
          track
          #t
          duration
          (frame-range 2502 2512)
          )
        )
      (2503
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "an"
          track
          #t
          duration
          (frame-range 2503 2512)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "ax"
          track
          #t
          duration
          (frame-range 2503 2512)
          )
        )
      (2502
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "r"
          track
          #t
          duration
          (frame-range 2502 2511)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "bd"
          track
          #t
          duration
          (frame-range 2502 2511)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "bm"
          track
          #t
          duration
          (frame-range 2502 2511)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "p"
          track
          #t
          duration
          (frame-range 2502 2511)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "bb"
          track
          #t
          duration
          (frame-range 2502 2511)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "f"
          track
          #t
          duration
          (frame-range 2502 2511)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "bo"
          track
          #t
          duration
          (frame-range 2502 2511)
          )
        )
      (2507
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "bn"
          track
          #t
          duration
          (frame-range 2507 2514)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "ac"
          track
          #t
          duration
          (frame-range 2507 2514)
          )
        )
      (2532
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "bf"
          track
          #t
          duration
          (frame-range 2532 2542)
          )
        (part-tracker
          "group-nest-break-precipice-trailer"
          entity
          "nest-break-precipice"
          joint
          "aj"
          track
          #t
          duration
          (frame-range 2532 2542)
          )
        )
      (2530
        (part-tracker
          "group-nest-break-precipice-billow"
          entity
          "nest-break-precipice"
          joint
          "bk"
          track
          #t
          duration
          (frame-range 2530 2570)
          )
        )
      (2635 (setting-reset gem mode #t))
      (2700
        (send-event
          "darkjak-highres"
          'trans-hook
          ,(lambda :behavior scene-player
             ()
             (let ((f30-0 (ja-aframe-num 0)))
               (when (and (< 2715.0 f30-0) (< f30-0 2800.0))
                 (if (zero? (rand-vu-int-count 4))
                     (process-drawable-shock-effect
                       self
                       (-> *lightning-spec-id-table* 8)
                       lightning-probe-callback
                       (-> *part-id-table* 179)
                       0
                       0
                       40960.0
                       )
                     )
                 )
               (if (>= f30-0 2700.0)
                   (set-darkjak-highres-nest-texture-morph! 1.0)
                   (set-darkjak-highres-nest-texture-morph! 0.0)
                   )
               )
             (none)
             )
          )
        )
      (10000
        (task-close! "nest-boss-introduction")
        (apply ,(lambda :behavior scene-player () (set-darkjak-highres-nest-texture-morph! 0.0) (none)))
        (setting-pers music mode 'danger4 time (seconds 5))
        )
      )
    :cut-list '(78
       143
       204
       276
       321
       376
       506
       559
       611
       633
       692
       824
       861
       969
       1084
       1139
       1223
       1417
       1531
       1588
       1660
       2075
       2255
       2350
       2412
       2489
       2510
       2555
       2612
       2671
       2814
       )
    :wait-ground-time (seconds 1)
    :draw-target #f
    :abort #t
    :actor (new 'static 'boxed-array :type scene-actor
      (new 'static 'scene-actor
        :name "scenecamera"
        :level #f
        :art-group "skel-scenecamera"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :camera 4
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "sidekick-highres"
        :level 'nestb
        :art-group "skel-sidekick-highres"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "darkjak-highres"
        :level 'nestb
        :art-group "skel-darkjak-highres"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-highres"
        :level 'nestb
        :art-group "skel-metalkor-highres"
        :prefix ""
        :draw-frames '((min 2671) (2800 max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-highres-lowtorso"
        :level 'nestb
        :art-group "skel-metalkor-highres-lowtorso"
        :prefix "lowtorso-"
        :draw-frames '((min 2671) (2800 max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-highres-legs"
        :level 'nestb
        :art-group "skel-metalkor-highres-legs"
        :prefix "legs-"
        :draw-frames '((min 2671) (2800 max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-highres-wings"
        :level 'nestb
        :art-group "skel-metalkor-highres-wings"
        :prefix "wings-"
        :draw-frames '((min 2671) (2800 max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "b-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "c-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "d-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "e-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "f-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "g-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "h-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "kid-highres"
        :level 'nestb
        :art-group "skel-kid-highres"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "nest-break-precipice"
        :level 'nestb
        :art-group "skel-nest-break-precipice"
        :prefix ""
        :draw-frames '((min (new 'static 'bfloat :data 558.99)) (1660 (new 'static 'bfloat :data 2074.99)) (2474 2611) (2671 2814))
        :scissor-frames '()
        :light-index #x11
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "precursor-stone"
        :level 'nestb
        :art-group "skel-precursor-stone"
        :prefix ""
        :draw-frames '((min 2671))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "particleman"
        :level 'nestb
        :art-group "skel-particleman"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      )
    :load-point-obj "nestb-boss"
    :end-point-obj "nestb-boss-pit"
    :borrow '()
    :sfx-volume -1.0
    :ambient-volume -1.0
    :music-volume -1.0
    :blackout-end #t
    :peaceful #t
    :save #t
    )
  )

(scene-method-16
  (new 'static 'scene
    :name "nest-kor-boss-fight-mid"
    :extra #f
    :info #f
    :mask-to-clear (process-mask movie enemy platform projectile)
    :entity "scene-stage-91"
    :art-group "scenecamera"
    :anim "nest-kor-boss-fight-mid"
    :parts 2
    :command-list '((0
        (kill "metalkor-1")
        (kill "crate-942")
        (kill "crate-943")
        (kill "crate-944")
        (kill "crate-945")
        (kill "crate-946")
        (kill "crate-947")
        (kill "crate-948")
        (kill "crate-949")
        (setting-reset music mode 'danger4)
        (setting-reset gem mode #t)
        (send-event
          "darkjak-highres"
          'trans-hook
          ,(lambda :behavior scene-player () (set-darkjak-highres-nest-texture-morph! 0.0) (none))
          )
        )
      (10000 (setting-pers music mode 'danger4 time (seconds 5)))
      )
    :cut-list '(82)
    :wait-ground-time (seconds 1)
    :draw-target #f
    :abort #t
    :actor (new 'static 'boxed-array :type scene-actor
      (new 'static 'scene-actor
        :name "scenecamera"
        :level #f
        :art-group "skel-scenecamera"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :camera 4
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "sidekick-highres"
        :level 'nestb
        :art-group "skel-sidekick-highres"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "darkjak-highres"
        :level 'nestb
        :art-group "skel-darkjak-highres"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-highres"
        :level 'nestb
        :art-group "skel-metalkor-highres"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-highres-lowtorso"
        :level 'nestb
        :art-group "skel-metalkor-highres-lowtorso"
        :prefix "lowtorso-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-highres-legs"
        :level 'nestb
        :art-group "skel-metalkor-highres-legs"
        :prefix "legs-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-highres-wings"
        :level 'nestb
        :art-group "skel-metalkor-highres-wings"
        :prefix "wings-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix ""
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "b-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "c-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "d-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "e-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "f-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "g-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      (new 'static 'scene-actor
        :name "metalkor-fma-spinner"
        :level 'nestb
        :art-group "skel-metalkor-fma-spinner"
        :prefix "h-"
        :draw-frames '((min max))
        :scissor-frames '()
        :flags #x1
        :shadow-flags -1
        :shadow-volume-joint #f
        )
      )
    :load-point-obj "nestb-boss-pit"
    :end-point-obj #f
    :borrow '()
    :sfx-volume -1.0
    :ambient-volume -1.0
    :music-volume -1.0
    :blackout-end #t
    :peaceful #t
    :save #t
    )
  )

(deftype nest-gun-parts (process-drawable)
  ()
  (:state-methods
    idle
    )
  )


(defskelgroup skel-nest-gun-parts nest-gun-parts nest-gun-parts-lod0-jg nest-gun-parts-idle-ja
              ((nest-gun-parts-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 25 40)
              :origin-joint-index 3
              )

(defstate idle (nest-gun-parts)
  :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
  )

;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this nest-gun-parts) (arg0 entity-actor))
  "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
   This commonly includes things such as:
   - stack size
   - collision information
   - loading the skeleton group / bones
   - sounds"
  (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-nest-gun-parts" (the-as (pointer uint32) #f)))
    (the-as pair 0)
    )
  (set! (-> this draw light-index) (the-as uint 11))
  (go (method-of-object this idle))
  (none)
  )

(deftype nest-unbroken-rocks (process-drawable)
  ()
  (:state-methods
    idle
    )
  )


(defskelgroup skel-nest-unbroken-rocks nest-unbroken-rocks nest-unbroken-rocks-lod0-jg nest-unbroken-rocks-idle-ja
              ((nest-unbroken-rocks-lod0-mg (meters 999999)))
              :bounds (static-spherem 75 0 -75 55)
              :origin-joint-index 3
              )

(defstate idle (nest-unbroken-rocks)
  :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
  )

;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this nest-unbroken-rocks) (arg0 entity-actor))
  "Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
   This commonly includes things such as:
   - stack size
   - collision information
   - loading the skeleton group / bones
   - sounds"
  (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-nest-unbroken-rocks" (the-as (pointer uint32) #f))
      )
    (the-as pair 0)
    )
  (set! (-> this draw light-index) (the-as uint 1))
  (if (task-node-closed? (game-task-node nest-get-to-gun-resolution))
      (cleanup-for-death this)
      (go (method-of-object this idle))
      )
  (none)
  )

(defun nestb-login ()
  (set! *nav-network* (new 'loading-level 'nav-network))
  (nav-network-method-9 *nav-network*)
  0
  (none)
  )

(defun nestb-deactivate ()
  (if (not (level-get *level* 'nest))
      (set-time-for-random-weather! *mood-control* 0.0 0.0)
      )
  (set! *nav-network* (the-as nav-network 0))
  ;; og:preserve-this for nest revisit
  (#when PC_PORT
    (kill-by-name "blocking-plane-nestb" *active-pool*)
    )
  0
  (none)
  )

(defun nestb-activate ((arg0 level))
  (nav-network-method-10 *nav-network* arg0 *nestb-adjacency*)
  ;; og:preserve-this for nest revisit
  (#when PC_PORT
    (when (task-node-closed? (game-task-node nest-boss-resolution))
      (script-eval '(begin
                      (kill "metalkor-1")
                      (kill "rift-ring-ingame-1")
                      (kill "crate-942")
                      (kill "crate-943")
                      (kill "crate-944")
                      (kill "crate-945")
                      (kill "crate-946")
                      (kill "crate-947")
                      (kill "crate-948")
                      (kill "crate-949")
                      ))
      (let ((wall-pts (new 'stack-no-clear 'inline-array 'vector 2)))
        (set-vector! (-> wall-pts 0) (meters 172.4628) (meters 32) (meters -380.7990) 1.0)
        (set-vector! (-> wall-pts 1) (meters 151.7022) (meters 32) (meters -417.1884) 1.0)
        (process-spawn blocking-plane wall-pts (meters 60) :name "blocking-plane-nestb")
        )
      )
    )
  0
  (none)
  )
