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

(import "goal_src/jak1/import/swamp-rat-nest-ag.gc")

;; failed to figure out what this is:
(defpartgroup group-swamp-rat-nest-a-explosion
  :id 292
  :duration 5
  :flags (use-local-clock)
  :bounds (static-bspherem 0 0 0 6)
  :parts ((sp-item 1334) (sp-item 1335) (sp-item 1336) (sp-item 1337) (sp-item 1338) (sp-item 1339))
  )

;; failed to figure out what this is:
(defpartgroup group-swamp-rat-nest-b-explosion
  :id 293
  :duration 5
  :flags (use-local-clock)
  :bounds (static-bspherem 0 0 0 6)
  :parts ((sp-item 1342) (sp-item 1339) (sp-item 1337) (sp-item 1334))
  )

;; failed to figure out what this is:
(defpartgroup group-swamp-rat-nest-c-explosion
  :id 294
  :duration 5
  :flags (use-local-clock)
  :bounds (static-bspherem 0 0 0 6)
  :parts ((sp-item 1335) (sp-item 1339) (sp-item 1337) (sp-item 1334))
  )

;; failed to figure out what this is:
(defpartgroup group-swamp-rat-nest-a-puff
  :id 295
  :flags (use-local-clock)
  :bounds (static-bspherem 0 0 0 6)
  :parts ((sp-item 1346) (sp-item 1347) (sp-item 1348))
  )

;; failed to figure out what this is:
(defpartgroup group-swamp-rat-nest-b-puff
  :id 296
  :flags (use-local-clock)
  :bounds (static-bspherem 0 0 0 6)
  :parts ((sp-item 1350) (sp-item 1351))
  )

;; failed to figure out what this is:
(defpartgroup group-swamp-rat-nest-c-puff
  :id 297
  :flags (use-local-clock)
  :bounds (static-bspherem 0 0 0 6)
  :parts ((sp-item 1353) (sp-item 1354))
  )

;; failed to figure out what this is:
(defpart 1353
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-flt spt-num 1.0)
    (sp-rnd-flt spt-y (meters 1.5) (meters 0.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 96.0 64.0 1.0)
    (sp-rnd-flt spt-g 64.0 48.0 1.0)
    (sp-rnd-flt spt-b 64.0 16.0 1.0)
    (sp-rnd-flt spt-a 32.0 32.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.0016666667))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.14222223)
    (sp-rnd-flt spt-accel-y -0.34133333 -0.68266666 1.0)
    (sp-int spt-timer 450)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 90.0) (degrees 10.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 0.5) (meters 1.5) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1354
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
    (sp-flt spt-num 1.0)
    (sp-rnd-flt spt-y (meters 1) (meters 0.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 0.1) (meters 0.05) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 96.0 64.0 1.0)
    (sp-rnd-flt spt-g 64.0 32.0 1.0)
    (sp-rnd-flt spt-b 32.0 16.0 1.0)
    (sp-rnd-flt spt-a 64.0 64.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.006666667) (meters 0.01) 1.0)
    (sp-rnd-flt spt-rotvel-z (degrees -1.2) (degrees 2.4) 1.0)
    (sp-flt spt-fade-a -0.28444445)
    (sp-rnd-flt spt-accel-y -1.3653333 -2.7306666 1.0)
    (sp-int spt-timer 450)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 85.0) (degrees 10.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-flt spt-conerot-radius (meters 2))
    )
  )

;; failed to figure out what this is:
(defpart 1355
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-flt spt-num 1.0)
    (sp-rnd-flt spt-y (meters -4.5) (meters 0.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 64.0 48.0 1.0)
    (sp-rnd-flt spt-g 64.0 48.0 1.0)
    (sp-rnd-flt spt-b 64.0 16.0 1.0)
    (sp-rnd-flt spt-a 16.0 16.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.0016666667))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.07111111)
    (sp-rnd-flt spt-accel-y 0.34133333 0.68266666 1.0)
    (sp-int spt-timer 450)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 80.0) (degrees 10.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 0.5) (meters 1.5) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1350
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-flt spt-num 1.0)
    (sp-rnd-flt spt-y (meters -0.5) (meters 0.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 96.0 64.0 1.0)
    (sp-rnd-flt spt-g 64.0 48.0 1.0)
    (sp-rnd-flt spt-b 64.0 16.0 1.0)
    (sp-rnd-flt spt-a 32.0 32.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.0016666667))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.14222223)
    (sp-rnd-flt spt-accel-y -0.34133333 -0.68266666 1.0)
    (sp-int spt-timer 450)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 90.0) (degrees 10.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 0.5) (meters 1.5) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1351
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
    (sp-flt spt-num 1.0)
    (sp-rnd-flt spt-y (meters -1) (meters 0.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 0.1) (meters 0.05) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 96.0 64.0 1.0)
    (sp-rnd-flt spt-g 64.0 32.0 1.0)
    (sp-rnd-flt spt-b 32.0 16.0 1.0)
    (sp-rnd-flt spt-a 64.0 64.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.006666667) (meters 0.01) 1.0)
    (sp-rnd-flt spt-rotvel-z (degrees -1.2) (degrees 2.4) 1.0)
    (sp-flt spt-fade-a -0.28444445)
    (sp-rnd-flt spt-accel-y -1.3653333 -2.7306666 1.0)
    (sp-int spt-timer 450)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 85.0) (degrees 10.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-flt spt-conerot-radius (meters 3))
    )
  )

