;;-*-Lisp-*- (in-package goal) ;; failed to figure out what this is: (defpart 605 :init-specs ((:texture (common-white common)) (:num 10.0 1.0) (:x (meters 0)) (:y (meters 0)) (:z (meters 0)) (:scale-x (meters 1)) (:rot-x (degrees 90)) (:rot-y (degrees 0)) (:rot-z (degrees 0)) (:scale-y (meters 0.1)) (:r 255.0) (:g 255.0) (:b 255.0) (:a 64.0 32.0) (:accel-y (meters -0.00033333333) (meters -0.001)) (:timer (seconds 0.017)) (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) ) ) ;; failed to figure out what this is: (defpart 606 :init-specs ((:texture (gun-yellow-beam effects)) (:birth-func 'birth-func-set-quat) (:num 1.0) (:scale-x (meters 0.25)) (:scale-y (meters 9)) (:r 128.0) (:g 0.0 64.0) (:b 0.0) (:a 128.0) (:scalevel-x (meters 0.0016666667)) (:fade-a -2.1333334) (:timer (seconds 0.135)) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) ) ) ;; failed to figure out what this is: (defpart 607 :init-specs ((:texture (glow-soft effects)) (:num 1.0) (:scale-x (meters 1)) (:rot-z (degrees 0) (degrees 360)) (:scale-y :copy scale-x) (:r 128.0) (:g 0.0 32.0) (:b 0.0) (:a 64.0) (:scalevel-x (meters -0.016666668)) (:scalevel-y :copy scalevel-x) (:fade-a -1.6) (:timer (seconds 0.085)) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) ) ) ;; failed to figure out what this is: (defpart 608 :init-specs ((:texture (bigstarflash effects)) (:num 0.0) (:scale-x (meters 0.3) (meters 0.3)) (:rot-z (degrees 0) (degrees 360)) (:scale-y :copy scale-x) (:r 128.0) (:g 128.0) (:b 128.0) (:a 64.0 32.0) (:timer (seconds 0.017)) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) ) ) ;; failed to figure out what this is: (defpart 609 :init-specs ((:texture (metalhead-gun-part effects)) (:num 8.0 8.0) (:z (meters 0) (meters -3)) (:scale-x (meters 0.4) (meters 0.4)) (:scale-y (meters 0.4) (meters 0.4)) (:r 192.0) (:g 64.0 128.0) (:b 0.0) (:a 64.0) (:scalevel-x (meters -0.00234375)) (:scalevel-y :copy scalevel-x) (:fade-g -1.2 -2.4) (:fade-a -0.53333336 -2.1333334) (:accel-y (meters -0.00016666666) (meters -0.00016666666)) (:timer (seconds 0.8)) (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) (:rotate-y (degrees 0)) ) ) ;; failed to figure out what this is: (defpart 610 :init-specs ((:texture (gun-enemy-muzzleflash effects)) (:birth-func 'birth-func-set-quat) (:num 1.0) (:scale-x (meters 2)) (:scale-y (meters 4.5)) (:r 128.0) (:g 0.0 128.0) (:b 0.0) (:a 128.0) (:fade-a -3.6571429) (:timer (seconds 0.117)) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) ) ) ;; failed to figure out what this is: (defpart 611 :init-specs ((:texture (glow effects)) (:num 1.0) (:scale-x (meters 1) (meters 1)) (:rot-x (degrees 4.5)) (:rot-z (degrees 0) (degrees 3600)) (:scale-y :copy scale-x) (:r 128.0) (:g 128.0) (:b 0.0) (:a 255.0) (:omega (degrees 4515.75)) (:scalevel-x (meters 0.053333335)) (:scalevel-y :copy scalevel-x) (:fade-g -3.6571429) (:fade-a -7.285714) (:timer (seconds 0.117)) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) (:userdata 1024.0) ) ) ;; failed to figure out what this is: (defpartgroup group-guard-shot-hit-object :id 136 :duration (seconds 1) :flags (use-local-clock) :bounds (static-bspherem 0 0 0 8) :parts ((sp-item 612 :flags (bit6) :period (seconds 2) :length (seconds 0.017)) (sp-item 613 :flags (bit6) :period (seconds 2) :length (seconds 0.017)) (sp-item 614 :flags (bit6) :period (seconds 2) :length (seconds 0.017)) ) ) ;; failed to figure out what this is: (defpartgroup group-guard-shot-hit :id 137 :duration (seconds 1) :flags (use-local-clock) :bounds (static-bspherem 0 0 0 8) :parts ((sp-item 612 :flags (bit6) :period (seconds 2) :length (seconds 0.017)) (sp-item 613 :flags (bit6) :period (seconds 2) :length (seconds 0.017)) (sp-item 614 :flags (bit6) :period (seconds 2) :length (seconds 0.017)) (sp-item 615 :period (seconds 2) :length (seconds 0.017)) ) ) ;; failed to figure out what this is: (defpart 614 :init-specs ((:texture (explosion-nebula effects)) (:num 1.0) (:scale-x (meters 2)) (:rot-x (degrees 1.125)) (:rot-z (degrees 0) (degrees 3600)) (:scale-y :copy scale-x) (:r 255.0) (:g 0.0 128.0) (:b 0.0) (:a 64.0) (:scalevel-x (meters 0.075)) (:scalevel-y :copy scalevel-x) (:fade-a -1.8285714) (:timer (seconds 0.135)) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) (:userdata 8192.0) ) ) ;; failed to figure out what this is: (defpart 615 :init-specs ((:texture (bigpuff effects)) (:num 8.0 8.0) (:scale-x (meters 0.75) (meters 0.5)) (:rot-z (degrees 0) (degrees 3600)) (:scale-y :copy scale-x) (:r 255.0) (:g 0.0 128.0) (:b 0.0) (:a 16.0 48.0) (:vel-y (meters 0.026666667) (meters 0.026666667)) (:scalevel-x (meters 0.0016666667) (meters 0.006666667)) (:rotvel-z (degrees -0.2) (degrees 0.4)) (:scalevel-y :copy scalevel-x) (:fade-r -0.30476192) (:fade-g 0.15238096) (:fade-b 0.30476192) (:fade-a -0.15238096) (:accel-y (meters -0.00016666666) (meters -0.00016666666)) (:friction 0.9) (:timer (seconds 1.4)) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) (:conerot-x (degrees 0) (degrees 3600)) (:conerot-y (degrees 0) (degrees 3600)) ) ) ;; failed to figure out what this is: (defpart 613 :init-specs ((:texture (glow effects)) (:num 2.0) (:scale-x (meters 2)) (:rot-x (degrees 4.5)) (:rot-z (degrees 0) (degrees 360)) (:scale-y :copy scale-x) (:r 255.0) (:g 128.0 64.0) (:b 0.0 32.0) (:a 48.0) (:scalevel-x (meters 0.125)) (:rotvel-z (degrees -0.3) (degrees 0.6)) (:scalevel-y :copy scalevel-x) (:fade-g -2.1333334) (:fade-b -2.1333334) (:timer (seconds 0.267)) (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) (:userdata 0.0) (:next-time (seconds 0.067)) (:next-launcher 616) ) ) ;; failed to figure out what this is: (defpart 616 :init-specs ((:scale-x (meters 4.5)) (:scale-y :copy scale-x) (:scalevel-x (meters -0.05)) (:scalevel-y :copy scalevel-x) (:fade-g -0.53333336) (:fade-a -0.8) ) ) ;; failed to figure out what this is: (defpart 612 :init-specs ((:texture (glow effects)) (:num 1.0) (:scale-x (meters 1)) (:rot-z (degrees 0) (degrees 360)) (:scale-y :copy scale-x) (:r 255.0) (:g 255.0) (:b 255.0) (:a 96.0) (:scalevel-x (meters 0.1)) (:rotvel-z (degrees 0.3)) (:scalevel-y :copy scalevel-x) (:timer (seconds 0.185)) (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) (:next-time (seconds 0.05)) (:next-launcher 617) ) ) ;; failed to figure out what this is: (defpart 617 :init-specs ((:scale-x (meters 3.5)) (:scale-y :copy scale-x) (:scalevel-x (meters -0.0625)) (:scalevel-y :copy scalevel-x) (:fade-b -6.4) ) ) ;; failed to figure out what this is: (defpartgroup group-guard-grenade :id 138 :duration (seconds 0.5) :flags (use-local-clock) :bounds (static-bspherem 0 0 0 2) :parts ((sp-item 618 :fade-after (meters 200) :falloff-to (meters 200))) ) ;; failed to figure out what this is: (defpart 618 :init-specs ((:texture (bigpuff effects)) (:num 1.0) (:scale-x (meters 0.5) (meters 0.25)) (:rot-z (degrees 0) (degrees 3600)) (:scale-y :copy scale-x) (:r 64.0 128.0) (:g :copy r) (:b :copy g) (:a 16.0 32.0) (:vel-y (meters 0) (meters 0.016666668)) (:scalevel-x (meters 0.006666667) (meters 0.013333334)) (:rotvel-z (degrees -0.2) (degrees 0.4)) (:scalevel-y :copy scalevel-x) (:fade-a -0.16 -0.16) (:friction 0.96) (:timer (seconds 1)) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12)) (:conerot-x (degrees 0) (degrees 3600)) (:conerot-y (degrees 0) (degrees 3600)) (:conerot-radius (meters 0)) ) ) ;; failed to figure out what this is: (defpartgroup group-guard-shot-die :id 139 :duration (seconds 0.017) :flags (use-local-clock) :bounds (static-bspherem 0 0 0 8) :parts ((sp-item 209)) ) ;; definition of type guard-shot (deftype guard-shot (projectile) ((hit-actor? symbol) (tail-pos vector :inline) ) ) ;; definition for method 3 of type guard-shot (defmethod inspect ((this guard-shot)) (when (not this) (set! this this) (goto cfg-4) ) (let ((t9-0 (method-of-type projectile inspect))) (t9-0 this) ) (format #t "~2Thit-actor?: ~A~%" (-> this hit-actor?)) (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) (label cfg-4) this ) ;; definition for method 37 of type guard-shot (defmethod deal-damage! ((this guard-shot) (arg0 process) (arg1 event-message-block)) "Constructs an [[attack-info]] according to the projectile's `options`" (let ((t9-0 (method-of-type projectile deal-damage!))) (when (t9-0 this arg0 arg1) (set! (-> this hit-actor?) #t) #t ) ) ) ;; definition for method 24 of type guard-shot ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defmethod draw-laser-sight ((this guard-shot)) "TODO - confirm If applicable, draw the laser sight particles" (draw-beam (-> *part-id-table* 610) (-> this tail-pos) (-> this starting-dir) #f #t) (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) (t9-2 sp-launch-particles-var) (a0-4 *sp-particle-system-2d*) (a1-4 (-> *part-id-table* 611)) (a2-2 *launch-matrix*) ) (set! (-> a2-2 trans quad) (-> v1-2 quad)) (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) ) 0 (none) ) ;; definition for method 25 of type guard-shot ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defmethod spawn-impact-particles ((this guard-shot)) "Spawns associated particles with the projectile if applicable" (rlet ((acc :class vf) (vf0 :class vf) (vf4 :class vf) (vf5 :class vf) (vf6 :class vf) (vf7 :class vf) ) (init-vf0-vector) (let* ((gp-0 (-> this root trans)) (a1-0 (-> this tail-pos)) (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) (f30-0 (vector-length s5-1)) ) (let ((s4-0 (new 'stack-no-clear 'vector))) (let ((v1-4 a1-0)) (let ((a0-2 s5-1)) (let ((a2-1 0.8)) (.mov vf7 a2-1) ) (.lvf vf5 (&-> a0-2 quad)) ) (.lvf vf4 (&-> v1-4 quad)) ) (.add.x.vf.w vf6 vf0 vf0) (.mul.x.vf.xyz acc vf5 vf7) (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 606 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 606 init-specs 4 initial-valuef) (vector-length s5-1)) (draw-beam (-> *part-id-table* 606) a1-0 s5-1 #f #t) (set! (-> *part-id-table* 606 init-specs 4 initial-valuef) f28-0) ) (vector-normalize! s5-1 1.0) (launch-particles (-> *part-id-table* 607) s4-0) (launch-particles (-> *part-id-table* 608) s4-0) ) (let ((s4-1 (new 'stack-no-clear 'matrix)) (f26-0 (/ f30-0 (meters 9))) (f30-1 (-> *part-id-table* 609 init-specs 3 initial-valuef)) (f28-1 (-> *part-id-table* 609 init-specs 4 initial-valuef)) ) (forward-up->inv-matrix s4-1 s5-1 *up-vector*) (set! (-> s4-1 trans quad) (-> gp-0 quad)) (set! (-> *part-id-table* 609 init-specs 3 initial-valuef) (* f26-0 f30-1)) (set! (-> *part-id-table* 609 init-specs 4 initial-valuef) (* f26-0 f28-1)) (launch-particles (-> *part-id-table* 609) s4-1 :origin-is-matrix #t) (set! (-> *part-id-table* 609 init-specs 3 initial-valuef) f30-1) (set! (-> *part-id-table* 609 init-specs 4 initial-valuef) f28-1) ) ) 0 (none) ) ) ;; definition for method 26 of type guard-shot ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defmethod spawn-shell-particles ((this guard-shot)) "TODO - confirm" (let* ((s4-0 (-> this root)) (v1-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> s4-0 trans)) 2048.0)) (gp-0 (new 'stack-no-clear 'vector)) ) (set! (-> gp-0 quad) (-> s4-0 trans quad)) (vector+! gp-0 gp-0 v1-1) (if (-> this hit-actor?) (part-tracker-spawn :to *entity-pool* :group group-guard-shot-hit-object :mat-joint gp-0) (part-tracker-spawn :to *entity-pool* :group group-guard-shot-hit :mat-joint gp-0) ) ) 0 (none) ) ;; definition for method 28 of type guard-shot ;; WARN: Return type mismatch int vs none. (defmethod play-impact-sound ((this guard-shot) (arg0 projectile-options)) (let ((v1-0 arg0)) (cond ((zero? v1-0) (sound-play "guard-shot-fire") ) ((= v1-0 (projectile-options lose-altitude)) (sound-play "guard-shot-hit") ) ) ) 0 (none) ) ;; failed to figure out what this is: (defstate impact (guard-shot) :virtual #t :enter (behavior () (let ((t9-0 (-> (method-of-type projectile impact) enter))) (if t9-0 (t9-0) ) ) (when *traffic-manager* (let ((v1-5 (new 'stack-no-clear 'traffic-danger-info))) (set! (-> v1-5 sphere quad) (-> self root trans quad)) (set! (-> v1-5 sphere r) 40960.0) (set! (-> v1-5 velocity quad) (-> self root transv quad)) (set! (-> v1-5 notify-radius) 122880.0) (set! (-> v1-5 danger-level) 1.0) (set! (-> v1-5 decay-rate) 0.0) (set! (-> v1-5 flags) (traffic-danger-flags tdf0)) (set! (-> v1-5 danger-type) (traffic-danger-type tdt0)) (set! (-> v1-5 handle) (the-as handle #f)) (send-event *traffic-manager* 'add-danger-sphere v1-5) ) ) ) ) ;; definition for function guard-shot-move ;; WARN: Return type mismatch int vs none. (defun guard-shot-move ((arg0 guard-shot)) (projectile-move-fill-line-sphere arg0) (let ((s5-0 (-> arg0 root))) (let ((s4-0 (new 'stack-no-clear 'vector))) (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) (let ((f0-0 (vector-length s4-0))) (when (< 36864.0 f0-0) (vector-normalize! s4-0 36864.0) (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) ) ) ) (when (logtest? (-> s5-0 status) (collide-status touch-surface)) (if (logtest? (-> arg0 root status) (collide-status touch-actor)) (set! (-> arg0 hit-actor?) #t) ) (go (method-of-object arg0 impact)) ) ) 0 (none) ) ;; definition for method 38 of type guard-shot (defmethod made-impact? ((this guard-shot)) "TODO - queries the collision cache, return true/false" (let ((v1-0 (-> this root)) (t1-0 (new 'stack-no-clear 'collide-query)) ) (let ((a0-1 t1-0)) (set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w)) (set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with)) (set! (-> a0-1 ignore-process0) this) (set! (-> a0-1 ignore-process1) (ppointer->process (-> this parent))) (set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask)) (set! (-> a0-1 action-mask) (collide-action solid)) ) (when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0) (if (logtest? (-> this root status) (collide-status touch-actor)) (set! (-> this hit-actor?) #t) ) #t ) ) ) ;; definition for method 30 of type guard-shot ;; WARN: Return type mismatch int vs none. (defmethod init-proj-collision! ((this guard-shot)) "Init the [[projectile]]'s [[collide-shape]]" (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s5-0 reaction) (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) ) (set! (-> s5-0 no-reaction) (the-as (function collide-shape-moving collide-query vector vector object) nothing) ) (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) (set! (-> s5-0 total-prims) (the-as uint 3)) (set! (-> s4-0 prim-core collide-as) (collide-spec projectile)) (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list) ) (set! (-> s4-0 prim-core action) (collide-action solid)) (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) (set! (-> s5-0 root-prim) s4-0) ) (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) (set! (-> v1-13 prim-core collide-with) (collide-spec backgnd jak bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list) ) (set! (-> v1-13 prim-core action) (collide-action solid deadly)) (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) ) (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot crate civilian enemy vehicle-sphere hit-by-others-list player-list) ) (set! (-> v1-15 prim-core action) (collide-action deadly)) (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) ) (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) (let ((v1-18 (-> s5-0 root-prim))) (set! (-> s5-0 backup-collide-as) (-> v1-18 prim-core collide-as)) (set! (-> s5-0 backup-collide-with) (-> v1-18 prim-core collide-with)) ) (set! (-> s5-0 max-iteration-count) (the-as uint 1)) (set! (-> s5-0 event-self) 'touched) (set! (-> this root) s5-0) ) (set! (-> this root pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1) ) 0 (none) ) ;; definition for method 31 of type guard-shot ;; INFO: Used lq/sq (defmethod init-proj-settings! ((this guard-shot)) "Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc" (set! (-> this hit-actor?) #f) (set! (-> this tail-pos quad) (-> this root trans quad)) (set! (-> this attack-mode) 'guard-shot) (set! (-> this max-speed) 819200.0) (set! (-> this move) guard-shot-move) (set! (-> this update-velocity) projectile-update-velocity-space-wars) (set! (-> this timeout) (seconds 0.5)) (logior! (-> this options) (projectile-options account-for-target-velocity)) (set-gravity-length (-> this root dynam) 573440.0) (none) ) ;; definition of type vehicle-grenade (deftype vehicle-grenade (projectile-bounce) ((blast-radius float) ) ) ;; definition for method 3 of type vehicle-grenade (defmethod inspect ((this vehicle-grenade)) (when (not this) (set! this this) (goto cfg-4) ) (let ((t9-0 (method-of-type projectile-bounce inspect))) (t9-0 this) ) (format #t "~2Tblast-radius: ~f~%" (-> this blast-radius)) (label cfg-4) this ) ;; failed to figure out what this is: (defskelgroup skel-vehicle-grenade eco-canister eco-canister-dark-lod0-jg eco-canister-dark-idle-ja ((eco-canister-dark-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 0.3) :texture-level 6 ) ;; definition for method 28 of type vehicle-grenade ;; WARN: Return type mismatch int vs none. (defmethod play-impact-sound ((this vehicle-grenade) (arg0 projectile-options)) (let ((v1-0 arg0)) (cond ((zero? v1-0) (sound-play "grenade-fire") ) ((= v1-0 (projectile-options lose-altitude)) (sound-play "grenade-explode") ) ) ) 0 (none) ) ;; definition for method 30 of type vehicle-grenade ;; WARN: Return type mismatch int vs none. (defmethod init-proj-collision! ((this vehicle-grenade)) "Init the [[projectile]]'s [[collide-shape]]" (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) (set! (-> s5-0 reaction) projectile-bounce-reaction) (set! (-> s5-0 no-reaction) (the-as (function collide-shape-moving collide-query vector vector object) nothing) ) (set! (-> s5-0 penetrate-using) (penetrate explode)) (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) (set! (-> v1-7 prim-core action) (collide-action solid)) (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 819.2) (set! (-> s5-0 total-prims) (the-as uint 1)) (set! (-> s5-0 root-prim) v1-7) ) (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) (let ((v1-10 (-> s5-0 root-prim))) (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) ) (set! (-> s5-0 max-iteration-count) (the-as uint 2)) (set! (-> s5-0 event-self) 'touched) (set! (-> this root) s5-0) ) (set-collide-with! (-> this root) (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) ) (set-collide-as! (-> this root) (collide-spec enemy)) (set! (-> this root pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1) ) (none) ) ;; definition for method 31 of type vehicle-grenade ;; WARN: Return type mismatch int vs none. (defmethod init-proj-settings! ((this vehicle-grenade)) "Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc" (set! (-> this attack-mode) 'eco-dark) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-vehicle-grenade" (the-as (pointer uint32) #f))) (the-as pair 0) ) (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) (t9-2 this) ) (set! (-> this part) (create-launch-control group-guard-grenade this)) (set! (-> this blast-radius) 16384.0) (set! (-> this max-speed) 90112.0) (set! (-> this timeout) (seconds 4)) 0 (none) ) ;; definition for method 25 of type vehicle-grenade ;; WARN: Return type mismatch int vs none. (defmethod spawn-impact-particles ((this vehicle-grenade)) "Spawns associated particles with the projectile if applicable" (spawn (-> this part) (-> this root trans)) (ja-post) 0 (none) ) ;; definition for method 41 of type vehicle-grenade ;; WARN: Return type mismatch int vs none. (defmethod noop ((this vehicle-grenade)) "Does nothing" (spawn (-> this part) (-> this root trans)) 0 (none) ) ;; definition for method 39 of type vehicle-grenade ;; WARN: Return type mismatch sound-id vs none. (defmethod play-impact-sound! ((this vehicle-grenade)) "Plays impact sound" (let* ((a2-0 (-> this root)) (v1-0 (-> a2-0 status)) ) (if (logtest? v1-0 (collide-status touch-surface)) (vector-float*! (-> a2-0 transv) (-> a2-0 transv) 0.2) ) (when (and (logtest? v1-0 (collide-status impact-surface)) (time-elapsed? (-> this played-bounce-time) (seconds 0.3)) ) (set-time! (-> this played-bounce-time)) (sound-play "grenade-bounce") ) ) (none) ) ;; failed to figure out what this is: (defstate impact (vehicle-grenade) :virtual #t :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) (case message (('touched) (if (send-event proc 'attack (-> block param 0) (static-attack-info ((id (-> self attack-id)) (mode 'explode)))) #t ) ) ) ) :code (behavior () (let ((gp-0 (new 'stack-no-clear 'explosion-init-params))) (set! (-> gp-0 spawn-point quad) (-> self root trans quad)) (quaternion-copy! (-> gp-0 spawn-quat) (-> self root quat)) (set! (-> gp-0 radius) (-> self blast-radius)) (set! (-> gp-0 group) group-gun-dark-shot-hit) (set! (-> gp-0 collide-with) (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) ) (set! (-> gp-0 penetrate-using) (penetrate explode)) (explosion-spawn self explosion gp-0) ) (logior! (-> self draw status) (draw-control-status no-draw)) (let ((v1-11 (-> self root root-prim))) (set! (-> v1-11 prim-core collide-as) (collide-spec)) (set! (-> v1-11 prim-core collide-with) (collide-spec)) ) 0 (while (-> self child) (suspend) ) (deactivate self) ) ) ;; failed to figure out what this is: (set! (-> *lightning-spec-id-table* 13) (new 'static 'lightning-spec :name "lightning-trail-crimson-guard" :flags (lightning-spec-flags lsf1) :rand-func #x2 :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) :fade-start-factor 0.2 :fade-time 120.0 :texture (new 'static 'texture-id :index #x83 :page #xc) :reduction 0.6 :num-points 16 :box-size 2048.0 :merge-factor 0.5 :merge-count 2 :radius 1638.4 :duration -1.0 :sound #f ) ) ;; failed to figure out what this is: (set! (-> *lightning-spec-id-table* 14) (new 'static 'lightning-spec :name "lightning-fractal-crimson-guard" :flags (lightning-spec-flags lsf1) :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) :fade-start-factor 0.2 :fade-time 120.0 :texture (new 'static 'texture-id :index #x83 :page #xc) :reduction 0.6 :num-points 16 :box-size 2048.0 :merge-factor 0.5 :merge-count 2 :radius 1638.4 :duration -1.0 :sound #f ) ) ;; failed to figure out what this is: (defpart 619 :init-specs ((:texture (glow effects)) (:num 1.0) (:scale-x (meters 0.8) (meters 0.2)) (:rot-x (degrees 2.25)) (:rot-z (degrees -17) (degrees 360)) (:scale-y :copy scale-x) (:r 32.0 96.0) (:g :copy r) (:b 255.0) (:a 32.0 16.0) (:omega (degrees 2265.75)) (:timer (seconds 0.017)) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) (:userdata 819.2) ) ) ;; failed to figure out what this is: (defpart 620 :init-specs ((:texture (glow effects)) (:num 1.0) (:scale-x (meters 2.5) (meters 1)) (:rot-x (degrees 2.25)) (:rot-z (degrees -17)) (:scale-y :copy scale-x) (:r 0.0 64.0) (:g :copy r) (:b 255.0) (:a 16.0 16.0) (:omega (degrees 2265.75)) (:timer (seconds 0.017)) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) (:userdata 819.2) ) ) ;; failed to figure out what this is: (defpartgroup part-crimson-lightning-glow :id 140 :duration (seconds 0.017) :linger-duration (seconds 0.035) :bounds (static-bspherem 0 0 0 4) :parts ((sp-item 620 :fade-after (meters 100) :flags (bit6)) (sp-item 619 :fade-after (meters 100) :flags (bit6))) ) ;; definition of type guard-lazer-shot (deftype guard-lazer-shot (projectile) () ) ;; definition for method 3 of type guard-lazer-shot (defmethod inspect ((this guard-lazer-shot)) (when (not this) (set! this this) (goto cfg-4) ) (let ((t9-0 (method-of-type projectile inspect))) (t9-0 this) ) (label cfg-4) this ) ;; failed to figure out what this is: (defstate dissipate (guard-lazer-shot) :virtual #t :enter (behavior () (go-virtual impact) ) ) ;; definition for method 38 of type guard-lazer-shot (defmethod made-impact? ((this guard-lazer-shot)) "TODO - queries the collision cache, return true/false" (let ((gp-0 (-> this root)) (s5-0 (new 'stack-no-clear 'collide-query)) ) (let ((v1-0 s5-0)) (set! (-> v1-0 radius) (-> gp-0 root-prim prim-core world-sphere w)) (set! (-> v1-0 collide-with) (-> gp-0 root-prim prim-core collide-with)) (set! (-> v1-0 ignore-process0) this) (set! (-> v1-0 ignore-process1) (ppointer->process (-> this parent))) (set! (-> v1-0 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1)) (set! (-> v1-0 action-mask) (collide-action solid)) ) (let ((a0-2 (handle->process (-> this notify-handle)))) (when a0-2 (let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 trans) (get-trans (the-as process-focusable a0-2) 3))) (f0-2 (- (vector-length s4-1))) ) (fill-and-try-snap-to-surface gp-0 s4-1 f0-2 0.0 -3072.0 s5-0) ) ) ) ) ) ;; definition for function guard-lazer-shot-move ;; WARN: Return type mismatch int vs none. (defun guard-lazer-shot-move ((arg0 guard-lazer-shot)) (projectile-move-fill-line-sphere arg0) (if (logtest? (-> arg0 root status) (collide-status touch-surface)) (go (method-of-object arg0 impact)) ) 0 (none) ) ;; definition for method 30 of type guard-lazer-shot ;; WARN: Return type mismatch int vs none. (defmethod init-proj-collision! ((this guard-lazer-shot)) "Init the [[projectile]]'s [[collide-shape]]" (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum 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 penetrate-using) (penetrate enemy-yellow-shot)) (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) (set! (-> v1-7 prim-core collide-as) (collide-spec projectile)) (set! (-> v1-7 prim-core collide-with) (collide-spec backgnd jak bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher ) ) (set! (-> v1-7 prim-core action) (collide-action solid)) (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 1228.8) (set! (-> s5-0 total-prims) (the-as uint 1)) (set! (-> s5-0 root-prim) v1-7) ) (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) (let ((v1-10 (-> s5-0 root-prim))) (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) ) (set! (-> s5-0 max-iteration-count) (the-as uint 1)) (set! (-> s5-0 event-self) 'touched) (set! (-> this root) s5-0) ) (set! (-> this root pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1) ) 0 (none) ) ;; definition for method 31 of type guard-lazer-shot ;; WARN: Return type mismatch int vs none. (defmethod init-proj-settings! ((this guard-lazer-shot)) "Init relevant settings for the [[projectile]] such as gravity, speed, timeout, etc" (set! (-> this attack-mode) 'shock) (set! (-> this max-speed) 131072.0) (set! (-> this timeout) (seconds 0.125)) (set! (-> this move) guard-lazer-shot-move) (set! (-> this root dynam gravity y) 0.0) (set! (-> this root dynam gravity-length) 0.0) (set! (-> this root dynam gravity-max) 0.0) 0 (none) )