jak-project/goal_src/jak3/levels/volcano/flamer-lava.gc
Hat Kid 58a5440c8a
decomp3: more misc files (#3466)
Makes a bunch of missions mostly playable, including:
- `arena-training-1`
- `arena-fight-1`
- `wascity-chase`
- `arena-fight-2`
- `arena-fight-3`
- `volcano-darkeco`
- `desert-hover`
- `nest-eggs`
- `temple-climb`
- `temple-oracle`
- `temple-tests`
- `desert-beast-battle`
- `desert-turtle-training`
- `desert-course-race`
- `desert-artifact-race1`
- `wascity-leaper-race`
- `wascity-pre-game`
- `sewer-met-hum`
- `forest-kill-plants`
- `forest-ring-chase`
- `temple-defend`
- `tower-destroy`
- `desert-glide`

---
Files:

- `ripple`
- `waswide-mood`
- `sig-rider`
- `nst-tasks`
- `nst-part`
- `nst-gas`
- `nst-eggs-h`
- `nst-obs`
- `nst-mood`
- `egg-spider`
- `wasdoors-init`
- `wasall-tasks`
- `wvehicle-race`
- `wcar-marauder`
- `wcar-marauder-b`
- `turret-control`
- `was-squad-control`
- `turtle-training`
- `kleever-rider`
- `course-race`
- `artifact-race`
- `desert-hover`
- `desbeast-path-h`
- `des-beast`
- `desertg-obs`
- `desertf-obs`
- `desertd-obs`
- `desert-dust-storm`
- `des-cactus`
- `race-hud`
- `race-info`
- `race-manager`
- `tizard`
- `flyingsaw`
- `hover-training`
- `temple-mood`
- `temple-obs`
- `temple-obs2`
- `temple-part`
- `temple-scenes`
- `templex-mood`
- `templex-obs`
- `templex-part`
- `tomb-baby-spider`
- `target-turret-shot`
- `target-turret`
- `beast-battle-path`
- `des-beast-2`
- `mh-flyer`
- `scorpion-gun`
- `hover-enemy-h`
- `hover-enemy`
- `hover-formation-h`
- `hover-formation`
- `hover-nav-control-h`
- `hover-nav-control`
- `flamer-hover`
- `hover-nav-templea`
- `robo-hover`
- `hover-nav-sewb`
- `hover-nav-sewg`
- `hover-nav-sewj`
- `hover-nav-sewl`
- `hover-nav-sewo`
- `hover-nav-towera`
- `tower-mood`
- `tower-obs`
- `tower-scenes`
- `tower-part`
- `eco-green-collider`
- `forest-bridges`
- `forest-kill-plants`
- `forest-mood`
- `forest-ring-chase`
- `forest-tasks`
- `forest-part`
- `foresta-obs`
- `hover-nav-foresta`
- `mh-plant`
- `dp-bipedal-part`
- `dp-bipedal-shot`
- `dp-bipedal`
- `neo-spawner`
- `for-turret`
- `for-turret-shot`
- `neo-wasp`
- `neo-wasp-part`
- `volcanox-scenes`
- `volcanox-mood`
- `volcano-scenes`
- `volcano-mood`
- `volcano-obs`
- `volcano-obs2`
- `chain-physics`
- `rigid-body-plat`
- `volcano-part`
- `flamer-lava`
- `flitter`
- `spiky-frog`
- `flut-wild`
- `target-indax`
- `target-indax-hang`
- `mantis`
- `volcanox-obs`
- `spyder`
- `wcar-faccar`
- `mhcity-obs2`
- `mhcity-part`
- `mhcity-obs`
- `dm-mine-spider`
- `rapid-gunner`
- `stadium-mood`
- `stadium-scenes`
- `stadiuma-mood`
- `stadiuma-part`
- `kanga-lizard`
- `marauder`
- `arena-scenes`
- `wasstada-mood`
- `wasstada-obs`
- `wasstada-part`
- `wasstadb-obs`
- `wasstadc-obs`
- `dm-flyer`
- `maker-part`
- `maker-projectile`
- `skeet-part`
- `wascity-turret`
- `wasgun-h`
- `wasgun-hud`
- `wasgun-manager`
- `nav-graph-h`
- `traffic-engine-h`
- `waswide-init`
- `cty-borrow-manager-h`
- `cty-borrow-manager`
- `desert-part`
- `height-map-h`
- `height-map`
- `traffic-height-map`
- `vehicle-control`
- `hvehicle-h`
- `hvehicle`
- `hvehicle-effects`
- `hvehicle-physics`
- `hvehicle-util`
- `glider-h`
- `glider-hud`
- `glider-manager`
- `glider-ring`
- `glider-ring-part`
- `h-glider`
- `hanga-init`
- `was-pre-game`
- `was-leaper-race`
- `flut-racer`
- `desert-scenes`
- `desert-lizard-h`
- `desert-lizard-task`
- `desert-lizard`
- `throne-scenes`
- `waspal-mood`
- `waspala-obs`
- `waspala-part`
- `deswalk-obs`
- `deswalk-part`
- `terraformer-drone`
- `terraformer-head`
- `terraformer-part`
- `terraformer-setup`
2024-04-22 18:43:51 +02:00

1552 lines
54 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: flamer-lava.gc
;; name in dgo: flamer-lava
;; dgos: VOCA
;; DECOMP BEGINS
(deftype flying-formation (hover-formation)
()
)
(deftype flamer-lava (nav-enemy)
((shot-trajectory trajectory :inline)
(last-fire-time time-frame)
(sync-off uint32)
(base-pos vector :inline)
(idle-pos vector :inline)
(offset vector :inline)
(dest-pos vector :inline)
(zone-to-world matrix :inline)
(world-to-zone matrix :inline)
(formation-entity entity)
(flit-joint joint-mod-set-local :inline)
(flit-angle float)
(flit-timer time-frame)
(path-pos float)
(sound-volume float)
(scale float)
(hit-surface? symbol)
(ground-mode int8)
(init-quat quaternion :inline)
(surface-normal vector :inline)
(main-joint-pos vector :inline)
(main-joint-vel vector :inline)
(main-joint-acc vector :inline)
(main-acceleration float)
(fly-dir vector :inline)
)
(:state-methods
attack
wait-for-formation
exit-ambush
exit-ambush-path
)
(:methods
(flamer-lava-method-194 (_type_) none)
(flamer-lava-method-195 (_type_ vector process-focusable) none)
(flamer-lava-method-196 (_type_) object)
(flamer-lava-method-197 (_type_) none)
(flamer-lava-method-198 (_type_) none)
(flamer-lava-method-199 (_type_ float) vector)
(flamer-lava-method-200 (_type_) none)
(flamer-lava-method-201 (_type_ int float int int) none)
(flamer-lava-method-202 (_type_) none)
(flamer-lava-method-203 (_type_) none)
(shadow-draw-probe (_type_) none)
)
)
(defskelgroup skel-flamer-lava flamer-lava flamer-lava-lod0-jg -1
((flamer-lava-lod0-mg (meters 20)) (flamer-lava-lod1-mg (meters 40)) (flamer-lava-lod2-mg (meters 999999)))
:bounds (static-spherem 0 0 0 7.5)
:shadow flamer-lava-shadow-mg
:origin-joint-index 3
:shadow-joint-index 3
)
(defskelgroup skel-flamer-lava-explode flamer-lava flamer-lava-explode-lod0-jg flamer-lava-explode-idle-ja
((flamer-lava-explode-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 7.5)
:origin-joint-index 3
)
(define *flamer-lava-exploder-params*
(new 'static 'joint-exploder-static-params
:joints (new 'static 'boxed-array :type joint-exploder-static-joint-params
(new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index -1)
(new 'static 'joint-exploder-static-joint-params :joint-index 17 :parent-joint-index -1)
)
:collide-spec (collide-spec backgnd)
)
)
(define *flamer-lava-fact-defaults*
(new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9)
)
(define *flamer-lava-nav-enemy-info*
(new 'static 'nav-enemy-info
:use-die-falling #t
:use-victory #f
:use-jump-blocked #f
:debug-draw-neck #f
:jump-debug-draw #f
:move-to-ground #f
:hover-if-no-ground #f
:idle-anim-script (new 'static 'inline-array idle-control-frame 2
(new 'static 'idle-control-frame
:command (idle-control-cmd play)
:anim #x5
:param0 1
:param1 1
:param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0))
)
(new 'static 'idle-control-frame)
)
:idle-anim 5
:notice-anim 5
:hostile-anim 5
:hit-anim 13
:knocked-anim 14
:knocked-land-anim 16
:die-anim 17
:die-falling-anim 17
:victory-anim 5
:jump-wind-up-anim 5
:jump-in-air-anim 5
:jump-land-anim 5
:neck-joint 19
:look-at-joint 19
:bullseye-joint 3
:sound-hit (static-sound-name "flamer-hit")
:sound-die (static-sound-name "flamer-die")
:notice-distance (meters 70)
:notice-distance-delta (meters 10)
:proximity-notice-distance (meters 55)
:default-hit-points 4.0
:gnd-collide-with (collide-spec backgnd)
:overlaps-others-collide-with-filter (collide-spec jak bot player-list)
:friction 0.8
:attack-shove-back (meters 3)
:attack-shove-up (meters 2)
:attack-mode 'generic
:attack-damage 2
:recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher)
:knocked-can-land-timeout (seconds 0.1)
:knocked-recover-timeout (seconds 2)
:ragdoll-blend-out-time (seconds 0.25)
:ragdoll-rotate-velocity-mult 1.0
:jump-height-min (meters 3)
:jump-height-factor 0.5
:knocked-soft-vxz-lo 72089.6
:knocked-soft-vxz-hi 108134.4
:knocked-soft-vy-lo 81920.0
:knocked-soft-vy-hi 122880.0
:knocked-medium-vxz-lo 147456.0
:knocked-medium-vxz-hi 196608.0
:knocked-medium-vy-lo 135168.0
:knocked-medium-vy-hi 151552.0
:knocked-hard-vxz-lo 78643.2
:knocked-hard-vxz-hi 117964.8
:knocked-hard-vy-lo 183500.8
:knocked-hard-vy-hi 209715.2
:knocked-huge-vxz-lo 164659.2
:knocked-huge-vxz-hi 249036.8
:knocked-huge-vy-lo 183500.8
:knocked-huge-vy-hi 217907.2
:knocked-yellow-vxz-lo 40960.0
:knocked-yellow-vxz-hi 49152.0
:knocked-yellow-vy-lo 57344.0
:knocked-yellow-vy-hi 81920.0
:knocked-red-vxz-lo 24576.0
:knocked-red-vxz-hi 196608.0
:knocked-red-vy-lo 94208.0
:knocked-red-vy-hi 151552.0
:knocked-blue-vxz-lo 40960.0
:knocked-blue-vxz-hi 90112.0
:knocked-blue-vy-lo 90112.0
:knocked-blue-vy-hi 172032.0
:ragdoll-info #f
:shadow-size (meters 2)
:shadow-max-y (meters 10)
:shadow-min-y (meters -40)
:shadow-locus-dist (meters 150)
:gem-joint 19
:gem-seg #x2
:gem-no-seg #x4
:gem-offset (new 'static 'sphere :y 450.56 :z 1638.4 :r 163840.0)
:knocked-off #t
:callback-info #f
:use-momentum #f
:use-frustration #t
:use-stop-chase #f
:use-circling #f
:use-pacing #f
:walk-anim 5
:turn-anim 5
:run-anim 5
:taunt-anim -1
:run-travel-speed (meters 16)
:run-acceleration (meters 1)
:run-turning-acceleration (meters 50)
:walk-travel-speed (meters 12)
:walk-acceleration (meters 1)
:walk-turning-acceleration (meters 50)
:maximum-rotation-rate (degrees 360)
:notice-nav-radius (meters 55)
:frustration-distance (meters 8)
:frustration-time (seconds 4)
:blocked-time (seconds 0.3)
:circle-dist-lo 20480.0
:circle-dist-hi 61440.0
:nav-mesh #f
)
)
(set! (-> *flamer-lava-nav-enemy-info* fact-defaults) *flamer-lava-fact-defaults*)
(defmethod event-handler ((this flamer-lava) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('hit 'hit-flinch 'hit-knocked)
(logclear! (-> this mask) (process-mask actor-pause))
(logclear! (-> this focus-status) (focus-status dangerous))
(logclear! (-> this enemy-flags) (enemy-flag use-notice-distance))
(logior! (-> this enemy-flags) (enemy-flag alert))
(logior! (-> this focus-status) (focus-status hit))
(if (= (-> this hit-points) 0.0)
(logior! (-> this focus-status) (focus-status dead))
)
(logclear! (-> this enemy-flags) (enemy-flag lock-focus))
(enemy-method-69 this)
(logior! (-> this enemy-flags) (enemy-flag lock-focus))
(process-contact-action arg0)
(send-event arg0 'get-attack-count 1)
(freeze-hit-begin)
(go (method-of-object this knocked))
)
(('update-formation)
(let ((v0-4 (the-as object (-> this offset))))
(set! (-> (the-as vector v0-4) quad) (-> (the-as vector (-> arg3 param 0)) quad))
v0-4
)
)
(else
((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3)
)
)
)
(defmethod flamer-lava-method-202 ((this flamer-lava))
(with-pp
(let ((v1-0 (-> this formation-entity)))
(when (if v1-0
(-> v1-0 extra process)
)
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) (process->ppointer pp))
(set! (-> a1-1 num-params) 0)
(set! (-> a1-1 message) 'join)
(let ((t9-0 send-event-function)
(v1-5 (-> this formation-entity))
)
(t9-0
(if v1-5
(-> v1-5 extra process)
)
a1-1
)
)
)
)
)
0
(none)
)
)
(defmethod flamer-lava-method-203 ((this flamer-lava))
(with-pp
(let ((v1-0 (-> this formation-entity)))
(when (if v1-0
(-> v1-0 extra process)
)
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) (process->ppointer pp))
(set! (-> a1-1 num-params) 0)
(set! (-> a1-1 message) 'leave)
(let ((t9-0 send-event-function)
(v1-5 (-> this formation-entity))
)
(t9-0
(if v1-5
(-> v1-5 extra process)
)
a1-1
)
)
)
)
)
0
(none)
)
)
(defmethod flamer-lava-method-194 ((this flamer-lava))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(vector-! gp-0 (target-pos 0) (-> this root trans))
(seek-toward-heading-vec! (-> this root) gp-0 131072.0 (seconds 0.5))
)
0
(none)
)
(defmethod normalize-heading! ((this flamer-lava) (arg0 nav-control))
(flamer-lava-method-194 this)
(none)
)
;; WARN: Return type mismatch object vs none.
(defmethod flamer-lava-method-195 ((this flamer-lava) (arg0 vector) (arg1 process-focusable))
(with-pp
(set! arg0 (cond
((and *target* (-> this next-state) (let ((v1-4 (-> this next-state name)))
(or (= v1-4 'hostile) (= v1-4 'attack) (= v1-4 'hit))
)
)
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-3 from) (process->ppointer pp))
(set! (-> a1-3 num-params) 0)
(set! (-> a1-3 message) 'get-formation)
(let* ((t9-0 send-event-function)
(v1-7 (-> this formation-entity))
(s2-0 (the-as hover-formation-control (t9-0
(if v1-7
(-> v1-7 extra process)
)
a1-3
)
)
)
(s4-0 (new 'stack-no-clear 'vector))
)
(cond
((and s2-0 (not (is-formation-type-in-range s2-0)))
(hover-formation-control-method-15 s2-0 arg0 (-> this offset))
)
(else
(cond
(s2-0
(hover-formation-control-method-13 s2-0 s4-0)
)
(else
(let ((s1-0 (new 'stack-no-clear 'vector)))
(set! (-> s1-0 quad) (-> (get-trans arg1 0) quad))
(let ((s3-1 (new 'stack-no-clear 'vector)))
(let ((s2-1 (new 'stack-no-clear 'vector)))
(vector-! s3-1 s1-0 (-> this root trans))
(vector-flatten! s2-1 s3-1 (-> this zone-to-world fvec))
(vector-float*! s2-1 s2-1 -0.9)
(vector+! s3-1 s3-1 s2-1)
)
(vector+! s4-0 (-> this root trans) s3-1)
)
)
)
)
(vector-matrix*! arg0 s4-0 (-> this world-to-zone))
(vector+! arg0 arg0 (-> this offset))
(vector-matrix*! arg0 arg0 (-> this zone-to-world))
)
)
)
)
(let* ((v1-30 (+ (current-time) (the-as time-frame (-> this sync-off))))
(f0-5 (+ (-> arg0 x) (* 614.4 (cos (* 54.613335 (the float (mod v1-30 1200)))))))
)
(set! (-> arg0 x) f0-5)
(the-as vector f0-5)
)
)
(else
(set! (-> arg0 quad) (-> this idle-pos quad))
arg0
)
)
)
(none)
)
)
(defbehavior flamer-lava-attack-post flamer-lava ()
(let ((a2-0 (handle->process (-> self focus handle))))
(when a2-0
(flamer-lava-method-195 self (-> self dest-pos) (the-as process-focusable a2-0))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(vector-matrix*! gp-0 (-> self dest-pos) (-> self world-to-zone))
(if (< (-> gp-0 z) 0.0)
(set! (-> gp-0 z) 0.0)
)
(vector-matrix*! (-> self dest-pos) gp-0 (-> self zone-to-world))
)
)
)
(closest-point-on-mesh (-> self nav) (-> self dest-pos) (-> self dest-pos) (the-as nav-poly #f))
(if #f
(add-debug-line
#t
(bucket-id debug-no-zbuf1)
(-> self root trans)
(-> self dest-pos)
(new 'static 'rgba :r #xff :g #xff :b #xff :a #xff)
#f
(the-as rgba -1)
)
)
(let ((a0-8 (-> self nav state))
(v1-16 (-> self dest-pos))
)
(logclear! (-> a0-8 flags) (nav-state-flag directional-mode))
(logior! (-> a0-8 flags) (nav-state-flag target-poly-dirty))
(set! (-> a0-8 target-pos quad) (-> v1-16 quad))
)
0
(flamer-lava-method-197 self)
(nav-enemy-travel-post)
(none)
)
(defbehavior flamer-lava-flit-post flamer-lava ()
(when (time-elapsed? (-> self flit-timer) (rand-vu-int-range (seconds 1.2) (seconds 3)))
(set! (-> self flit-angle)
(the float
(sar (shl (the int (+ (-> self flit-angle) (* 182.04445 (rand-vu-float-range 160.0 200.0)))) 48) 48)
)
)
(set-time! (-> self flit-timer))
)
(flamer-lava-attack-post)
(none)
)
;; WARN: disable def twice: 22. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
;; WARN: disable def twice: 45. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
(defmethod flamer-lava-method-196 ((this flamer-lava))
(with-pp
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) (process->ppointer pp))
(set! (-> a1-0 num-params) 0)
(set! (-> a1-0 message) 'get-formation)
(let* ((t9-0 send-event-function)
(v1-2 (-> this formation-entity))
(a0-3 (the-as hover-formation-control (t9-0
(if v1-2
(-> v1-2 extra process)
)
a1-0
)
)
)
)
(cond
(a0-3
(and (hover-formation-control-method-16 a0-3) (>= (the-as int (-> this focus aware)) 3))
)
(*target*
(let ((a1-1 (target-pos 0)))
(-> this root trans)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(vector-matrix*! s5-0 a1-1 (-> this world-to-zone))
(and (>= (-> this enemy-info notice-distance) (-> s5-0 z)) (>= (the-as int (-> this focus aware)) 3))
)
)
)
(else
#f
)
)
)
)
)
)
(defmethod flamer-lava-method-201 ((this flamer-lava) (arg0 int) (arg1 float) (arg2 int) (arg3 int))
(local-vars (v1-1 int))
0
(if (< 0.0 arg1)
(set! v1-1 arg2)
(set! v1-1 arg3)
)
(let ((a3-5 (-> this skel root-channel arg0)))
(let ((f0-2 (fabs arg1)))
(set! (-> a3-5 frame-interp 1) f0-2)
(set! (-> a3-5 frame-interp 0) f0-2)
)
(set! (-> a3-5 frame-group) (the-as art-joint-anim (-> this draw art-group data v1-1)))
(set! (-> a3-5 param 0) 0.0)
(set! (-> a3-5 frame-num) (-> this skel root-channel 0 frame-num))
(joint-control-channel-group! a3-5 (the-as art-joint-anim (-> this draw art-group data v1-1)) num-func-chan)
)
(none)
)
(defmethod flamer-lava-method-200 ((this flamer-lava))
(local-vars (at-0 int) (at-1 int))
(with-pp
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((a1-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 3)))
(a0-2 (new 'stack-no-clear 'vector))
(v1-1 (new 'stack-no-clear 'vector))
)
(new 'stack-no-clear 'vector)
(vector-! a0-2 a1-1 (-> this main-joint-pos))
(let ((a2-2 a0-2))
(.lvf vf1 (&-> a0-2 quad))
(let ((f0-0 (-> pp clock frames-per-second)))
(.mov at-0 f0-0)
)
(.mov vf2 at-0)
(.mov.vf vf1 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> a2-2 quad) vf1)
)
(vector-! v1-1 a0-2 (-> this main-joint-vel))
(let ((a2-4 v1-1))
(.lvf vf1 (&-> v1-1 quad))
(let ((f0-1 (-> pp clock frames-per-second)))
(.mov at-1 f0-1)
)
(.mov vf2 at-1)
(.mov.vf vf1 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> a2-4 quad) vf1)
)
(set! (-> this main-joint-pos quad) (-> a1-1 quad))
(let* ((f0-2 0.4)
(f1-1 (- 1.0 f0-2))
(a1-5 (-> this main-joint-vel))
)
(set! (-> a1-5 x) (+ (* f0-2 (-> a0-2 x)) (* f1-1 (-> a1-5 x))))
(set! (-> a1-5 y) (+ (* f0-2 (-> a0-2 y)) (* f1-1 (-> a1-5 y))))
(set! (-> a1-5 z) (+ (* f0-2 (-> a0-2 z)) (* f1-1 (-> a1-5 z))))
)
(set! (-> this main-joint-acc quad) (-> v1-1 quad))
)
0
0
(none)
)
)
)
(defmethod enemy-common-post ((this flamer-lava))
(update-vol! (-> this sound) (-> this sound-volume))
(shadow-draw-probe this)
((method-of-type nav-enemy enemy-common-post) this)
(none)
)
;; WARN: Return type mismatch object vs none.
(defmethod shadow-draw-probe ((this flamer-lava))
(cond
((and (-> this draw shadow)
(zero? (-> this draw cur-lod))
(logtest? (-> this draw status) (draw-control-status on-screen))
)
(new 'stack-no-clear 'vector)
(new 'stack-no-clear 'vector)
(let ((s4-0 (new 'stack-no-clear 'collide-query))
(gp-0 (-> this draw shadow-ctrl settings shadow-dir))
(f30-0 122880.0)
)
(set! (-> s4-0 start-pos quad) (-> this root trans quad))
(vector-normalize-copy! (-> s4-0 move-dist) gp-0 f30-0)
(let ((v1-12 s4-0))
(set! (-> v1-12 radius) 3276.8)
(set! (-> v1-12 collide-with) (collide-spec backgnd))
(set! (-> v1-12 ignore-process0) this)
(set! (-> v1-12 ignore-process1) #f)
(set! (-> v1-12 ignore-pat)
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
)
(set! (-> v1-12 action-mask) (collide-action solid))
)
(let ((f0-1 (fill-and-probe-using-line-sphere *collide-cache* s4-0)))
(cond
((>= f0-1 0.0)
(let ((v1-16 (-> this draw shadow-ctrl)))
(logclear! (-> v1-16 settings flags) (shadow-flags disable-draw))
)
0
(-> s4-0 best-other-tri intersect)
(let ((a1-3 (-> this root trans)))
(-> a1-3 y)
(let ((f1-2 (* f0-1 f30-0)))
(shadow-control-method-14
(-> this draw shadow-ctrl)
a1-3
gp-0
(fmax 32768.0 (* 409600.0 f0-1))
(+ -12288.0 f1-2)
(+ 12288.0 f1-2)
)
)
)
)
(else
(let ((v1-27 (-> this draw shadow-ctrl)))
(logior! (-> v1-27 settings flags) (shadow-flags disable-draw))
)
0
)
)
)
)
)
(else
(let ((v1-29 (-> this draw shadow-ctrl)))
(logior! (-> v1-29 settings flags) (shadow-flags disable-draw))
)
0
)
)
(none)
)
;; WARN: Return type mismatch symbol vs none.
;; WARN: new jak 2 until loop case, check carefully
(defbehavior flamer-lava-fly-code flamer-lava ()
(let ((v1-2 (ja-group)))
(if (not (and v1-2 (= v1-2 flamer-lava-idle-ja)))
(ja-channel-push! 3 (seconds 0.2))
(ja-channel-set! 3)
)
)
(ja-no-eval :group! flamer-lava-idle-ja :num! (seek!) :frame-num 0.0)
(let ((a0-7 (-> self skel root-channel 1)))
(let ((f0-4 0.0))
(set! (-> a0-7 frame-interp 1) f0-4)
(set! (-> a0-7 frame-interp 0) f0-4)
)
(set! (-> a0-7 frame-group) (the-as art-joint-anim flamer-lava-idle-ja))
(set! (-> a0-7 param 0) (the float (+ (-> (the-as art-joint-anim flamer-lava-idle-ja) frames num-frames) -1)))
(set! (-> a0-7 param 1) 1.0)
(set! (-> a0-7 frame-num) 0.0)
(joint-control-channel-group! a0-7 (the-as art-joint-anim flamer-lava-idle-ja) num-func-seek!)
)
(let ((a0-8 (-> self skel root-channel 2)))
(let ((f0-9 0.0))
(set! (-> a0-8 frame-interp 1) f0-9)
(set! (-> a0-8 frame-interp 0) f0-9)
)
(set! (-> a0-8 frame-group) (the-as art-joint-anim flamer-lava-idle-ja))
(set! (-> a0-8 param 0) (the float (+ (-> (the-as art-joint-anim flamer-lava-idle-ja) frames num-frames) -1)))
(set! (-> a0-8 param 1) 1.0)
(set! (-> a0-8 frame-num) 0.0)
(joint-control-channel-group! a0-8 (the-as art-joint-anim flamer-lava-idle-ja) num-func-seek!)
)
(until #f
(let ((gp-0 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) (-> self main-joint-vel) (-> self root quat)))
)
(vector-float*! gp-0 gp-0 (/ 1.0 (-> self enemy-info run-travel-speed)))
(flamer-lava-method-201 self 1 (-> gp-0 x) 7 6)
(flamer-lava-method-201 self 2 (-> gp-0 z) 8 9)
)
(suspend)
(ja :num! (loop!))
(seek! (-> self sound-volume) 1.0 (* 0.5 (seconds-per-frame)))
)
#f
(none)
)
(defmethod flamer-lava-method-197 ((this flamer-lava))
(let ((v1-0 (-> this ground-mode)))
(cond
((= v1-0 1)
(seek! (-> this base-pos y) (-> this dest-pos y) (* 40960.0 (seconds-per-frame)))
)
((zero? v1-0)
(let ((a1-1 (new 'stack-no-clear 'collide-query)))
(cond
((set-ground-pat! this a1-1 (collide-spec backgnd) 8192.0 30720.0 1024.0 (the-as process #f))
(set! (-> this base-pos y) (+ 26624.0 (-> this root gspot-pos y)))
)
(else
(let ((s4-0 (-> this nav))
(s3-0 (-> this base-pos))
(s5-0 (new 'stack 'nav-find-poly-parms))
)
(vector-! (-> s5-0 point) s3-0 (the-as vector (-> s4-0 state mesh bounds)))
(set! (-> s5-0 y-threshold) (-> s4-0 nearest-y-threshold))
(set! (-> s5-0 ignore) (the-as uint 2))
(nav-mesh-method-46 (-> s4-0 state mesh) (the-as nav-poly s5-0))
(let ((v1-13 (-> s5-0 poly)))
(if v1-13
(set! (-> this base-pos y) (+ 26624.0 (-> this nav state mesh bounds y) (-> v1-13 vertex0 y)))
)
)
)
)
)
)
)
)
)
(let ((v1-16 (+ (current-time) (the-as time-frame (-> this sync-off)))))
(seek!
(-> this root trans y)
(fmax
(+ (-> this base-pos y) (* 1228.8 (cos (* 100.66974 (the float (mod v1-16 651))))))
(+ 20480.0 (-> this root gspot-pos y))
)
(* 16384.0 (seconds-per-frame))
)
)
(let ((s5-2 (new 'stack-no-clear 'vector)))
(set! (-> s5-2 quad) (-> *up-vector* quad))
(vector-normalize! s5-2 2048.0)
(vector/! s5-2 s5-2 (-> this root scale))
(vector-rotate-around-z! s5-2 s5-2 (-> this flit-angle))
(vector-seek! (the-as vector (-> this flit-joint transform)) s5-2 (* 32768.0 (seconds-per-frame)))
)
(update-trans! (-> this sound) (-> this root trans))
(update! (-> this sound))
(none)
)
(defmethod go-stare ((this flamer-lava))
(go-hostile this)
)
(defstate wait-for-formation (flamer-lava)
:virtual #t
:event enemy-event-handler
:enter (-> (method-of-type flamer-lava idle) enter)
:trans (-> (method-of-type flamer-lava idle) trans)
:code (behavior ()
(until #f
(let ((v1-0 (-> self formation-entity)))
(if (if v1-0
(-> v1-0 extra process)
)
(go-virtual idle)
)
)
(suspend)
)
#f
)
:post (-> (method-of-type flamer-lava idle) post)
)
(defstate dormant (flamer-lava)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy dormant) enter)))
(if t9-0
(t9-0)
)
)
(set! (-> self root trans quad) (-> self idle-pos quad))
)
)
(defstate dormant-aware (flamer-lava)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy dormant-aware) enter)))
(if t9-0
(t9-0)
)
)
(set! (-> self root trans quad) (-> self idle-pos quad))
)
:trans (behavior ()
(when (and (time-elapsed? (-> self state-time) (-> self state-timeout)) (flamer-lava-method-196 self))
(if (logtest? (enemy-option ambush) (-> self fact enemy-options))
(go-virtual ambush)
(go-virtual active)
)
)
)
)
(defstate idle (flamer-lava)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy idle) enter)))
(if t9-0
(t9-0)
)
)
(flamer-lava-method-203 self)
(set! (-> self ground-mode) 0)
0
)
:trans (behavior ()
(when (flamer-lava-method-196 self)
(point-toward-point! (-> self root) (target-pos 0))
(go-virtual active)
)
(flamer-lava-method-197 self)
)
)
(defstate active (flamer-lava)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy active) enter)))
(if t9-0
(t9-0)
)
)
(set! (-> self ground-mode) 0)
0
)
:trans (behavior ()
(if (flamer-lava-method-196 self)
(go-virtual hostile)
)
(if (>= 819.2 (vector-vector-xz-distance (-> self root trans) (-> self idle-pos)))
(go-virtual idle)
)
)
:post flamer-lava-attack-post
)
(defstate ambush (flamer-lava)
:virtual #t
:enter (behavior ()
(rlet ((vf0 :class vf))
(init-vf0-vector)
(let ((t9-0 (-> (method-of-type nav-enemy ambush) enter)))
(if t9-0
(t9-0)
)
)
(logclear! (-> self mask) (process-mask actor-pause))
(logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup))
(when (not (-> self path))
(point-toward-point! (-> self root) (target-pos 0))
(go-virtual notice)
)
(let ((v1-15 self))
(set! (-> v1-15 enemy-flags) (the-as enemy-flag (logclear (-> v1-15 enemy-flags) (enemy-flag ef37))))
(set! (-> v1-15 nav callback-info) *null-nav-callback-info*)
)
0
(let ((v1-18 self))
(set! (-> v1-18 enemy-flags) (the-as enemy-flag (logclear (-> v1-18 enemy-flags) (enemy-flag ef38))))
)
0
(logclear! (-> self flit-joint flags) (joint-mod-base-flags trans))
(.svf (&-> (-> self flit-joint transform) trans quad) vf0)
(vector<-cspace! (-> self main-joint-pos) (joint-node flamer-lava-lod0-jg main))
(vector-reset! (-> self main-joint-vel))
(vector-reset! (-> self main-joint-acc))
(set! (-> self main-acceleration) 0.0)
(vector-reset! (-> self fly-dir))
(sound-play "flamer-ambush")
(let ((s2-0 (-> self root quat)))
(forward-up-nopitch->quaternion
s2-0
(vector-normalize! (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)) 1.0)
*y-vector*
)
(quaternion-normalize! s2-0)
(quaternion-copy! s2-0 (-> self init-quat))
)
(set-time! (-> self state-time))
)
)
:exit (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy ambush) exit)))
(if t9-0
(t9-0)
)
)
(logior! (-> self mask) (process-mask actor-pause))
(logior! (-> self enemy-flags) (enemy-flag actor-pause-backup))
(logior! (-> self flit-joint flags) (joint-mod-base-flags trans))
(set! (-> self last-fire-time) (+ (current-time) (seconds -1.5)))
)
:trans (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy ambush) trans)))
(if t9-0
(t9-0)
)
)
(seek! (-> self path-pos) 1.0 (* 0.75 (seconds-per-frame)))
(let ((f30-0 (-> self path-pos)))
(when (>= f30-0 1.0)
(set! (-> self path-pos) 1.0)
(get-point-at-percent-along-path! (-> self path) (-> self root trans) f30-0 'interp)
(go-virtual notice)
)
(get-point-at-percent-along-path! (-> self path) (-> self root trans) f30-0 'interp)
(flamer-lava-method-194 self)
(flamer-lava-method-199 self f30-0)
)
)
:code flamer-lava-fly-code
:post (behavior ()
(flamer-lava-method-200 self)
(nav-enemy-simple-post)
)
)
(defstate exit-ambush (flamer-lava)
:virtual #t
:enter (behavior ()
(logclear! (-> self mask) (process-mask actor-pause))
(logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup))
(if (not (-> self path))
(go-virtual active)
)
(let ((v1-9 self))
(if (not (logtest? (enemy-flag ef37) (-> v1-9 enemy-flags)))
(set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-9 enemy-flags))))
)
(set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-9 enemy-flags))))
(set! (-> v1-9 nav callback-info) (-> v1-9 enemy-info callback-info))
)
0
(let ((v1-12 self))
(set! (-> v1-12 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-12 enemy-flags))))
)
0
(get-point-at-percent-along-path! (-> self path) (-> self dest-pos) 1.0 'interp)
(let ((a0-18 (-> self nav state))
(v1-17 (-> self dest-pos))
)
(logclear! (-> a0-18 flags) (nav-state-flag directional-mode))
(logior! (-> a0-18 flags) (nav-state-flag target-poly-dirty))
(set! (-> a0-18 target-pos quad) (-> v1-17 quad))
)
0
(set! (-> self ground-mode) 1)
)
:trans (behavior ()
(if (< (vector-vector-xz-distance (-> self root trans) (-> self dest-pos)) 409.6)
(go-virtual exit-ambush-path)
)
)
:code flamer-lava-fly-code
:post (behavior ()
(flamer-lava-method-200 self)
(flamer-lava-flit-post)
)
)
(defstate exit-ambush-path (flamer-lava)
:virtual #t
:enter (behavior ()
(let ((v1-0 self))
(set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37))))
(set! (-> v1-0 nav callback-info) *null-nav-callback-info*)
)
0
(let ((v1-3 self))
(set! (-> v1-3 enemy-flags) (the-as enemy-flag (logclear (-> v1-3 enemy-flags) (enemy-flag ef38))))
)
0
(set-time! (-> self state-time))
)
:exit (behavior ()
(logior! (-> self mask) (process-mask actor-pause))
(logior! (-> self enemy-flags) (enemy-flag actor-pause-backup))
)
:trans (behavior ()
(set! (-> self path-pos) (- (-> self path-pos) (* 0.33333334 (seconds-per-frame))))
(let ((f30-0 (-> self path-pos)))
(when (>= 0.0 f30-0)
(set! (-> self path-pos) 0.0)
(get-point-at-percent-along-path! (-> self path) (-> self root trans) f30-0 'interp)
(cond
((logtest? (enemy-option dormant) (-> self fact enemy-options))
(go-virtual dormant)
)
((logtest? (enemy-option dormant-aware) (-> self fact enemy-options))
(go-virtual dormant-aware)
)
(else
(go-virtual active)
)
)
)
(get-point-at-percent-along-path! (-> self path) (-> self base-pos) f30-0 'interp)
(flamer-lava-method-199 self f30-0)
)
)
:code flamer-lava-fly-code
:post (behavior ()
(flamer-lava-method-200 self)
(when (time-elapsed? (-> self flit-timer) (rand-vu-int-range (seconds 1.2) (seconds 3)))
(set! (-> self flit-angle) (* 182.04445 (rand-vu-float-range 0.0 360.0)))
(set-time! (-> self flit-timer))
)
(vector-seek! (-> self root trans) (-> self base-pos) (* 16384.0 (seconds-per-frame)))
(flamer-lava-method-197 self)
(nav-enemy-simple-post)
)
)
(defstate notice (flamer-lava)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy notice) enter)))
(if t9-0
(t9-0)
)
)
(logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing))
(set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef44))))
(go-virtual hostile)
)
)
(defun vector-square! ((arg0 vector) (arg1 vector))
(set! (-> arg0 x) (* (-> arg1 x) (-> arg1 x)))
(set! (-> arg0 y) (* (-> arg1 y) (-> arg1 y)))
(set! (-> arg0 z) (* (-> arg1 z) (-> arg1 z)))
arg0
)
(defstate hostile (flamer-lava)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy hostile) enter)))
(if t9-0
(t9-0)
)
)
(flamer-lava-method-202 self)
(set! (-> self ground-mode) 0)
(set! (-> self flit-timer) (+ (current-time) (seconds -3)))
)
:trans (behavior ()
(let ((a0-1 (handle->process (-> self focus handle))))
(when (or (not a0-1)
(and a0-1
(< 491520.0 (vector-vector-distance (-> self idle-pos) (get-trans (the-as process-focusable a0-1) 0)))
(not (flamer-lava-method-196 self))
)
)
(if (logtest? (enemy-option ambush) (-> self fact enemy-options))
(go-virtual exit-ambush)
(go-virtual active)
)
)
)
(let ((gp-1 (get-focus! self)))
(if (and gp-1
(time-elapsed? (-> self last-fire-time) (the int (* 300.0 (rand-vu-float-range 3.0 6.0))))
(< (vector-vector-distance (get-trans gp-1 3) (-> self root trans)) 245760.0)
)
(go-virtual attack)
)
)
)
:code flamer-lava-fly-code
:post (behavior ()
(flamer-lava-method-200 self)
(flamer-lava-flit-post)
)
)
(defstate attack (flamer-lava)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('event-attack)
(let ((gp-0 (handle->process (-> self focus handle))))
(when gp-0
(let ((s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node flamer-lava-lod0-jg tailF))))
(let ((a2-1 (get-trans (the-as process-focusable gp-0) 3))
(gp-1 (new 'stack-no-clear 'vector))
)
(setup-from-to-xz-vel! (-> self shot-trajectory) s5-0 a2-1 122880.0 -102400.0)
(set! (-> gp-1 quad) (-> self shot-trajectory initial-velocity quad))
(vector-normalize! gp-1 1638.4)
(vector+! s5-0 s5-0 gp-1)
)
(let ((gp-2 (new 'stack-no-clear 'projectile-init-by-other-params)))
(set! (-> gp-2 ent) (-> self entity))
(set! (-> gp-2 charge) 1.0)
(set! (-> gp-2 options) (projectile-options))
(logclear! (-> gp-2 options) (projectile-options po14 po15 po16))
(set! (-> gp-2 pos quad) (-> s5-0 quad))
(set! (-> gp-2 vel quad) (-> self shot-trajectory initial-velocity quad))
(set! (-> gp-2 notify-handle) (process->handle self))
(set! (-> gp-2 owner-handle) (the-as handle #f))
(set! (-> gp-2 target-handle) (the-as handle #f))
(set! (-> gp-2 target-pos quad) (the-as uint128 0))
(set! (-> gp-2 ignore-handle) (process->handle self))
(let* ((v1-24 *game-info*)
(a0-25 (+ (-> v1-24 attack-id) 1))
)
(set! (-> v1-24 attack-id) a0-25)
(set! (-> gp-2 attack-id) a0-25)
)
(set! (-> gp-2 timeout) (seconds 4))
(sound-play "gren-launch")
(spawn-projectile metalhead-grenade-shot gp-2 self *default-dead-pool*)
)
)
)
)
)
(else
(enemy-event-handler proc argc message block)
)
)
)
:enter (behavior ()
(set-time! (-> self state-time))
)
:code (behavior ()
(ja-channel-push! 1 (seconds 0.1))
(cond
((zero? (rand-vu-int-range 0 2))
(ja-no-eval :group! flamer-lava-shoot1-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
)
(else
(ja-no-eval :group! flamer-lava-shoot-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
)
)
)
(set-time! (-> self last-fire-time))
(go-virtual hostile)
)
:post flamer-lava-attack-post
)
(defmethod enemy-method-50 ((this flamer-lava) (arg0 int))
(let ((v1-0 arg0))
(cond
((= v1-0 1)
(let ((v1-2 (-> this root root-prim)))
(let ((a0-1 v1-2))
(set! (-> a0-1 prim-core action) (collide-action solid deadly))
(set! (-> a0-1 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list))
)
(let ((a0-2 (-> (the-as collide-shape-prim-group v1-2) child 0)))
(set! (-> a0-2 prim-core action) (collide-action solid deadly))
(set! (-> a0-2 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list))
)
)
)
((or (= v1-0 2) (zero? v1-0))
(let ((v1-8 (-> this root root-prim)))
(let ((a0-3 v1-8))
(set! (-> a0-3 prim-core action) (collide-action semi-solid deadly))
(set! (-> a0-3 prim-core collide-with) (collide-spec jak bot player-list))
)
(let ((a0-4 (-> (the-as collide-shape-prim-group v1-8) child 0)))
(set! (-> a0-4 prim-core action) (collide-action semi-solid deadly))
(set! (-> a0-4 prim-core collide-with) (collide-spec jak bot player-list))
)
)
)
)
)
0
(none)
)
;; WARN: Return type mismatch object vs symbol.
(defmethod knocked-anim ((this flamer-lava) (arg0 enemy-knocked-info))
(let ((v1-0 (-> this incoming knocked-type)))
(the-as
symbol
(cond
((= v1-0 (knocked-type blue-shot))
(let* ((a0-2 '((flamer-lava-blue-hit0-ja) (flamer-lava-blue-hit1-ja) (flamer-lava-blue-hit2-ja)))
(a1-3 ((method-of-type (rtype-of a0-2) length) a0-2))
(s4-0 (new 'static 'array int64 3 18 19 20))
(s3-0 (new 'static 'array int32 4 0 0 0 0))
(a2-0 (ash 1 (-> s3-0 0)))
(v1-6 (enemy-method-131 this a1-3 a2-0))
(s4-1 (-> this draw art-group data (-> (the-as (pointer int32) (+ (* v1-6 8) (the-as int s4-0))))))
)
(set! (-> s3-0 0) v1-6)
(let ((v1-9 (if (> (-> this skel active-channels) 0)
(-> this skel root-channel 0 frame-group)
)
)
)
(if (and v1-9 (= v1-9 (-> this draw art-group data 16)))
(ja-channel-push! 1 (seconds 0.17))
(ja-channel-push! 1 (seconds 0.02))
)
)
(let ((a0-17 (-> this skel root-channel 0)))
(set! (-> a0-17 frame-group) (the-as art-joint-anim s4-1))
(set! (-> a0-17 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1)))
(set! (-> a0-17 param 1) (-> arg0 anim-speed))
(set! (-> a0-17 frame-num) 0.0)
(joint-control-channel-group! a0-17 (the-as art-joint-anim s4-1) num-func-seek!)
)
)
)
(else
(ja-channel-push! 1 (seconds 0.1))
(let ((a1-10 (-> this draw art-group data (-> this enemy-info knocked-anim)))
(a0-21 (-> this skel root-channel 0))
)
(set! (-> a0-21 frame-group) (the-as art-joint-anim a1-10))
(set! (-> a0-21 param 0) (the float (+ (-> (the-as art-joint-anim a1-10) frames num-frames) -1)))
(set! (-> a0-21 param 1) (-> arg0 anim-speed))
(set! (-> a0-21 frame-num) 0.0)
(joint-control-channel-group! a0-21 (the-as art-joint-anim a1-10) num-func-seek!)
)
#t
)
)
)
)
)
(defstate knocked (flamer-lava)
:virtual #t
:enter (behavior ()
(let ((t9-0 (-> (method-of-type nav-enemy knocked) enter)))
(if t9-0
(t9-0)
)
)
(set-gravity-length (-> self root dynam) 368640.0)
(set! (-> self hit-surface?) #f)
)
:trans (behavior ()
(local-vars (v1-32 enemy-flag) (v1-34 enemy-flag) (v1-36 enemy-flag))
(let ((gp-0 (-> self root)))
(when (logtest? (-> gp-0 status) (collide-status on-surface))
(when (not (-> self hit-surface?))
(set! (-> self hit-surface?) #t)
(set! (-> self surface-normal quad) (-> gp-0 poly-normal quad))
)
)
(when (and (-> self hit-surface?) (= (-> self hit-points) 0.0))
(let ((s4-0 (new 'stack-no-clear 'quaternion)))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(vector-z-quaternion! s5-0 (-> gp-0 quat))
(forward-up->quaternion s4-0 s5-0 (-> self surface-normal))
)
(quaternion-slerp! (-> gp-0 quat) (-> gp-0 quat) s4-0 0.25)
)
)
(when (and (!= (-> self hit-points) 0.0)
(and (zero? (-> self fated-time))
(or (time-elapsed? (-> self state-time) (seconds 0.5))
(and (< (-> self root trans y) (+ 22528.0 (-> self root gspot-pos y))) (< (-> self root transv y) 0.0))
)
)
)
(set-gravity-length (-> gp-0 dynam) 225280.0)
(vector-reset! (-> gp-0 transv))
(if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup))
(logior! (-> self focus-status) (focus-status dangerous))
(logclear! (-> self focus-status) (focus-status dangerous))
)
(let ((v1-31 (-> self enemy-flags)))
(if (logtest? v1-31 (enemy-flag vulnerable-backup))
(set! v1-32 (logior v1-31 (enemy-flag vulnerable)))
(set! v1-32 (logclear v1-31 (enemy-flag vulnerable)))
)
)
(set! (-> self enemy-flags) v1-32)
(let ((v1-33 (-> self enemy-flags)))
(if (logtest? v1-33 (enemy-flag attackable-backup))
(set! v1-34 (logior v1-33 (enemy-flag attackable)))
(set! v1-34 (logclear v1-33 (enemy-flag attackable)))
)
)
(set! (-> self enemy-flags) v1-34)
(let ((v1-35 (-> self enemy-flags)))
(if (logtest? (enemy-flag trackable-backup) v1-35)
(set! v1-36 (logior (enemy-flag trackable) v1-35))
(set! v1-36 (logclear v1-35 (enemy-flag trackable)))
)
)
(set! (-> self enemy-flags) v1-36)
(logclear! (-> self enemy-flags) (enemy-flag lock-focus))
(logclear! (-> self focus-status) (focus-status hit))
(go-hostile self)
)
)
)
:post (behavior ()
(seek! (-> self sound-volume) 0.0 (* 0.5 (seconds-per-frame)))
(flamer-lava-method-200 self)
(let ((t9-2 (-> (method-of-type nav-enemy knocked) post)))
(if t9-2
((the-as (function none) t9-2))
)
)
)
)
(defstate die-falling (flamer-lava)
:virtual #t
:enter (behavior ()
(let ((v1-1 (-> self root root-prim)))
(set! (-> v1-1 prim-core collide-as) (collide-spec))
(set! (-> v1-1 prim-core collide-with) (collide-spec))
)
0
(set! (-> self hit-points) 0.0)
(if (logtest? (enemy-option knocked-into-water) (-> self fact enemy-options))
(logior! (-> self enemy-flags) (enemy-flag check-water))
)
(let ((v1-8 self))
(set! (-> v1-8 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-8 enemy-flags))))
)
0
(let ((v1-10 self))
(set! (-> v1-10 enemy-flags) (the-as enemy-flag (logclear (-> v1-10 enemy-flags) (enemy-flag ef37))))
(set! (-> v1-10 nav callback-info) *null-nav-callback-info*)
)
0
(nav-enemy-method-178 self)
)
)
(defmethod on-dying ((this flamer-lava))
(let ((s5-1 (logtest? (enemy-flag called-dying) (-> this enemy-flags))))
(let ((t9-0 (method-of-type nav-enemy on-dying)))
(t9-0 this)
)
(if (not s5-1)
(flamer-lava-method-203 this)
)
)
(none)
)
(defmethod flamer-lava-method-199 ((this flamer-lava) (arg0 float))
(let ((f0-1 (* (-> this scale) arg0))
(v0-0 (-> this root scale))
)
(set! (-> v0-0 x) f0-1)
(set! (-> v0-0 y) f0-1)
(set! (-> v0-0 z) f0-1)
(set! (-> v0-0 w) 1.0)
v0-0
)
)
(defmethod coin-flip? ((this flamer-lava))
#f
)
(defmethod init-enemy-collision! ((this flamer-lava))
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) cshape-reaction-default)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-query vector vector object) nothing)
)
(set! (-> s5-0 penetrated-by) (penetrate
generic-attack
lunge
flop
punch
spin
roll
uppercut
bonk
tube
flut-attack
board
mech-punch
dark-punch
dark-smack
flut
)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 4) 0)))
(set! (-> s5-0 total-prims) (the-as uint 5))
(set! (-> s4-0 prim-core collide-as) (collide-spec enemy))
(set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list))
(set! (-> s4-0 prim-core action) (collide-action semi-solid deadly))
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 26624.0)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-14 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-14 prim-core action) (collide-action semi-solid deadly))
(set! (-> v1-14 transform-index) 3)
(set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 3481.6)
)
(let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-16 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-16 prim-core action) (collide-action semi-solid deadly))
(set! (-> v1-16 transform-index) 19)
(set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 3072.0)
)
(let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-18 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-18 prim-core action) (collide-action deadly))
(set! (-> v1-18 transform-index) 6)
(set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 3072.0)
)
(let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-20 prim-core collide-as) (collide-spec enemy))
(set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list))
(set! (-> v1-20 prim-core action) (collide-action deadly))
(set! (-> v1-20 transform-index) 9)
(set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 3072.0)
)
(set! (-> s5-0 nav-radius) 6144.0)
(let ((v1-22 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-22 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-22 prim-core collide-with))
)
(set! (-> s5-0 max-iteration-count) (the-as uint 3))
(set! (-> this root) s5-0)
)
0
(none)
)
(defmethod relocate ((this flamer-lava) (offset int))
(call-parent-method this offset)
)
(defmethod init-enemy! ((this flamer-lava))
(initialize-skeleton
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-flamer-lava" (the-as (pointer level) #f)))
(the-as pair 0)
)
(init-enemy-defaults! this *flamer-lava-nav-enemy-info*)
(set! (-> this neck up) (the-as uint 1))
(set! (-> this neck nose) (the-as uint 2))
(set! (-> this neck ear) (the-as uint 0))
(set! (-> this scale) 1.6)
(flamer-lava-method-199 this 1.0)
(logclear! (-> this nav flags) (nav-control-flag limit-rotation-rate))
(set! (-> this sync-off) (the-as uint (rnd-int this 600)))
(set! (-> this flit-angle) 0.0)
(set! (-> this flit-timer) 0)
(set! (-> this root dynam gravity y) 225280.0)
(set! (-> this root dynam gravity-length) 225280.0)
(set! (-> this root dynam gravity-max) 225280.0)
(let ((v1-25 (-> this root trans)))
(set! (-> this base-pos quad) (-> v1-25 quad))
(+! (-> v1-25 y) 26624.0)
(set! (-> this idle-pos quad) (-> v1-25 quad))
)
(init (-> this flit-joint) this (the-as uint 3) (joint-mod-base-flags attached trans))
(let ((f0-7 (res-lump-float (-> this entity) 'rotoffset)))
(if (!= f0-7 0.0)
(quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-7)
)
)
(let ((f0-8 (quaternion-y-angle (-> this root quat))))
(matrix-rotate-y! (-> this zone-to-world) f0-8)
)
(set! (-> this zone-to-world trans quad) (-> this root trans quad))
(matrix-inverse-of-rot-trans! (-> this world-to-zone) (-> this zone-to-world))
(set! (-> this formation-entity) (entity-actor-lookup (-> this entity) 'alt-actor 0))
(let ((s5-1 (-> this offset))
(t9-12 (method-of-type res-lump get-property-struct))
(a0-24 (-> this entity))
(a1-13 'trans-offset)
(a2-6 'interp)
(a3-2 -1000000000.0)
(t0-1 (new 'stack-no-clear 'vector))
)
(set! (-> t0-1 x) 0.0)
(set! (-> t0-1 y) 0.0)
(set! (-> t0-1 z) 94208.0)
(set! (-> t0-1 w) 1.0)
(set! (-> s5-1 quad)
(-> (the-as vector (t9-12 a0-24 a1-13 a2-6 a3-2 t0-1 (the-as (pointer res-tag) #f) *res-static-buf*)) quad)
)
)
(set! (-> this path) (new 'process 'curve-control this 'intro -1000000000.0))
(set! (-> this path-pos) 0.0)
(logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text))
(set! (-> this sound)
(new 'process 'ambient-sound (static-sound-spec "flamer-loop" :group 0 :fo-max 80) (-> this root trans) 0.0)
)
(logior! (-> this enemy-flags) (enemy-flag dislike-combo))
(let ((v1-49 (-> this nav)))
(set! (-> v1-49 sphere-mask) (the-as uint 0))
)
0
(let ((v1-51 (-> this nav)))
(set! (-> v1-51 nearest-y-threshold) 67584.0)
)
0
(quaternion-copy! (-> this init-quat) (-> this root quat))
(add-connection
*part-engine*
this
19
this
468
(new 'static 'vector :x 819.2 :y -1187.84 :z 2088.96 :w 163840.0)
)
(add-connection
*part-engine*
this
19
this
468
(new 'static 'vector :x -819.2 :y -1187.84 :z 2088.96 :w 163840.0)
)
(add-connection *part-engine* this 9 this 4638 (new 'static 'vector :w 163840.0))
0
(none)
)
;; WARN: Return type mismatch int vs object.
(defmethod go-idle2 ((this flamer-lava))
(if (-> this formation-entity)
(go (method-of-object this wait-for-formation))
(go (method-of-object this idle))
)
0
)
(deftype flaming-lava (flamer-lava)
()
)