;; failed to figure out what this is:
(defpart 1352
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-flt spt-num 1.0)
    (sp-rnd-flt spt-y (meters -10.5) (meters 0.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 64.0 48.0 1.0)
    (sp-rnd-flt spt-g 64.0 48.0 1.0)
    (sp-rnd-flt spt-b 64.0 16.0 1.0)
    (sp-rnd-flt spt-a 16.0 16.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.0016666667))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.07111111)
    (sp-rnd-flt spt-accel-y 0.34133333 0.68266666 1.0)
    (sp-int spt-timer 450)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 80.0) (degrees 10.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 0.5) (meters 1.5) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1334
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
    (sp-flt spt-num 1.0)
    (sp-flt spt-y (meters 1))
    (sp-flt spt-scale-x (meters 16))
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 196.0)
    (sp-flt spt-g 160.0)
    (sp-flt spt-b 96.0)
    (sp-flt spt-a 32.0)
    (sp-flt spt-fade-a -1.0)
    (sp-int spt-timer 15)
    (sp-cpuinfo-flags bit2 bit3)
    )
  )

;; failed to figure out what this is:
(defpart 1341
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
    (sp-flt spt-num 1.0)
    (sp-flt spt-y (meters -12))
    (sp-flt spt-scale-x (meters 16))
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 196.0)
    (sp-flt spt-b 96.0)
    (sp-flt spt-a 16.0)
    (sp-flt spt-fade-a 0.0)
    (sp-int spt-timer 15)
    (sp-cpuinfo-flags bit2 bit3)
    )
  )

;; failed to figure out what this is:
(defpart 1339
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 8.0 8.0 1.0)
    (sp-rnd-flt spt-y (meters -1) (meters 1.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 0.75) (meters 1) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 64.0 48.0 1.0)
    (sp-rnd-flt spt-g 48.0 32.0 1.0)
    (sp-rnd-flt spt-b 48.0 8.0 1.0)
    (sp-rnd-flt spt-a 64.0 64.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.08) (meters 0.08) 1.0)
    (sp-flt spt-scalevel-x (meters 0.005))
    (sp-rnd-flt spt-rotvel-z (degrees -1.2) (degrees 2.4) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.85333335)
    (sp-rnd-flt spt-accel-y -1.3653333 -2.7306666 1.0)
    (sp-flt spt-friction 0.92)
    (sp-int spt-timer 150)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 70.0) (degrees 40.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 2.5) (meters 1) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1335
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 16.0 8.0 1.0)
    (sp-rnd-flt spt-y (meters -2) (meters 1.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 64.0 48.0 1.0)
    (sp-rnd-flt spt-g 48.0 32.0 1.0)
    (sp-rnd-flt spt-b 48.0 8.0 1.0)
    (sp-rnd-flt spt-a 64.0 64.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.005))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.21333334)
    (sp-rnd-flt spt-accel-y -0.13653333 -0.27306667 1.0)
    (sp-int spt-timer 600)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 30.0) (degrees 60.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 0.5) (meters 1.25) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1340
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 10.0 5.0 1.0)
    (sp-rnd-flt spt-y (meters -12) (meters 1.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 48.0 32.0 1.0)
    (sp-rnd-flt spt-g 48.0 32.0 1.0)
    (sp-rnd-flt spt-b 48.0 8.0 1.0)
    (sp-rnd-flt spt-a 32.0 32.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.005))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.10666667)
    (sp-rnd-flt spt-accel-y 0.13653333 0.27306667 1.0)
    (sp-int spt-timer 600)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 90.0) (degrees 60.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 0.5) (meters 1.25) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1336
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 12.0 8.0 1.0)
    (sp-rnd-flt spt-y (meters 0.5) (meters 0.25) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 48.0 32.0 1.0)
    (sp-rnd-flt spt-g 64.0 48.0 1.0)
    (sp-rnd-flt spt-b 48.0 8.0 1.0)
    (sp-rnd-flt spt-a 64.0 64.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.005))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.21333334)
    (sp-rnd-flt spt-accel-y -0.13653333 -0.27306667 1.0)
    (sp-int spt-timer 600)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 30.0) (degrees 50.000004) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 1) (meters 1.75) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1337
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
    (sp-rnd-flt spt-num 8.0 16.0 1.0)
    (sp-rnd-flt spt-y (meters -1) (meters 2) 1.0)
    (sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.6) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 96.0 64.0 1.0)
    (sp-rnd-flt spt-g 64.0 32.0 1.0)
    (sp-rnd-flt spt-b 32.0 16.0 1.0)
    (sp-flt spt-a 128.0)
    (sp-rnd-flt spt-vel-y (meters 0.02) (meters 0.04) 1.0)
    (sp-rnd-flt spt-rotvel-z (degrees -1.2) (degrees 2.4) 1.0)
    (sp-rnd-flt spt-accel-y -8.192 -2.7306666 1.0)
    (sp-int spt-timer 750)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-flt spt-userdata 0.0)
    (sp-func spt-func 'check-water-level-drop)
    (sp-rnd-flt spt-conerot-x (degrees 15.0) (degrees 60.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 0) (meters 3.5) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1338
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x17 :page #x2))
    (sp-rnd-flt spt-num 32.0 32.0 1.0)
    (sp-rnd-flt spt-y (meters 2) (meters 1) 1.0)
    (sp-rnd-flt spt-scale-x (meters 0.25) (meters 0.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-scale-y (meters 0.25) (meters 0.1) 1.0)
    (sp-rnd-flt spt-r 32.0 32.0 1.0)
    (sp-rnd-flt spt-g 128.0 32.0 1.0)
    (sp-rnd-flt spt-b 32.0 16.0 1.0)
    (sp-rnd-flt spt-a 64.0 64.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.02) (meters 0.04) 1.0)
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-flt spt-fade-a -0.28444445)
    (sp-rnd-flt spt-accel-y -1.3653333 -6.826667 1.0)
    (sp-flt spt-friction 0.94)
    (sp-int spt-timer 450)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 45.0) (degrees 60.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 3.5) (meters 1) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1346
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-flt spt-num 1.0)
    (sp-rnd-flt spt-y (meters 0.5) (meters 0.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 96.0 64.0 1.0)
    (sp-rnd-flt spt-g 64.0 48.0 1.0)
    (sp-rnd-flt spt-b 64.0 16.0 1.0)
    (sp-rnd-flt spt-a 32.0 32.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.0016666667))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.14222223)
    (sp-rnd-flt spt-accel-y -0.34133333 -0.68266666 1.0)
    (sp-int spt-timer 450)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 90.0) (degrees 10.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 2.5) (meters 1) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1349
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-flt spt-num 1.0)
    (sp-rnd-flt spt-y (meters -12) (meters 0.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 64.0 48.0 1.0)
    (sp-rnd-flt spt-g 64.0 48.0 1.0)
    (sp-rnd-flt spt-b 64.0 16.0 1.0)
    (sp-rnd-flt spt-a 8.0 8.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.0016666667))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.035555556)
    (sp-rnd-flt spt-accel-y 0.34133333 0.68266666 1.0)
    (sp-int spt-timer 450)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 80.0) (degrees 10.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 2.5) (meters 1) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1347
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x1d :page #x2))
    (sp-flt spt-num 1.0)
    (sp-rnd-flt spt-y (meters 1) (meters 0.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 0.1) (meters 0.05) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 96.0 64.0 1.0)
    (sp-rnd-flt spt-g 64.0 32.0 1.0)
    (sp-rnd-flt spt-b 32.0 16.0 1.0)
    (sp-rnd-flt spt-a 64.0 64.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-rnd-flt spt-rotvel-z (degrees -1.2) (degrees 2.4) 1.0)
    (sp-flt spt-fade-a -0.28444445)
    (sp-rnd-flt spt-accel-y -1.3653333 -2.7306666 1.0)
    (sp-int spt-timer 450)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 90.0) (degrees 10.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 3) (meters 0.5) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1348
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x17 :page #x2))
    (sp-rnd-flt spt-num 0.5 0.5 1.0)
    (sp-rnd-flt spt-y (meters 1) (meters 0.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 0.25) (meters 0.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-scale-y (meters 0.25) (meters 0.1) 1.0)
    (sp-rnd-flt spt-r 32.0 32.0 1.0)
    (sp-rnd-flt spt-g 128.0 32.0 1.0)
    (sp-rnd-flt spt-b 32.0 16.0 1.0)
    (sp-rnd-flt spt-a 64.0 64.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-flt spt-fade-a -0.28444445)
    (sp-rnd-flt spt-accel-y -1.3653333 -2.7306666 1.0)
    (sp-int spt-timer 450)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 90.0) (degrees 10.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 3) (meters 0.5) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1342
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 20.0 8.0 1.0)
    (sp-rnd-flt spt-y (meters -3.5) (meters 2.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 64.0 48.0 1.0)
    (sp-rnd-flt spt-g 48.0 32.0 1.0)
    (sp-rnd-flt spt-b 48.0 8.0 1.0)
    (sp-rnd-flt spt-a 64.0 64.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.005))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.21333334)
    (sp-rnd-flt spt-accel-y -0.13653333 -0.27306667 1.0)
    (sp-int spt-timer 600)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 30.0) (degrees 60.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 0.5) (meters 1.25) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1343
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 16.0 5.0 1.0)
    (sp-rnd-flt spt-y (meters -10.5) (meters 2.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 48.0 32.0 1.0)
    (sp-rnd-flt spt-g 48.0 32.0 1.0)
    (sp-rnd-flt spt-b 48.0 8.0 1.0)
    (sp-rnd-flt spt-a 32.0 32.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.005))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.10666667)
    (sp-rnd-flt spt-accel-y 0.13653333 0.27306667 1.0)
    (sp-int spt-timer 600)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 90.0) (degrees 60.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 0.5) (meters 1.25) 1.0)
    )
  )

;; failed to figure out what this is:
(defpart 1344
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
    (sp-flt spt-num -5.0)
    (sp-flt spt-y (meters -12))
    (sp-flt spt-scale-x (meters 16))
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-flt spt-r 128.0)
    (sp-flt spt-g 196.0)
    (sp-flt spt-b 96.0)
    (sp-flt spt-a 16.0)
    (sp-flt spt-fade-a 0.0)
    (sp-int spt-timer 15)
    (sp-cpuinfo-flags bit2 bit3)
    )
  )

;; failed to figure out what this is:
(defpart 1345
  :init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #x2))
    (sp-rnd-flt spt-num 12.0 4.0 1.0)
    (sp-rnd-flt spt-y (meters -4) (meters 1.5) 1.0)
    (sp-rnd-flt spt-scale-x (meters 1) (meters 2.5) 1.0)
    (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
    (sp-copy-from-other spt-scale-y -4)
    (sp-rnd-flt spt-r 48.0 32.0 1.0)
    (sp-rnd-flt spt-g 48.0 32.0 1.0)
    (sp-rnd-flt spt-b 48.0 8.0 1.0)
    (sp-rnd-flt spt-a 48.0 48.0 1.0)
    (sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
    (sp-flt spt-scalevel-x (meters 0.005))
    (sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
    (sp-copy-from-other spt-scalevel-y -4)
    (sp-flt spt-fade-a -0.16)
    (sp-rnd-flt spt-accel-y 0.13653333 0.27306667 1.0)
    (sp-int spt-timer 600)
    (sp-cpuinfo-flags bit2 bit12)
    (sp-rnd-flt spt-conerot-x (degrees 90.0) (degrees 60.0) 1.0)
    (sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
    (sp-rnd-flt spt-conerot-radius (meters 0.5) (meters 1.25) 1.0)
    )
  )

;; definition of type swamp-rat-nest
(deftype swamp-rat-nest (process-drawable)
  ((child-process       (pointer swamp-rat-nest-dummy)  :offset         20)
   (fact-override       fact-info-enemy                 :offset        144)
   (dummy               (pointer swamp-rat-nest-dummy)  :offset-assert 176)
   (damaged             symbol                          :offset-assert 180)
   (dummy-type          int8                            :offset-assert 184)
   (rat-count           int8                            :offset-assert 185)
   (hit-points          int8                            :offset-assert 186)
   (defensive-rat-count int8                            :offset-assert 187)
   (spawn-period        float                           :offset-assert 188)
   (spawn-period-scale  float                           :offset-assert 192)
   (test-interval       time-frame                      :offset-assert 200)
   (player-attack-id    int32                           :offset-assert 208)
   )
  :heap-base #x70
  :method-count-assert 20
  :size-assert         #xd4
  :flag-assert         #x14007000d4
  (:states
    swamp-rat-nest-active
    swamp-rat-nest-die
    swamp-rat-nest-gestate
    swamp-rat-nest-idle
    swamp-rat-nest-victory
    )
  )

;; definition for method 3 of type swamp-rat-nest
(defmethod inspect swamp-rat-nest ((obj swamp-rat-nest))
  (let ((t9-0 (method-of-type process-drawable inspect)))
    (t9-0 obj)
    )
  (format #t "~T~Tdummy: #x~X~%" (-> obj dummy))
  (format #t "~T~Tdamaged: ~A~%" (-> obj damaged))
  (format #t "~T~Tdummy-type: ~D~%" (-> obj dummy-type))
  (format #t "~T~Trat-count: ~D~%" (-> obj rat-count))
  (format #t "~T~Thit-points: ~D~%" (-> obj hit-points))
  (format #t "~T~Tdefensive-rat-count: ~D~%" (-> obj defensive-rat-count))
  (format #t "~T~Tspawn-period: ~f~%" (-> obj spawn-period))
  (format #t "~T~Tspawn-period-scale: ~f~%" (-> obj spawn-period-scale))
  (format #t "~T~Ttest-interval: ~D~%" (-> obj test-interval))
  (format #t "~T~Tplayer-attack-id: ~D~%" (-> obj player-attack-id))
  obj
  )

;; definition of type swamp-rat-nest-dummy
(deftype swamp-rat-nest-dummy (process-drawable)
  ((parent-process       (pointer swamp-rat-nest)         :offset         12)
   (root-override        collide-shape                    :offset        112)
   (top-sphere           sphere                   :inline :offset-assert 176)
   (death-part           sparticle-launch-group           :offset-assert 192)
   (spawn-joint-array    int8                     6       :offset-assert 196)
   (spawn-joint-count    int8                             :offset-assert 202)
   (particle-spawn-joint int8                             :offset-assert 203)
   )
  :heap-base #x60
  :method-count-assert 22
  :size-assert         #xcc
  :flag-assert         #x16006000cc
  (:methods
    (dummy-20 (_type_) none 20)
    (dummy-21 (_type_) int 21)
    )
  (:states
    swamp-rat-nest-dummy-die
    swamp-rat-nest-dummy-hit
    swamp-rat-nest-dummy-idle
    swamp-rat-nest-dummy-shake
    )
  )

;; definition for method 3 of type swamp-rat-nest-dummy
(defmethod inspect swamp-rat-nest-dummy ((obj swamp-rat-nest-dummy))
  (let ((t9-0 (method-of-type process-drawable inspect)))
    (t9-0 obj)
    )
  (format #t "~T~Ttop-sphere: #<sphere @ #x~X>~%" (-> obj top-sphere))
  (format #t "~T~Tdeath-part: ~A~%" (-> obj death-part))
  (format #t "~T~Tspawn-joint-array[6] @ #x~X~%" (-> obj spawn-joint-array))
  (format #t "~T~Tspawn-joint-count: ~D~%" (-> obj spawn-joint-count))
  (format #t "~T~Tparticle-spawn-joint: ~D~%" (-> obj particle-spawn-joint))
  obj
  )

;; definition of type swamp-rat-nest-dummy-a
(deftype swamp-rat-nest-dummy-a (swamp-rat-nest-dummy)
  ()
  :heap-base #x60
  :method-count-assert 22
  :size-assert         #xcc
  :flag-assert         #x16006000cc
  )

;; definition for method 3 of type swamp-rat-nest-dummy-a
(defmethod inspect swamp-rat-nest-dummy-a ((obj swamp-rat-nest-dummy-a))
  (let ((t9-0 (method-of-type swamp-rat-nest-dummy inspect)))
    (t9-0 obj)
    )
  obj
  )

;; definition of type swamp-rat-nest-dummy-b
(deftype swamp-rat-nest-dummy-b (swamp-rat-nest-dummy)
  ()
  :heap-base #x60
  :method-count-assert 22
  :size-assert         #xcc
  :flag-assert         #x16006000cc
  )

;; definition for method 3 of type swamp-rat-nest-dummy-b
(defmethod inspect swamp-rat-nest-dummy-b ((obj swamp-rat-nest-dummy-b))
  (let ((t9-0 (method-of-type swamp-rat-nest-dummy inspect)))
    (t9-0 obj)
    )
  obj
  )

;; definition of type swamp-rat-nest-dummy-c
(deftype swamp-rat-nest-dummy-c (swamp-rat-nest-dummy)
  ()
  :heap-base #x60
  :method-count-assert 22
  :size-assert         #xcc
  :flag-assert         #x16006000cc
  )

;; definition for method 3 of type swamp-rat-nest-dummy-c
(defmethod inspect swamp-rat-nest-dummy-c ((obj swamp-rat-nest-dummy-c))
  (let ((t9-0 (method-of-type swamp-rat-nest-dummy inspect)))
    (t9-0 obj)
    )
  obj
  )

;; definition for function swamp-rat-nest-dummy-draw-spawn-joints
(defbehavior swamp-rat-nest-dummy-draw-spawn-joints swamp-rat-nest-dummy ()
  (dotimes (gp-0 (-> self spawn-joint-count))
    (let* ((a0-0 (-> self spawn-joint-array gp-0))
           (a2-0 (-> self node-list data a0-0 bone transform))
           )
      (add-debug-matrix #t (bucket-id debug-no-zbuf) a2-0)
      )
    )
  #f
  )

;; definition for function swamp-rat-nest-dummy-take-damage
;; INFO: Return type mismatch int vs none.
(defbehavior swamp-rat-nest-dummy-take-damage swamp-rat-nest-dummy ((arg0 int))
  (when (not (-> self parent-process 0 damaged))
    (set! (-> self parent-process 0 damaged) #t)
    (+! (-> self parent-process 0 rat-count) (-> self parent-process 0 defensive-rat-count))
    (set! (-> self parent-process 0 spawn-period) 600.0)
    )
  (set! (-> self parent-process 0 hit-points) (- (-> self parent-process 0 hit-points) arg0))
  (none)
  )

;; definition for function swamp-rat-nest-dummy-event-handler
(defbehavior swamp-rat-nest-dummy-event-handler swamp-rat-nest-dummy ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
  (case arg2
    (('shake)
     (if (= (-> self next-state name) 'swamp-rat-nest-dummy-idle)
         (go swamp-rat-nest-dummy-shake)
         )
     )
    (('attack)
     (send-event (ppointer->process (-> self parent-process)) 'hit)
     (let ((v1-7 (-> arg3 param 2)))
       (when (!= v1-7 (-> self parent-process 0 player-attack-id))
         (set! (-> self parent-process 0 player-attack-id) (the-as int v1-7))
         (cond
           ((and (>= arg1 2) (= (-> arg3 param 1) 'eco-yellow))
            (swamp-rat-nest-dummy-take-damage 3)
            (if (< (vector-vector-distance (target-pos 0) (-> self top-sphere)) (-> self top-sphere w))
                (send-event *target* 'no-look-around (seconds 0.25))
                )
            (go swamp-rat-nest-dummy-hit)
            )
           (else
             (level-hint-spawn
               (game-text-id swamp-rat-nest-hint)
               "sksp0144"
               (the-as entity #f)
               *entity-pool*
               (game-task none)
               )
             (swamp-rat-nest-dummy-take-damage 0)
             (go swamp-rat-nest-dummy-hit)
             )
           )
         )
       )
     )
    )
  )

;; failed to figure out what this is:
(defstate swamp-rat-nest-dummy-idle (swamp-rat-nest-dummy)
  :event swamp-rat-nest-dummy-event-handler
  :code (behavior ()
    (loop
      (ja :num-func num-func-identity :frame-num max)
      (suspend)
      )
    (none)
    )
  :post (the-as (function none :behavior swamp-rat-nest-dummy) transform-post)
  )

;; failed to figure out what this is:
(defstate swamp-rat-nest-dummy-hit (swamp-rat-nest-dummy)
  :event swamp-rat-nest-dummy-event-handler
  :enter (behavior ()
    (set! (-> self state-time) (-> *display* base-frame-counter))
    (if (<= (-> self parent-process 0 hit-points) 0)
        (go swamp-rat-nest-dummy-die)
        )
    (none)
    )
  :code (behavior ()
    (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
    (until (ja-done? 0)
      (if (< (-> self parent-process 0 hit-points) 3)
          (spawn (-> self part) (-> self node-list data (-> self particle-spawn-joint) bone transform vector 3))
          )
      (suspend)
      (ja :num! (seek!))
      )
    (go swamp-rat-nest-dummy-idle)
    (none)
    )
  :post (the-as (function none :behavior swamp-rat-nest-dummy) transform-post)
  )

;; failed to figure out what this is:
(defstate swamp-rat-nest-dummy-shake (swamp-rat-nest-dummy)
  :event swamp-rat-nest-dummy-event-handler
  :code (behavior ()
    (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
    (until (ja-done? 0)
      (suspend)
      (ja :num! (seek!))
      )
    (go swamp-rat-nest-dummy-idle)
    (none)
    )
  :post (the-as (function none :behavior swamp-rat-nest-dummy) transform-post)
  )

;; failed to figure out what this is:
(defstate swamp-rat-nest-dummy-die (swamp-rat-nest-dummy)
  :event (the-as (function process int symbol event-message-block object :behavior swamp-rat-nest-dummy) #f)
  :code (behavior ()
    (set! (-> self state-time) (-> *display* base-frame-counter))
    (set! (-> self parent-process 0 dummy) (the-as (pointer swamp-rat-nest-dummy) #f))
    (process-spawn
      part-tracker
      :init part-tracker-init
      (-> self death-part)
      -1
      #f
      #f
      #f
      (-> self node-list data (-> self particle-spawn-joint) bone transform vector 3)
      :to *entity-pool*
      )
    (until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
      (suspend)
      )
    (ja-channel-set! 0)
    (while (-> self child)
      (suspend)
      )
    (deactivate self)
    (none)
    )
  )

;; definition for function swamp-rat-nest-dummy-init-by-other
;; INFO: Used lq/sq
;; INFO: Return type mismatch object vs none.
(defbehavior swamp-rat-nest-dummy-init-by-other swamp-rat-nest-dummy ((arg0 swamp-rat-nest-dummy))
  (let ((gp-0 (-> arg0 entity)))
    (set! (-> self mask) (logior (process-mask enemy) (-> self mask)))
    (dummy-20 self)
    (process-drawable-from-entity! self gp-0)
    (set! (-> self top-sphere quad) (-> self root-override trans quad))
    (set! (-> self top-sphere y) (+ 24576.0 (-> self top-sphere y)))
    (set! (-> self top-sphere w) 18432.0)
    (set! (-> self entity) gp-0)
    )
  (set! (-> self nav) (new 'process 'nav-control (-> self root-override) 16 40960.0))
  (logior! (-> self nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
  (set-current-poly! (-> self nav) (find-poly (-> self nav) (-> self root-override trans)))
  (+! (-> self parent-process 0 hit-points) 3)
  (dummy-21 self)
  (when (zero? (-> self skel))
    (set! (-> self spawn-joint-count) 0)
    0
    )
  (if (zero? (-> self parent-process 0 dummy-type))
      (go swamp-rat-nest-dummy-idle)
      (go swamp-rat-nest-dummy-hit)
      )
  (none)
  )

;; definition for function swamp-rat-nest-default-event-handler
(defbehavior swamp-rat-nest-default-event-handler swamp-rat-nest ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
  (case arg2
    (('victory)
     (go swamp-rat-nest-victory)
     )
    )
  )

;; failed to figure out what this is:
swamp-rat-nest-default-event-handler

;; definition for function swamp-rat-nest-pick-spawn-joint
;; INFO: Used lq/sq
(defbehavior swamp-rat-nest-pick-spawn-joint swamp-rat-nest ()
  (when (and *target* (>= 32768.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
    (dotimes (gp-0 5)
      (let* ((s5-0 (-> self dummy 0 spawn-joint-array (rand-vu-int-count (-> self dummy 0 spawn-joint-count))))
             (v1-15 (-> self dummy 0 node-list data s5-0 bone))
             (s3-0 (new 'stack-no-clear 'vector))
             )
        (set! (-> s3-0 quad) (-> v1-15 transform vector 3 quad))
        (let ((s2-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> v1-15 transform vector 1) 1.0))
              (s4-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) s3-0))
              )
          (set! (-> s4-1 y) 0.0)
          (vector-normalize! s4-1 1.0)
          (if (< (vector-dot s2-0 s4-1) (cos 8192.0))
              (return s5-0)
              )
          )
        )
      )
    )
  (-> self dummy 0 spawn-joint-array (rand-vu-int-count (-> self dummy 0 spawn-joint-count)))
  )

;; definition for function swamp-rat-nest-spawn-rat
;; INFO: Used lq/sq
;; INFO: Return type mismatch (pointer process) vs (pointer swamp-rat).
;; ERROR: Function may read a register that is not set: t2
(defbehavior swamp-rat-nest-spawn-rat swamp-rat-nest ()
  (local-vars (t2-0 none))
  (the-as
    (pointer swamp-rat)
    (when (and (-> self dummy) (> (-> self dummy 0 spawn-joint-count) 0))
      (let* ((v1-5 (swamp-rat-nest-pick-spawn-joint))
             (v1-8 (-> self dummy 0 node-list data v1-5 bone))
             (gp-0 (new 'stack-no-clear 'vector))
             )
        (set! (-> gp-0 quad) (-> v1-8 transform vector 3 quad))
        (let ((s5-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> v1-8 transform vector 1) 1.0))
              (s4-0 (if (= (-> self fact-override pickup-type) (pickup-type none))
                        0
                        9
                        )
                    )
              )
          (process-spawn swamp-rat self gp-0 s5-0 s4-0 t2-0 :to self)
          )
        )
      )
    )
  )

;; definition for function swamp-rat-nest-check-dummy
;; INFO: Return type mismatch float vs none.
(defbehavior swamp-rat-nest-check-dummy swamp-rat-nest ()
  (when (not (-> self dummy))
    (let ((v1-1 (-> self dummy-type)))
      (cond
        ((zero? v1-1)
         (set! (-> self dummy)
               (process-spawn swamp-rat-nest-dummy-a :init swamp-rat-nest-dummy-init-by-other self :to self)
               )
         )
        ((= v1-1 1)
         (set! (-> self dummy)
               (process-spawn swamp-rat-nest-dummy-b :init swamp-rat-nest-dummy-init-by-other self :to self)
               )
         )
        ((= v1-1 2)
         (set! (-> self dummy)
               (process-spawn swamp-rat-nest-dummy-c :init swamp-rat-nest-dummy-init-by-other self :to self)
               )
         )
        (else
          (go swamp-rat-nest-die)
          )
        )
      )
    (+! (-> self dummy-type) 1)
    (set! (-> self spawn-period) (* 0.75 (-> self spawn-period)))
    )
  (none)
  )

;; failed to figure out what this is:
(defstate swamp-rat-nest-idle (swamp-rat-nest)
  :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
    (case arg2
      (('hit)
       (go swamp-rat-nest-active)
       )
      )
    )
  :enter (behavior ()
    (set! (-> self state-time) (-> *display* base-frame-counter))
    (none)
    )
  :trans (behavior ()
    (if (and *target* (>= (-> self fact-override idle-distance)
                          (vector-vector-distance (-> self root trans) (-> *target* control trans))
                          )
             )
        (go swamp-rat-nest-active)
        )
    (none)
    )
  :code (behavior ()
    (swamp-rat-nest-check-dummy)
    (loop
      (suspend)
      )
    (none)
    )
  :post (the-as (function none :behavior swamp-rat-nest) #f)
  )

;; failed to figure out what this is:
(defstate swamp-rat-nest-active (swamp-rat-nest)
  :event swamp-rat-nest-default-event-handler
  :enter (behavior ()
    (set! (-> self state-time) (-> *display* base-frame-counter))
    (none)
    )
  :trans (behavior ()
    (swamp-rat-nest-check-dummy)
    (when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self test-interval))
      (set! (-> self state-time) (-> *display* base-frame-counter))
      (set! (-> self test-interval) (seconds 0.2))
      (let ((v1-6 0))
        (let ((a0-2 (the-as (pointer process-tree) (-> self child-process))))
          (while a0-2
            (if (= (-> (ppointer->process a0-2) type) swamp-rat)
                (+! v1-6 1)
                )
            (set! a0-2 (-> a0-2 0 brother))
            )
          )
        (if (< v1-6 (-> self rat-count))
            (go swamp-rat-nest-gestate)
            )
        )
      )
    (none)
    )
  :code (behavior ()
    (loop
      (suspend)
      )
    (none)
    )
  :post (the-as (function none :behavior swamp-rat-nest) #f)
  )

;; failed to figure out what this is:
(defstate swamp-rat-nest-gestate (swamp-rat-nest)
  :event swamp-rat-nest-default-event-handler
  :enter (behavior ()
    (set! (-> self state-time) (-> *display* base-frame-counter))
    (none)
    )
  :trans (behavior ()
    (swamp-rat-nest-check-dummy)
    (when (>= (- (-> *display* base-frame-counter) (-> self state-time))
              (the int (* (-> self spawn-period-scale) (-> self spawn-period)))
              )
      (send-event (ppointer->process (-> self dummy)) 'shake)
      (swamp-rat-nest-spawn-rat)
      (go swamp-rat-nest-active)
      )
    (none)
    )
  :code (behavior ()
    (loop
      (suspend)
      )
    (none)
    )
  :post (the-as (function none :behavior swamp-rat-nest) #f)
  )

;; failed to figure out what this is:
(defstate swamp-rat-nest-victory (swamp-rat-nest)
  :event (the-as (function process int symbol event-message-block object :behavior swamp-rat-nest) #f)
  :code (behavior ()
    (let ((gp-0 (the-as (pointer process-tree) (-> self child-process))))
      (while gp-0
        (let* ((s5-0 (ppointer->process gp-0))
               (a0-1 (if (and (nonzero? s5-0) (type-type? (-> s5-0 type) swamp-rat))
                         s5-0
                         )
                     )
               )
          (if a0-1
              (send-event a0-1 'victory)
              )
          )
        (set! gp-0 (-> gp-0 0 brother))
        )
      )
    (go swamp-rat-nest-active)
    (none)
    )
  :post (the-as (function none :behavior swamp-rat-nest) #f)
  )

;; failed to figure out what this is:
(defstate swamp-rat-nest-die (swamp-rat-nest)
  :event swamp-rat-nest-default-event-handler
  :code (behavior ()
    (process-entity-status! self (entity-perm-status complete) #t)
    (process-entity-status! self (entity-perm-status dead) #t)
    (drop-pickup (-> self fact-override) #t *entity-pool* (-> self fact-override) 0)
    (while (-> self child-process)
      (suspend)
      )
    (none)
    )
  :post (the-as (function none :behavior swamp-rat-nest) #f)
  )

;; definition for method 11 of type swamp-rat-nest
;; INFO: Return type mismatch object vs none.
(defmethod init-from-entity! swamp-rat-nest ((obj swamp-rat-nest) (arg0 entity-actor))
  (set! (-> obj mask) (logior (process-mask enemy) (-> obj mask)))
  (set! (-> obj root) (new 'process 'trsqv))
  (process-drawable-from-entity! obj arg0)
  (set! (-> obj fact-override)
        (new 'process 'fact-info-enemy obj (pickup-type eco-pill-random) (-> *FACT-bank* default-pill-inc))
        )
  (set! (-> obj path) (new 'process 'path-control obj 'path 0.0))
  (logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
  (let ((s5-1 (res-lump-value arg0 'num-lurkers uint128 :default (the-as uint128 3))))
    (if (>= (get-health-percent-lost *game-info* #f) 0.5)
        (+! s5-1 -1)
        )
    (set! (-> obj rat-count) (max 1 (min 4 (the-as int s5-1))))
    )
  (set! (-> obj defensive-rat-count) 2)
  (if (>= (get-health-percent-lost *game-info* #f) 0.75)
      (+! (-> obj defensive-rat-count) -1)
      )
  (set! (-> obj dummy) (the-as (pointer swamp-rat-nest-dummy) #f))
  (set! (-> obj dummy-type) 0)
  (set! (-> obj hit-points) 0)
  (set! (-> obj damaged) #f)
  (set! (-> obj spawn-period) (* 1200.0 (rand-vu-float-range 0.9 1.1)))
  (set! (-> obj spawn-period-scale) (+ 1.0 (* 2.0 (get-health-percent-lost *game-info* #f))))
  (set! (-> obj test-interval) (rand-vu-int-range (seconds 0.1) (seconds 0.2)))
  (go swamp-rat-nest-idle)
  (none)
  )

;; failed to figure out what this is:
(defskelgroup *swamp-rat-nest-dummy-a-sg* swamp-rat-nest swamp-rat-nest-a-lod0-jg swamp-rat-nest-a-idle-ja
              ((swamp-rat-nest-a-lod0-mg (meters 20)) (swamp-rat-nest-a-lod1-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 8)
              )

;; failed to figure out what this is:
(defskelgroup *swamp-rat-nest-dummy-b-sg* swamp-rat-nest swamp-rat-nest-b-lod0-jg swamp-rat-nest-b-idle-ja
              ((swamp-rat-nest-b-lod0-mg (meters 20)) (swamp-rat-nest-b-lod1-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 8)
              )

;; failed to figure out what this is:
(defskelgroup *swamp-rat-nest-dummy-c-sg* swamp-rat-nest swamp-rat-nest-c-lod0-jg swamp-rat-nest-c-idle-ja
              ((swamp-rat-nest-c-lod0-mg (meters 999999)))
              :bounds (static-spherem 0 0 0 5)
              )

;; definition for method 20 of type swamp-rat-nest-dummy-a
(defmethod dummy-20 swamp-rat-nest-dummy-a ((obj swamp-rat-nest-dummy-a))
  (let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-others))))
    (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
      (set! (-> s4-0 prim-core collide-as) (collide-kind wall-object))
      (set! (-> s4-0 collide-with) (collide-kind target))
      (set! (-> s4-0 prim-core action) (collide-action solid))
      (set! (-> s4-0 prim-core offense) (collide-offense indestructible))
      (set! (-> s4-0 transform-index) 0)
      (set-vector! (-> s4-0 local-sphere) 0.0 12288.0 0.0 20480.0)
      (set-root-prim! s5-0 s4-0)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (backup-collide-with-as s5-0)
    (set! (-> obj root-override) s5-0)
    )
  (initialize-skeleton obj *swamp-rat-nest-dummy-a-sg* '())
  (none)
  )

;; definition for method 20 of type swamp-rat-nest-dummy-b
(defmethod dummy-20 swamp-rat-nest-dummy-b ((obj swamp-rat-nest-dummy-b))
  (let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-others))))
    (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
      (set! (-> s4-0 prim-core collide-as) (collide-kind wall-object))
      (set! (-> s4-0 collide-with) (collide-kind target))
      (set! (-> s4-0 prim-core action) (collide-action solid))
      (set! (-> s4-0 prim-core offense) (collide-offense indestructible))
      (set! (-> s4-0 transform-index) 0)
      (set-vector! (-> s4-0 local-sphere) 0.0 12288.0 0.0 16384.0)
      (set-root-prim! s5-0 s4-0)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (backup-collide-with-as s5-0)
    (set! (-> obj root-override) s5-0)
    )
  (initialize-skeleton obj *swamp-rat-nest-dummy-b-sg* '())
  (none)
  )

;; definition for method 20 of type swamp-rat-nest-dummy-c
(defmethod dummy-20 swamp-rat-nest-dummy-c ((obj swamp-rat-nest-dummy-c))
  (let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-others))))
    (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
      (set! (-> s4-0 prim-core collide-as) (collide-kind wall-object))
      (set! (-> s4-0 collide-with) (collide-kind target))
      (set! (-> s4-0 prim-core action) (collide-action solid))
      (set! (-> s4-0 prim-core offense) (collide-offense indestructible))
      (set! (-> s4-0 transform-index) 0)
      (set-vector! (-> s4-0 local-sphere) 0.0 12288.0 0.0 12288.0)
      (set-root-prim! s5-0 s4-0)
      )
    (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
    (backup-collide-with-as s5-0)
    (set! (-> obj root-override) s5-0)
    )
  (initialize-skeleton obj *swamp-rat-nest-dummy-c-sg* '())
  (none)
  )

;; definition for method 21 of type swamp-rat-nest-dummy-a
(defmethod dummy-21 swamp-rat-nest-dummy-a ((obj swamp-rat-nest-dummy-a))
  (let ((v1-0 0))
    (let* ((a0-1 '(5 6 7 8 9 10))
           (a1-0 (car a0-1))
           )
      (while (not (null? a0-1))
        (when (< v1-0 6)
          (set! (-> obj spawn-joint-array v1-0) (/ (the-as int a1-0) 8))
          (+! v1-0 1)
          )
        (set! a0-1 (cdr a0-1))
        (set! a1-0 (car a0-1))
        )
      )
    (set! (-> obj spawn-joint-count) v1-0)
    )
  (set! (-> obj death-part) (-> *part-group-id-table* 292))
  (set! (-> obj part) (create-launch-control (-> *part-group-id-table* 295) obj))
  (let ((v0-1 6))
    (set! (-> obj particle-spawn-joint) v0-1)
    v0-1
    )
  )

;; definition for method 21 of type swamp-rat-nest-dummy-b
(defmethod dummy-21 swamp-rat-nest-dummy-b ((obj swamp-rat-nest-dummy-b))
  (let ((v1-0 0))
    (let* ((a0-1 '(5 9 10 6 7 8))
           (a1-0 (car a0-1))
           )
      (while (not (null? a0-1))
        (when (< v1-0 6)
          (set! (-> obj spawn-joint-array v1-0) (/ (the-as int a1-0) 8))
          (+! v1-0 1)
          )
        (set! a0-1 (cdr a0-1))
        (set! a1-0 (car a0-1))
        )
      )
    (set! (-> obj spawn-joint-count) v1-0)
    )
  (set! (-> obj death-part) (-> *part-group-id-table* 293))
  (set! (-> obj part) (create-launch-control (-> *part-group-id-table* 296) obj))
  (let ((v0-1 9))
    (set! (-> obj particle-spawn-joint) v0-1)
    v0-1
    )
  )

;; definition for method 21 of type swamp-rat-nest-dummy-c
(defmethod dummy-21 swamp-rat-nest-dummy-c ((obj swamp-rat-nest-dummy-c))
  (let ((v1-0 0))
    (let* ((a0-1 '(5 6)) (a1-0 (car a0-1))) (while (not (null? a0-1))
                                              (when (< v1-0 6)
                                                (set! (-> obj spawn-joint-array v1-0) (/ (the-as int a1-0) 8))
                                                (+! v1-0 1)
                                                )
                                              (set! a0-1 (cdr a0-1))
                                              (set! a1-0 (car a0-1))
                                              )
          )
    (set! (-> obj spawn-joint-count) v1-0)
    )
  (set! (-> obj death-part) (-> *part-group-id-table* 294))
  (set! (-> obj part) (create-launch-control (-> *part-group-id-table* 297) obj))
  (let ((v0-1 5))
    (set! (-> obj particle-spawn-joint) v0-1)
    v0-1
    )
  )
