mirror of
https://github.com/open-goal/jak-project
synced 2026-07-10 07:07:04 -04:00
637990314b
Closes #736 --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
1914 lines
83 KiB
Common Lisp
Vendored
Generated
1914 lines
83 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type sig5-course
|
|
(deftype sig5-course (bot-course)
|
|
((chase-speeches bot-speech-list-shuffle)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type sig5-course
|
|
(defmethod inspect ((this sig5-course))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" this (-> this type))
|
|
(format #t "~1Tcourse-id: ~D~%" (-> this course-id))
|
|
(format #t "~1Tspeech-count: ~D~%" (-> this speech-count))
|
|
(format #t "~1Tspot-count: ~D~%" (-> this spot-count))
|
|
(format #t "~1Tretry-cookie: ~D~%" (-> this retry-cookie))
|
|
(format #t "~1Ttoo-far-warn-speeches: ~A~%" (-> this too-far-warn-speeches))
|
|
(format #t "~1Ttoo-far-fail-speeches: ~A~%" (-> this too-far-fail-speeches))
|
|
(format #t "~1Tattack-player-speeches: ~A~%" (-> this attack-player-speeches))
|
|
(format #t "~1Tdefault-check-too-far: ~A~%" (-> this default-check-too-far))
|
|
(format #t "~1Twaypoints: ~A~%" (-> this waypoints))
|
|
(format #t "~1Tspeeches: #x~X~%" (-> this speeches))
|
|
(format #t "~1Tspeech-tunings: #x~X~%" (-> this speech-tunings))
|
|
(format #t "~1Tdirs: #x~X~%" (-> this dirs))
|
|
(format #t "~1Tspots: #x~X~%" (-> this spots))
|
|
(format #t "~1Tchase-speeches: ~A~%" (-> this chase-speeches))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition of type sig-under
|
|
(deftype sig-under (sig)
|
|
((sig5-course sig5-course :overlay-at course)
|
|
(shot-at-growls-index int8)
|
|
(growls handle 2)
|
|
(next-chase-play-time time-frame :offset 1096)
|
|
(grating-broken-time time-frame :overlay-at next-chase-play-time)
|
|
(test-plane plane :inline)
|
|
)
|
|
(:state-methods
|
|
intro-shooting
|
|
)
|
|
(:methods
|
|
(sig-under-method-260 (_type_) symbol)
|
|
(sig-under-method-261 (_type_ vector vector symbol) symbol)
|
|
(sig-under-method-262 (_type_ symbol) symbol)
|
|
(sig-under-method-263 (_type_) none)
|
|
(sig-under-method-264 (_type_) symbol)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type sig-under
|
|
(defmethod inspect ((this sig-under))
|
|
(when (not this)
|
|
(set! this this)
|
|
(goto cfg-4)
|
|
)
|
|
(let ((t9-0 (method-of-type sig inspect)))
|
|
(t9-0 this)
|
|
)
|
|
(format #t "~2Tshot-at-growls-index: ~D~%" (-> this shot-at-growls-index))
|
|
(format #t "~2Tgrowls[2] @ #x~X~%" (-> this growls))
|
|
(format #t "~2Tnext-chase-play-time: ~D~%" (-> this next-chase-play-time))
|
|
(format #t "~2Tgrating-broken-time: ~D~%" (-> this next-chase-play-time))
|
|
(format #t "~2Ttest-plane: #<plane @ #x~X>~%" (-> this test-plane))
|
|
(label cfg-4)
|
|
this
|
|
)
|
|
|
|
;; definition for method 263 of type sig-under
|
|
;; WARN: Return type mismatch time-frame vs none.
|
|
(defmethod sig-under-method-263 ((this sig-under))
|
|
(let ((s5-0 (current-time)))
|
|
(when (and (>= s5-0 (-> this next-chase-play-time))
|
|
(not (channel-active? this (gui-channel none)))
|
|
(>= (the-as int (sig-method-256 this)) 750)
|
|
)
|
|
(let ((a1-2 (bot-speech-list-method-9
|
|
(-> this sig5-course chase-speeches)
|
|
this
|
|
(-> this sig5-course speeches)
|
|
(speech-flags)
|
|
)
|
|
)
|
|
)
|
|
(when (>= a1-2 0)
|
|
(play-speech this a1-2)
|
|
(set! (-> this next-chase-play-time) (+ s5-0 (rnd-int-range this 1500 2700)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 195 of type sig-under
|
|
;; WARN: Return type mismatch object vs symbol.
|
|
(defmethod attacked-by-player? ((this sig-under) (arg0 process-focusable))
|
|
"Were we attacked by the player?"
|
|
(the-as
|
|
symbol
|
|
(and (and arg0 (not (logtest? (-> arg0 focus-status) (focus-status disable dead ignore grabbed))))
|
|
(or (and (logtest? (process-mask enemy) (-> arg0 mask)) (not (logtest? (bot-flags bf26) (-> this bot-flags))))
|
|
(and (logtest? (-> arg0 mask) (process-mask target)) (logtest? (-> this bot-flags) (bot-flags attacked)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 86 of type sig-under
|
|
(defmethod enemy-method-86 ((this sig-under))
|
|
(let ((gp-0 (-> this root)))
|
|
(when (< (-> gp-0 transv y) 0.0)
|
|
(let ((a1-0 (new 'stack-no-clear 'collide-query)))
|
|
(find-ground (-> this root) a1-0 (collide-spec backgnd) 8192.0 81920.0 1024.0)
|
|
)
|
|
(>= (-> gp-0 gspot-pos y) (-> gp-0 trans y))
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 76 of type sig-under
|
|
;; WARN: Return type mismatch object vs symbol.
|
|
(defmethod enemy-method-76 ((this sig-under) (arg0 process) (arg1 event-message-block))
|
|
(the-as
|
|
symbol
|
|
(cond
|
|
((and (and (-> this next-state) (= (-> this next-state name) 'jump)) (type? arg0 under-break-floor))
|
|
(let ((v1-5 (-> arg1 param 0)))
|
|
(send-event arg0 'attack v1-5 (static-attack-info ((id (new-attack-id)) (penetrate-using (penetrate flop)))))
|
|
)
|
|
)
|
|
(else
|
|
((method-of-type sig enemy-method-76) this arg0 arg1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 74 of type sig-under
|
|
(defmethod general-event-handler ((this sig-under) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
|
"Handles various events for the enemy
|
|
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
|
|
(with-pp
|
|
(case arg2
|
|
(('set-task)
|
|
(let* ((s1-1 (logtest? (-> this bot-task-bits) (bot-task-bits botbits-4)))
|
|
(t9-0 (method-of-type sig general-event-handler))
|
|
(s5-1 (t9-0 this arg0 arg1 arg2 arg3))
|
|
)
|
|
(when (and (not s1-1) (logtest? (-> this bot-task-bits) (bot-task-bits botbits-4)))
|
|
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-2 from) (process->ppointer pp))
|
|
(set! (-> a1-2 num-params) 0)
|
|
(set! (-> a1-2 message) 'under-break-floor)
|
|
(let ((t9-1 send-event-function)
|
|
(v1-11 (-> this actor-group 0 data 8 actor))
|
|
)
|
|
(t9-1
|
|
(if v1-11
|
|
(-> v1-11 extra process)
|
|
)
|
|
a1-2
|
|
)
|
|
)
|
|
)
|
|
)
|
|
s5-1
|
|
)
|
|
)
|
|
(('centipede-chase)
|
|
(let ((v1-14 *sig5-cent1-path0*))
|
|
(if (= (-> arg3 param 0) 2)
|
|
(set! v1-14 *sig5-cent2-path0*)
|
|
)
|
|
(send-event this 'sig-path v1-14)
|
|
)
|
|
)
|
|
(('notify)
|
|
(if (and (type? arg0 sig-shot)
|
|
(= (-> arg3 param 0) 'die)
|
|
(-> this next-state)
|
|
(= (-> this next-state name) 'intro-shooting)
|
|
)
|
|
(send-event (handle->process (-> this growls (-> this shot-at-growls-index))) 'sig-shot)
|
|
((method-of-type sig general-event-handler) this arg0 arg1 arg2 arg3)
|
|
)
|
|
)
|
|
(else
|
|
((method-of-type sig general-event-handler) this arg0 arg1 arg2 arg3)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 262 of type sig-under
|
|
;; WARN: disable def twice: 39. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
|
(defmethod sig-under-method-262 ((this sig-under) (arg0 symbol))
|
|
(when (or (logtest? (-> this bot-task-bits) (bot-task-bits botbits-1))
|
|
(and arg0 (>= (square 81920.0) (vector-vector-xz-distance-squared (target-pos 0) (-> this root trans))))
|
|
)
|
|
(cond
|
|
((speech-playing? this 7)
|
|
(and (not (channel-active? this (gui-channel none))) (scene-play this "under-centipede-one" #f))
|
|
)
|
|
(else
|
|
(play-speech this 7)
|
|
(reset-warn-time! this)
|
|
#f
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for method 264 of type sig-under
|
|
(defmethod sig-under-method-264 ((this sig-under))
|
|
(and (logtest? (-> this bot-task-bits) (bot-task-bits botbits-3))
|
|
(not (channel-active? this (gui-channel none)))
|
|
(scene-play this "under-get-sig-out-res" #f)
|
|
)
|
|
)
|
|
|
|
;; definition for method 260 of type sig-under
|
|
;; INFO: Used lq/sq
|
|
(defmethod sig-under-method-260 ((this sig-under))
|
|
(local-vars (a2-5 float) (a2-12 float))
|
|
(rlet ((vf1 :class vf)
|
|
(vf2 :class vf)
|
|
(vf3 :class vf)
|
|
)
|
|
(let ((gp-0 (new 'stack-no-clear 'sphere)))
|
|
(set! (-> gp-0 quad) (-> this root trans quad))
|
|
(set! (-> gp-0 r) 327680.0)
|
|
(set! *actor-list-length* 0)
|
|
(if #t
|
|
(set! *actor-list-length* (fill-actor-list-for-sphere *actor-hash* gp-0 *actor-list* 256))
|
|
)
|
|
(when #f
|
|
(let ((a0-5 (-> *collide-player-list* alive-list next0)))
|
|
*collide-player-list*
|
|
(let ((v1-12 (-> a0-5 next0)))
|
|
(while (!= a0-5 (-> *collide-player-list* alive-list-end))
|
|
(let* ((a0-6 (-> (the-as connection a0-5) param1))
|
|
(a1-1 (-> (the-as collide-shape a0-6) root-prim))
|
|
)
|
|
(when (logtest? (-> a1-1 prim-core collide-as) (collide-spec enemy hit-by-others-list))
|
|
(let ((a1-2 (-> a1-1 prim-core)))
|
|
(let ((a2-4 a1-2)
|
|
(a3-1 gp-0)
|
|
)
|
|
(.lvf vf2 (&-> a2-4 world-sphere quad))
|
|
(.lvf vf3 (&-> a3-1 quad))
|
|
)
|
|
(.sub.vf vf1 vf3 vf2)
|
|
(.mul.vf vf1 vf1 vf1)
|
|
(.add.y.vf.x vf1 vf1 vf1)
|
|
(.add.z.vf.x vf1 vf1 vf1)
|
|
(.mov a2-5 vf1)
|
|
(when (< a2-5 (square (+ (-> a1-2 world-sphere w) (-> gp-0 r))))
|
|
(when (< *actor-list-length* 256)
|
|
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6))
|
|
(set! *actor-list-length* (+ *actor-list-length* 1))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! a0-5 v1-12)
|
|
*collide-player-list*
|
|
(set! v1-12 (-> v1-12 next0))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when #f
|
|
(let ((a0-8 (-> *collide-hit-by-player-list* alive-list next0)))
|
|
*collide-hit-by-player-list*
|
|
(let ((v1-19 (-> a0-8 next0)))
|
|
(while (!= a0-8 (-> *collide-hit-by-player-list* alive-list-end))
|
|
(let* ((a0-9 (-> (the-as connection a0-8) param1))
|
|
(a1-13 (-> (the-as collide-shape a0-9) root-prim))
|
|
)
|
|
(when (logtest? (-> a1-13 prim-core collide-as) (collide-spec enemy hit-by-others-list))
|
|
(let ((a1-14 (-> a1-13 prim-core)))
|
|
(let ((a2-11 a1-14)
|
|
(a3-2 gp-0)
|
|
)
|
|
(.lvf vf2 (&-> a2-11 world-sphere quad))
|
|
(.lvf vf3 (&-> a3-2 quad))
|
|
)
|
|
(.sub.vf vf1 vf3 vf2)
|
|
(.mul.vf vf1 vf1 vf1)
|
|
(.add.y.vf.x vf1 vf1 vf1)
|
|
(.add.z.vf.x vf1 vf1 vf1)
|
|
(.mov a2-12 vf1)
|
|
(when (< a2-12 (square (+ (-> a1-14 world-sphere w) (-> gp-0 r))))
|
|
(when (< *actor-list-length* 256)
|
|
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-9))
|
|
(set! *actor-list-length* (+ *actor-list-length* 1))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! a0-8 v1-19)
|
|
*collide-hit-by-player-list*
|
|
(set! v1-19 (-> v1-19 next0))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(dotimes (gp-1 *actor-list-length*)
|
|
(let ((v1-24 (-> *actor-list* gp-1)))
|
|
(when (logtest? (-> v1-24 root-prim prim-core collide-as) (collide-spec enemy hit-by-others-list))
|
|
(let ((a0-16 (-> v1-24 process)))
|
|
(if (= (-> a0-16 type) pipe-grunt)
|
|
(send-event a0-16 'instant-death)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
|
|
;; definition for method 261 of type sig-under
|
|
;; INFO: Used lq/sq
|
|
(defmethod sig-under-method-261 ((this sig-under) (arg0 vector) (arg1 vector) (arg2 symbol))
|
|
(set! (-> arg0 w) (- (+ (* (-> arg0 x) (-> this root trans x)) (* (-> arg0 z) (-> this root trans z)))))
|
|
(let ((v1-2 (new 'stack-no-clear 'vector)))
|
|
(set! (-> v1-2 quad) (-> arg1 quad))
|
|
(set! (-> v1-2 y) 0.0)
|
|
(let ((f0-6 (vector4-dot (the-as vector (-> this test-plane)) v1-2))
|
|
(f1-3 14336.0)
|
|
(f2-1 16384.0)
|
|
)
|
|
(when arg2
|
|
(set! f1-3 (+ 2048.0 f1-3))
|
|
(set! f2-1 (+ 2048.0 f2-1))
|
|
)
|
|
(if (and (>= f0-6 -2048.0) (>= f1-3 f0-6))
|
|
(>= (square f2-1) (vector-vector-xz-distance-squared arg1 (-> this root trans)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate intro-shooting (sig-under)
|
|
:virtual #t
|
|
:event enemy-event-handler
|
|
:enter (behavior ()
|
|
(move-to-point! (-> self root) (-> self sig5-course spots 0 center))
|
|
(quaternion-identity! (-> self root quat))
|
|
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
|
(vector-! gp-0 (-> self sig5-course spots 1 center) (-> self root trans))
|
|
(vector-normalize! gp-0 1.0)
|
|
(set-heading-vec! (-> self root) gp-0)
|
|
)
|
|
(logclear! (-> self enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
|
(let ((v1-11 self))
|
|
(set! (-> v1-11 enemy-flags) (the-as enemy-flag (logclear (-> v1-11 enemy-flags) (enemy-flag enemy-flag36))))
|
|
(set! (-> v1-11 nav callback-info) *nav-enemy-null-callback-info*)
|
|
)
|
|
0
|
|
(nav-enemy-method-167 self)
|
|
(set! (-> self skel top-anim interp) 0.0)
|
|
(set! (-> self focus-mode) 1)
|
|
(logior! (-> self bot-flags) (bot-flags bf11 bf18))
|
|
(logior! (-> self root penetrated-by) (penetrate jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot))
|
|
(look-at-target! self (enemy-flag look-at-focus))
|
|
)
|
|
:exit (behavior ()
|
|
(logclear! (-> self bot-flags) (bot-flags bf18))
|
|
(set! (-> self root penetrated-by) (get-penetrate-info self))
|
|
)
|
|
:trans (behavior ()
|
|
(if (focus-test? self grabbed)
|
|
(go-virtual waiting-close)
|
|
)
|
|
(let ((a0-1 (handle->process (-> self focus handle))))
|
|
(if a0-1
|
|
(bot-method-222 self (get-trans (the-as process-focusable a0-1) 3))
|
|
)
|
|
)
|
|
)
|
|
:code (behavior ()
|
|
(until #f
|
|
(let ((gp-0 (rnd-int-count self 2)))
|
|
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
|
(if (and (not (logtest? (-> self bot-task-bits) (bot-task-bits botbits-0))) (zero? gp-0))
|
|
(set! (-> s5-0 quad) (-> self sig5-course spots 2 center quad))
|
|
(set! (-> s5-0 quad) (-> self sig5-course spots 1 center quad))
|
|
)
|
|
(+! (-> s5-0 x) (rnd-float-range self -20480.0 20480.0))
|
|
(+! (-> s5-0 y) (rnd-float-range self 0.0 20480.0))
|
|
(send-event (ppointer->process (-> self my-simple-focus)) 'move-trans s5-0)
|
|
)
|
|
(set! (-> self shot-at-growls-index) gp-0)
|
|
)
|
|
(set! (-> self poi-handle) (ppointer->handle (-> self my-simple-focus)))
|
|
(enemy-focus-method-13
|
|
(-> self focus)
|
|
(the-as process-focusable (ppointer->process (-> self my-simple-focus)))
|
|
(enemy-aware enemy-aware-3)
|
|
)
|
|
(bot-method-223 self #f)
|
|
(let ((f30-2 8.0))
|
|
(ja-channel-push! 1 (seconds 0.1))
|
|
(let ((gp-1 sig-blast-forward-ja)
|
|
(f30-3 (ja-aframe f30-2 0))
|
|
)
|
|
(ja-no-eval :group! gp-1 :num! (seek! f30-3) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(seek-toward-heading-vec! (-> self root) (-> self focus-info bullseye-xz-dir) 32768.0 (seconds 0.05))
|
|
(suspend)
|
|
(ja :num! (seek! f30-3))
|
|
)
|
|
)
|
|
)
|
|
(fire-gun self (-> self focus-info bullseye))
|
|
(ja-no-eval :num! (seek!))
|
|
(while (not (ja-done? 0))
|
|
(suspend)
|
|
(ja-eval)
|
|
)
|
|
(when #t
|
|
(set-time! (-> self state-time))
|
|
(logclear! (-> self bot-flags) (bot-flags bf18))
|
|
(let ((gp-3 (+ (current-time) (rnd-int-range self 30 600))))
|
|
(ja-channel-push! 1 (seconds 0.5))
|
|
(ja-no-eval :group! sig-ready0-ja :num! (seek!) :frame-num 0.0)
|
|
(until (ja-done? 0)
|
|
(if (>= (current-time) gp-3)
|
|
(goto cfg-27)
|
|
)
|
|
(suspend)
|
|
(ja :num! (seek!))
|
|
)
|
|
)
|
|
)
|
|
(label cfg-27)
|
|
(logior! (-> self bot-flags) (bot-flags bf18))
|
|
)
|
|
#f
|
|
)
|
|
:post nav-enemy-simple-post
|
|
)
|
|
|
|
;; definition for method 183 of type sig-under
|
|
(defmethod alive? ((this sig-under))
|
|
((method-of-type bot alive?) this)
|
|
)
|
|
|
|
;; definition for method 210 of type sig-under
|
|
;; WARN: Return type mismatch symbol vs none.
|
|
(defmethod init! ((this sig-under))
|
|
"Set defaults for various fields."
|
|
(let ((t9-0 (method-of-type sig init!)))
|
|
(t9-0 this)
|
|
)
|
|
(set! (-> this too-far-warn-dist-default) 245760.0)
|
|
(set! (-> this too-far-fail-dist-delta-default) 163840.0)
|
|
(countdown (v1-3 2)
|
|
(set! (-> this growls v1-3) (the-as handle #f))
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 116 of type sig-under
|
|
;; WARN: Return type mismatch object vs none.
|
|
(defmethod go-idle ((this sig-under))
|
|
(cond
|
|
((task-node-closed? (game-task-node under-sig-resolution))
|
|
(cleanup-for-death this)
|
|
(go (method-of-object this die-fast))
|
|
)
|
|
(else
|
|
(go (method-of-object this intro-shooting))
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for function sig5-default-check-too-far
|
|
;; WARN: Return type mismatch int vs symbol.
|
|
(defun sig5-default-check-too-far ((arg0 sig-under))
|
|
(let ((v0-0 (bot-simple-check-too-far arg0)))
|
|
(if (logtest? (-> arg0 bot-task-bits) (bot-task-bits botbits-2))
|
|
(set! v0-0 2)
|
|
)
|
|
(the-as symbol v0-0)
|
|
)
|
|
)
|
|
|
|
;; definition for symbol *sig5-course*, type sig5-course
|
|
(define *sig5-course*
|
|
(new 'static 'sig5-course
|
|
:course-id #xd
|
|
:speech-count #x1e
|
|
:spot-count #x24
|
|
:too-far-warn-speeches (new 'static 'bot-speech-list-shuffle
|
|
:flags #xa
|
|
:last-local-index -1
|
|
:speech-indexes (new 'static 'boxed-array :type int16 13 14 15)
|
|
)
|
|
:too-far-fail-speeches (new 'static 'bot-speech-list-shuffle
|
|
:flags #xa
|
|
:last-local-index -1
|
|
:speech-indexes (new 'static 'boxed-array :type int16 16 17)
|
|
)
|
|
:attack-player-speeches (new 'static 'bot-speech-list
|
|
:flags #x2
|
|
:last-local-index -1
|
|
:speech-indexes (new 'static 'boxed-array :type int16 0 1 2 3 4 5)
|
|
)
|
|
:default-check-too-far 'sig5-default-check-too-far
|
|
:waypoints (new 'static 'boxed-array :type bot-waypoint
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 1
|
|
:skip-to 22
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((a0-1 80))
|
|
(set! (-> arg0 hit-points) a0-1)
|
|
(set! (-> arg0 enemy-info default-hit-points) a0-1)
|
|
)
|
|
(clear-speech-flags! arg0)
|
|
(logclear! (-> arg0 focus-status) (focus-status disable))
|
|
(set! (-> arg0 growls 0)
|
|
(ppointer->handle (process-spawn under-pipe-growls (-> arg0 sig5-course spots 2) 'intro-shooting :to arg0))
|
|
)
|
|
(set! (-> arg0 growls 1)
|
|
(ppointer->handle (process-spawn under-pipe-growls (-> arg0 sig5-course spots 1) 'intro-shooting :to arg0))
|
|
)
|
|
(if (task-node-open? (game-task-node under-sig-introduction))
|
|
(add-process *gui-control* arg0 (gui-channel art-load) (gui-action queue) "under-find-sig-res" -99.0 0)
|
|
)
|
|
(let ((v1-27 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-27 bytes 5) 1)
|
|
(set! (-> v1-27 bytes 6) 0)
|
|
(set! (-> v1-27 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-27) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(if (not (and (logtest? (-> arg1 bot-task-bits) (bot-task-bits botbits-0))
|
|
*target*
|
|
(not (logtest? (-> *target* focus-status) (focus-status dead in-air edge-grab)))
|
|
)
|
|
)
|
|
(set-time! (-> arg1 waypoint-time0))
|
|
)
|
|
(when (and (time-elapsed? (-> arg1 waypoint-time0) (seconds 0.1))
|
|
(task-node-open? (game-task-node under-sig-introduction))
|
|
(scene-play arg1 "under-find-sig-res" #f)
|
|
)
|
|
(process-entity-status! arg1 (entity-perm-status no-kill) #t)
|
|
(countdown (s5-0 2)
|
|
(send-event (handle->process (-> arg1 growls s5-0)) 'die-fast)
|
|
)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 2 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 2
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((v1-1 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-1 bytes 5) 1)
|
|
(set! (-> v1-1 bytes 6) 0)
|
|
(set! (-> v1-1 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-1) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(set-setting! 'music 'tomb 0.0 0)
|
|
(when (scene-release? arg1)
|
|
(reset-warn-time! arg1)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 3 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 3
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(logclear! (-> arg0 bot-task-bits) (bot-task-bits botbits-2))
|
|
(logior! (-> arg0 bot-flags) (bot-flags bf06))
|
|
(logior! (-> arg0 enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
|
(set! (-> arg0 notice-enemy-dist) 122880.0)
|
|
(clear-poi-and-focus! arg0)
|
|
(set! (-> arg0 focus-mode) 0)
|
|
(set! (-> arg0 root penetrated-by) (get-penetrate-info arg0))
|
|
(let ((v1-12 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-12 bytes 5) 1)
|
|
(set! (-> v1-12 bytes 6) 3)
|
|
(set! (-> v1-12 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-12) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(when (outside-spot-radius? arg1 (the-as bot-spot #f) (the-as vector #f) #f)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 4 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 4
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((v1-1 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-1 bytes 5) 1)
|
|
(set! (-> v1-1 bytes 6) 3)
|
|
(set! (-> v1-1 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-1) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(cond
|
|
((logtest? (-> arg1 actor-group 0 data 0 actor extra perm status) (entity-perm-status subtask-complete))
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 5 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
(else
|
|
(if (and (not (speech-playing? arg1 6)) (not (channel-active? arg1 (gui-channel none))))
|
|
(play-speech arg1 6)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 5
|
|
:nav-mesh-index 1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(reset-warn-time! arg0)
|
|
(add-process *gui-control* arg0 (gui-channel art-load) (gui-action queue) "under-centipede-one" -99.0 0)
|
|
(let ((v1-5 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-5 bytes 5) 1)
|
|
(set! (-> v1-5 bytes 6) 4)
|
|
(set! (-> v1-5 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-5) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(cond
|
|
((sig-under-method-262 arg1 #f)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 9 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
((outside-spot-radius? arg1 (the-as bot-spot #f) (the-as vector #f) #f)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 6 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 6
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((v1-1 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-1 bytes 5) 1)
|
|
(set! (-> v1-1 bytes 6) 5)
|
|
(set! (-> v1-1 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-1) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(cond
|
|
((sig-under-method-262 arg1 #f)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 9 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
((outside-spot-radius? arg1 (the-as bot-spot #f) (the-as vector #f) #f)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 7 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 7
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((v1-1 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-1 bytes 5) 1)
|
|
(set! (-> v1-1 bytes 6) 6)
|
|
(set! (-> v1-1 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-1) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(cond
|
|
((sig-under-method-262 arg1 #f)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 9 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
((outside-spot-radius? arg1 (the-as bot-spot #f) (the-as vector #f) #f)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 8 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 8
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((v1-1 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-1 bytes 5) 1)
|
|
(set! (-> v1-1 bytes 6) 7)
|
|
(set! (-> v1-1 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-1) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(when (and (outside-spot-radius? arg1 (the-as bot-spot #f) (the-as vector #f) #f) (sig-under-method-262 arg1 #t))
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 9 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 9
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(set-setting! 'music 'danger7 0.0 0)
|
|
(let ((v1-3 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-3 bytes 5) 1)
|
|
(set! (-> v1-3 bytes 6) 7)
|
|
(set! (-> v1-3 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-3) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under)) (when (scene-release? arg1)
|
|
(reset-warn-time! arg1)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 10 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 10
|
|
:nav-mesh-index 2
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(set! (-> arg0 next-chase-play-time) (+ (current-time) (rnd-int-range arg0 900 1500)))
|
|
(add-process *gui-control* arg0 (gui-channel art-load) (gui-action queue) "under-centipede-two" -99.0 0)
|
|
(let* ((v1-7 (-> arg0 sig5-course spots))
|
|
(s5-1 (-> v1-7 8))
|
|
)
|
|
(let ((v1-8 (-> v1-7 9)))
|
|
(vector-! (the-as vector (-> arg0 test-plane)) (-> v1-8 center) (-> s5-1 center))
|
|
)
|
|
(set! (-> arg0 test-plane y) 0.0)
|
|
(vector-normalize! (-> arg0 test-plane) 1.0)
|
|
(set! (-> arg0 test-plane w)
|
|
(- (+ (* (-> s5-1 center x) (-> arg0 test-plane x)) (* (-> s5-1 center z) (-> arg0 test-plane z))))
|
|
)
|
|
)
|
|
(let ((v1-11 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-11 bytes 5) 1)
|
|
(set! (-> v1-11 bytes 6) 10)
|
|
(set! (-> v1-11 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-11) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(sig-under-method-263 arg1)
|
|
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
|
(set! (-> s5-0 quad) (-> (target-pos 0) quad))
|
|
(set! (-> s5-0 y) 0.0)
|
|
(when (and (>= (vector4-dot (the-as vector (-> arg1 test-plane)) s5-0) 0.0)
|
|
(scene-play arg1 "under-centipede-two" #f)
|
|
)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 11 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 11
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(set-setting! 'music 'tomb 0.0 0)
|
|
(let ((v1-3 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-3 bytes 5) 1)
|
|
(set! (-> v1-3 bytes 6) 10)
|
|
(set! (-> v1-3 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-3) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under)) (when (scene-release? arg1)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 12 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 12
|
|
:nav-mesh-index 3
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(logior! (-> arg0 enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
|
(reset-warn-time! arg0)
|
|
(move-to-point! (-> arg0 root) (-> arg0 sig5-course spots 10 center))
|
|
(set-vector! (-> arg0 root quat) 0.0 0.5874 0.0 0.8092)
|
|
(play-speech arg0 8)
|
|
(play-speech arg0 9)
|
|
(let ((v1-15 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-15 bytes 5) 1)
|
|
(set! (-> v1-15 bytes 6) 10)
|
|
(set! (-> v1-15 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-15) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under)) (when (time-elapsed? (-> arg1 waypoint-time0) (seconds 1.8))
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 13 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 13
|
|
:nav-mesh-index 3
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((v1-1 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-1 bytes 5) 1)
|
|
(set! (-> v1-1 bytes 6) 11)
|
|
(set! (-> v1-1 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-1) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(when (logtest? (-> arg1 actor-group 0 data 2 actor extra perm status) (entity-perm-status subtask-complete))
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 14 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 14
|
|
:nav-mesh-index 4
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((a1-0 (-> arg0 sig5-course spots)))
|
|
(vector-! (the-as vector (-> arg0 test-plane)) (-> a1-0 13 center) (-> a1-0 12 center))
|
|
)
|
|
(vector-normalize! (-> arg0 test-plane) 1.0)
|
|
(let ((v1-4 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-4 bytes 5) 1)
|
|
(set! (-> v1-4 bytes 6) 12)
|
|
(set! (-> v1-4 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-4) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(when (outside-spot-radius? arg1 (the-as bot-spot #f) (the-as vector #f) #f)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 16 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 16
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((v1-1 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-1 bytes 5) 1)
|
|
(set! (-> v1-1 bytes 6) 13)
|
|
(set! (-> v1-1 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-1) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(cond
|
|
((sig-under-method-261 arg1 (-> arg1 test-plane) (target-pos 0) #f)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 15 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
((outside-spot-radius? arg1 (the-as bot-spot #f) (the-as vector #f) #f)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 17 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
(else
|
|
#f
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 15
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((v1-2 (-> arg0 sig5-course spots 14)))
|
|
(set! (-> v1-2 center quad) (-> arg0 root trans quad))
|
|
(set! (-> v1-2 center w) 8192.0)
|
|
)
|
|
(let ((v1-5 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-5 bytes 5) 1)
|
|
(set! (-> v1-5 bytes 6) 14)
|
|
(set! (-> v1-5 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-5) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(if (sig-under-method-261 arg1 (-> arg1 test-plane) (target-pos 0) #t)
|
|
(set-time! (-> arg1 waypoint-time0))
|
|
)
|
|
(when (time-elapsed? (-> arg1 waypoint-time0) (seconds 1))
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 16 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 17
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((v1-1 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-1 bytes 5) 1)
|
|
(set! (-> v1-1 bytes 6) 15)
|
|
(set! (-> v1-1 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-1) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(when (outside-spot-radius? arg1 (the-as bot-spot #f) (the-as vector #f) #f)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 18 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 18
|
|
:nav-mesh-index 6
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let ((v1-1 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-1 bytes 5) 1)
|
|
(set! (-> v1-1 bytes 6) 16)
|
|
(set! (-> v1-1 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-1) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(when (and (outside-spot-radius? arg1 (the-as bot-spot #f) (the-as vector #f) #f)
|
|
(not (speech-playing? arg1 10))
|
|
(not (channel-active? arg1 (gui-channel none)))
|
|
)
|
|
(play-speech arg1 10)
|
|
(reset-warn-time! arg1)
|
|
)
|
|
(when (and (speech-playing? arg1 10) (not (channel-active? arg1 (gui-channel none))))
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 19 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 19
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(set! (-> arg0 growls 0)
|
|
(ppointer->handle (process-spawn under-pipe-growls (-> arg0 sig5-course spots 17) 'block-puzzle :to arg0))
|
|
)
|
|
(set! (-> arg0 notice-enemy-dist) 245760.0)
|
|
(send-event (ppointer->process (-> arg0 my-simple-focus)) 'move-trans (-> arg0 sig5-course spots 17))
|
|
(set! (-> arg0 poi-handle) (ppointer->handle (-> arg0 my-simple-focus)))
|
|
(let ((v1-23 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-23 bytes 5) 1)
|
|
(set! (-> v1-23 bytes 6) 16)
|
|
(set! (-> v1-23 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-23) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(with-pp
|
|
(when (not (logtest? (-> arg1 waypoint-bits) (waypoint-bits wabits-0)))
|
|
(logior! (-> arg1 waypoint-bits) (waypoint-bits wabits-0))
|
|
(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) 'trigger)
|
|
(let ((t9-0 send-event-function)
|
|
(v1-9 (-> arg1 actor-group 0 data 3 actor))
|
|
)
|
|
(t9-0
|
|
(if v1-9
|
|
(-> v1-9 extra process)
|
|
)
|
|
a1-1
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (time-elapsed? (-> arg1 waypoint-time0) (seconds 1.7))
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 20 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 20
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(play-speech arg0 11)
|
|
(reset-warn-time! arg0)
|
|
(let ((v1-5 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-5 bytes 5) 2)
|
|
(set! (-> v1-5 bytes 6) 18)
|
|
(set! (-> v1-5 bytes 7) 19)
|
|
(set! (-> v1-5 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-5) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(when (and (not (logtest? (-> arg1 waypoint-bits) (waypoint-bits wabits-0))) (+ (current-time) (seconds -6)))
|
|
(logior! (-> arg1 waypoint-bits) (waypoint-bits wabits-0))
|
|
(set-setting! 'music 'danger3 0.0 0)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update (lambda ((arg0 sig-under))
|
|
(with-pp
|
|
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-0 from) (process->ppointer pp))
|
|
(set! (-> a1-0 num-params) 1)
|
|
(set! (-> a1-0 message) 'query)
|
|
(set! (-> a1-0 param 0) (the-as uint 'beaten))
|
|
(let ((t9-0 send-event-function)
|
|
(v1-6 (-> arg0 actor-group 0 data 4 actor))
|
|
)
|
|
(when (t9-0
|
|
(if v1-6
|
|
(-> v1-6 extra process)
|
|
)
|
|
a1-0
|
|
)
|
|
(clear-poi-and-focus! arg0)
|
|
(logior! (-> arg0 focus-status) (focus-status disable))
|
|
(set! (-> arg0 notice-enemy-dist) 0.0)
|
|
(logclear! (-> arg0 enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
|
(clear-focused (-> arg0 focus))
|
|
(logior! (-> arg0 bot-flags) (bot-flags bf26))
|
|
(when (and (process-grab? arg0 #t) (process-grab? *target* #t))
|
|
(process-grab? arg0 #f)
|
|
(process-grab? *target* #f)
|
|
(set-setting! 'entity-name "camera-245" 0.0 0)
|
|
(let ((a1-6 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-6 from) (process->ppointer pp))
|
|
(set! (-> a1-6 num-params) 0)
|
|
(set! (-> a1-6 message) 'unlock)
|
|
(let ((t9-8 send-event-function)
|
|
(v1-26 (-> arg0 actor-group 0 data 4 actor))
|
|
)
|
|
(t9-8
|
|
(if v1-26
|
|
(-> v1-26 extra process)
|
|
)
|
|
a1-6
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-7 (new 'stack-no-clear 'event-message-block)))
|
|
(set! (-> a1-7 from) (process->ppointer pp))
|
|
(set! (-> a1-7 num-params) 0)
|
|
(set! (-> a1-7 message) 'beaten)
|
|
(let ((t9-9 send-event-function)
|
|
(v1-33 (-> arg0 actor-group 0 data 3 actor))
|
|
)
|
|
(t9-9
|
|
(if v1-33
|
|
(-> v1-33 extra process)
|
|
)
|
|
a1-7
|
|
)
|
|
)
|
|
)
|
|
(send-event (handle->process (-> arg0 growls 0)) 'fade)
|
|
(set-setting! 'music 'tomb 0.0 0)
|
|
(ai-task-control-method-12 (-> arg0 ai-ctrl) arg0)
|
|
(go-to-waypoint! arg0 21 #f)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
)
|
|
:on-skipping-here #f
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 21
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(reset-warn-time! arg0)
|
|
(let ((v1-3 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-3 bytes 5) 2)
|
|
(set! (-> v1-3 bytes 6) 21)
|
|
(set! (-> v1-3 bytes 7) 22)
|
|
(set! (-> v1-3 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-3) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(if (and (not (speech-playing? arg1 12))
|
|
(time-elapsed? (-> arg1 waypoint-time0) (seconds 1.5))
|
|
(not (channel-active? arg1 (gui-channel none)))
|
|
)
|
|
(play-speech arg1 12)
|
|
)
|
|
(cond
|
|
((not (logtest? (-> arg1 waypoint-bits) (waypoint-bits wabits-0)))
|
|
(logior! (-> arg1 waypoint-bits) (waypoint-bits wabits-0))
|
|
(process-release? arg1)
|
|
(sig-under-method-260 arg1)
|
|
(move-to-point! (-> arg1 root) (-> arg1 sig5-course spots 20 center))
|
|
#f
|
|
)
|
|
((not (logtest? (-> arg1 waypoint-bits) (waypoint-bits wabits-1)))
|
|
(when (time-elapsed? (-> arg1 waypoint-time0) (seconds 2))
|
|
(remove-setting! 'entity-name)
|
|
(logior! (-> arg1 waypoint-bits) (waypoint-bits wabits-1))
|
|
(add-process *gui-control* arg1 (gui-channel art-load) (gui-action queue) "under-centipede-three" -99.0 0)
|
|
)
|
|
#f
|
|
)
|
|
(else
|
|
(when (time-elapsed? (-> arg1 waypoint-time0) (seconds 2.5))
|
|
(process-release? *target*)
|
|
(reset-warn-time! arg1)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 22 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 22
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(let* ((v1-1 (-> arg0 sig5-course spots))
|
|
(s5-0 (-> v1-1 24))
|
|
)
|
|
(let ((v1-2 (-> v1-1 25)))
|
|
(vector-! (the-as vector (-> arg0 test-plane)) (-> v1-2 center) (-> s5-0 center))
|
|
)
|
|
(set! (-> arg0 test-plane y) 0.0)
|
|
(vector-normalize! (-> arg0 test-plane) 1.0)
|
|
(set! (-> arg0 test-plane w)
|
|
(- (+ (* (-> s5-0 center x) (-> arg0 test-plane x)) (* (-> s5-0 center z) (-> arg0 test-plane z))))
|
|
)
|
|
)
|
|
(set! (-> arg0 too-far-warn-dist) 102400.0)
|
|
(set! (-> arg0 too-far-fail-dist-delta) 204800.0)
|
|
(reset-warn-time! arg0)
|
|
(let ((v1-9 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-9 bytes 5) 1)
|
|
(set! (-> v1-9 bytes 6) 23)
|
|
(set! (-> v1-9 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-9) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(local-vars (v1-14 symbol))
|
|
(with-pp
|
|
(when (logtest? (-> arg1 waypoint-bits) (waypoint-bits wabits-0))
|
|
(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) 'trigger)
|
|
(let ((t9-0 send-event-function)
|
|
(v1-8 (-> arg1 actor-group 0 data 5 actor))
|
|
)
|
|
(t9-0
|
|
(if v1-8
|
|
(-> v1-8 extra process)
|
|
)
|
|
a1-1
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
|
(set! v1-14
|
|
(and (time-elapsed? (-> arg1 waypoint-time0) (seconds 0.25))
|
|
(begin
|
|
(set! (-> s5-0 quad) (-> (target-pos 0) quad))
|
|
(set! (-> s5-0 y) 0.0)
|
|
(set! (-> s5-0 w) 1.0)
|
|
(when (and (>= (vector4-dot (the-as vector (-> arg1 test-plane)) s5-0) 0.0)
|
|
(>= (square 81920.0) (vector-vector-xz-distance-squared (target-pos 0) (-> arg1 sig5-course spots 24 center)))
|
|
)
|
|
(set! v1-14 #t)
|
|
(goto cfg-21)
|
|
)
|
|
(set! (-> s5-0 quad) (-> (math-camera-pos) quad))
|
|
(set! (-> s5-0 y) 0.0)
|
|
(set! (-> s5-0 w) 1.0)
|
|
(when (>= (vector4-dot (the-as vector (-> arg1 test-plane)) s5-0) 0.0)
|
|
(set! v1-14 #t)
|
|
(goto cfg-21)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-21)
|
|
(when v1-14
|
|
(when (scene-play arg1 "under-centipede-three" #f)
|
|
(logclear! (-> arg1 enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
|
(reset-warn-time! arg1)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 23 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here (lambda ((arg0 sig-under))
|
|
(set-action!
|
|
*gui-control*
|
|
(gui-action stop)
|
|
(the-as sound-id 1)
|
|
(gui-channel art-load)
|
|
(gui-action none)
|
|
(the-as string #f)
|
|
(the-as (function gui-connection symbol) #f)
|
|
(the-as process #f)
|
|
)
|
|
(ai-task-control-method-12 (-> arg0 ai-ctrl) arg0)
|
|
(logclear! (-> arg0 focus-status) (focus-status disable))
|
|
(logior! (-> arg0 enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
|
(process-entity-status! arg0 (entity-perm-status no-kill) #t)
|
|
(logior! (-> arg0 bot-flags) (bot-flags bf06))
|
|
(set! (-> arg0 notice-enemy-dist) 122880.0)
|
|
(clear-poi-and-focus! arg0)
|
|
(set! (-> arg0 focus-mode) 0)
|
|
(set! (-> arg0 root penetrated-by) (get-penetrate-info arg0))
|
|
(logior! (-> arg0 waypoint-bits) (waypoint-bits wabits-0))
|
|
(send-event arg0 'move-trans (-> arg0 sig5-course spots 21))
|
|
(send-event *target* 'continue (get-continue-by-name *game-info* "sig5-skip-to-cent2"))
|
|
(react-to-focus arg0)
|
|
(none)
|
|
)
|
|
:check-too-far #f
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 23
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(stop-speech arg0 (the-as uint 0) #f)
|
|
(set-setting! 'music 'danger7 0.0 0)
|
|
(logclear! (-> arg0 bot-task-bits) (bot-task-bits botbits-3))
|
|
(let ((v1-7 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-7 bytes 5) 1)
|
|
(set! (-> v1-7 bytes 6) 23)
|
|
(set! (-> v1-7 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-7) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under)) (when (scene-release? arg1)
|
|
(reset-warn-time! arg1)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 24 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 24
|
|
:nav-mesh-index 7
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(set! (-> arg0 next-chase-play-time) (+ (current-time) (rnd-int-range arg0 600 1200)))
|
|
(add-process *gui-control* arg0 (gui-channel art-load) (gui-action queue) "under-get-sig-out-res" -99.0 0)
|
|
(let ((v1-7 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-7 bytes 5) 1)
|
|
(set! (-> v1-7 bytes 6) 26)
|
|
(set! (-> v1-7 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-7) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(when (sig-under-method-264 arg1)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 27 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
(return #t)
|
|
)
|
|
(sig-under-method-263 arg1)
|
|
(when (and (time-elapsed? (-> arg1 waypoint-time0) (seconds 4))
|
|
(sig-method-257 arg1)
|
|
(>= (square 61440.0) (vector-vector-xz-distance-squared (target-pos 0) (-> arg1 root trans)))
|
|
)
|
|
(set! (-> arg1 enemy-flags)
|
|
(the-as enemy-flag (logclear (-> arg1 enemy-flags) (enemy-flag jump-check-blocked)))
|
|
)
|
|
(when (send-event arg1 'jump 5 (-> arg1 sig5-course spots 28))
|
|
(let ((s5-1 (-> arg1 actor-group 0 data 6 actor)))
|
|
(when (and (not (channel-active? arg1 (gui-channel none)))
|
|
(or (not s5-1) (not (logtest? (-> s5-1 extra perm status) (entity-perm-status subtask-complete))))
|
|
)
|
|
(let ((s5-2 18))
|
|
(case (rnd-int-count arg1 3)
|
|
((1)
|
|
(set! s5-2 19)
|
|
)
|
|
((2)
|
|
(set! s5-2 20)
|
|
)
|
|
)
|
|
(play-speech arg1 s5-2)
|
|
)
|
|
)
|
|
)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 25 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 25
|
|
:nav-mesh-index 8
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(clear-poi-and-focus! arg0)
|
|
(set! (-> arg0 next-chase-play-time) 0)
|
|
(let ((v1-3 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-3 bytes 5) 3)
|
|
(set! (-> v1-3 bytes 6) 29)
|
|
(set! (-> v1-3 bytes 7) 30)
|
|
(set! (-> v1-3 bytes 8) 31)
|
|
(set! (-> v1-3 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-3) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(when (sig-under-method-264 arg1)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 27 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
(return #t)
|
|
)
|
|
(if (not (logtest? (-> arg1 bot-task-bits) (bot-task-bits botbits-4)))
|
|
(set-time! (-> arg1 waypoint-time0))
|
|
)
|
|
(when (and (not (logtest? (-> arg1 waypoint-bits) (waypoint-bits wabits-1)))
|
|
(time-elapsed? (-> arg1 waypoint-time0) (seconds 0.5))
|
|
(not (logtest? (-> arg1 focus-status) (focus-status in-air)))
|
|
)
|
|
(logior! (-> arg1 waypoint-bits) (waypoint-bits wabits-1))
|
|
(logior! (-> arg1 enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
|
)
|
|
(if (and (time-elapsed? (-> arg1 waypoint-time0) (seconds 1))
|
|
(not (speech-playing? arg1 21))
|
|
(not (channel-active? arg1 (gui-channel none)))
|
|
)
|
|
(play-speech arg1 21)
|
|
)
|
|
(when (zero? (-> arg1 next-chase-play-time))
|
|
(let ((a0-14 (-> arg1 actor-group 0 data 7 actor)))
|
|
(if (and a0-14 (logtest? (-> a0-14 extra perm status) (entity-perm-status subtask-complete)))
|
|
(set-time! (-> arg1 next-chase-play-time))
|
|
)
|
|
)
|
|
)
|
|
(when (and (outside-spot-radius? arg1 (the-as bot-spot #f) (the-as vector #f) #f)
|
|
(and (-> arg1 next-state) (let ((v1-54 (-> arg1 next-state name)))
|
|
(or (= v1-54 'waiting-far) (= v1-54 'waiting-close) (= v1-54 'waiting-turn))
|
|
)
|
|
)
|
|
(or (nonzero? (-> arg1 next-chase-play-time)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 6)))
|
|
)
|
|
(when (not (logtest? (-> arg1 waypoint-bits) (waypoint-bits wabits-0)))
|
|
(logior! (-> arg1 waypoint-bits) (waypoint-bits wabits-0))
|
|
(send-event (ppointer->process (-> arg1 my-simple-focus)) 'move-trans (-> arg1 sig5-course spots 32))
|
|
(set! (-> arg1 poi-handle) (ppointer->handle (-> arg1 my-simple-focus)))
|
|
)
|
|
(let ((v1-78 (-> arg1 sig5-course spots 32)))
|
|
(when (>= 10012.445
|
|
(fabs
|
|
(deg-
|
|
(atan (- (-> v1-78 center x) (-> arg1 root trans x)) (- (-> v1-78 center z) (-> arg1 root trans z)))
|
|
(quaternion-y-angle (-> arg1 root quat))
|
|
)
|
|
)
|
|
)
|
|
(let ((s4-1 (target-pos 0))
|
|
(s5-1 (-> arg1 sig5-course spots 32))
|
|
)
|
|
(when (or (zero? (-> arg1 next-chase-play-time))
|
|
(and (nonzero? (-> arg1 next-chase-play-time))
|
|
(time-elapsed? (-> arg1 next-chase-play-time) (seconds 2))
|
|
(or (time-elapsed? (-> arg1 next-chase-play-time) (seconds 9))
|
|
(>= (vector-vector-xz-distance s4-1 (-> s5-1 center)) (+ 8192.0 (-> s5-1 center w)))
|
|
(< 20480.0 (- (-> s4-1 y) (-> s5-1 center y)))
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg1 enemy-flags)
|
|
(the-as enemy-flag (logclear (-> arg1 enemy-flags) (enemy-flag jump-check-blocked)))
|
|
)
|
|
(when (send-event arg1 'jump 5 (-> s5-1 center))
|
|
(logclear! (-> arg1 enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
|
(if (not (channel-active? arg1 (gui-channel none)))
|
|
(play-speech arg1 22)
|
|
)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 26 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 26
|
|
:nav-mesh-index 9
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(add-process *gui-control* arg0 (gui-channel art-load) (gui-action queue) "under-get-sig-out-res" -99.0 0)
|
|
(send-event (ppointer->process (-> arg0 my-simple-focus)) 'move-trans (-> arg0 sig5-course spots 34))
|
|
(set! (-> arg0 poi-handle) (ppointer->handle (-> arg0 my-simple-focus)))
|
|
(let ((v1-15 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-15 bytes 5) 1)
|
|
(set! (-> v1-15 bytes 6) 33)
|
|
(set! (-> v1-15 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-15) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under))
|
|
(when (and (not (logtest? (-> arg1 waypoint-bits) (waypoint-bits wabits-0)))
|
|
(time-elapsed? (-> arg1 waypoint-time0) (seconds 0.5))
|
|
(not (logtest? (-> arg1 focus-status) (focus-status in-air)))
|
|
)
|
|
(logior! (-> arg1 waypoint-bits) (waypoint-bits wabits-0))
|
|
(logior! (-> arg1 enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
|
)
|
|
(cond
|
|
((sig-under-method-264 arg1)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 27 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
(else
|
|
(if (and (not (speech-playing? arg1 23))
|
|
(time-elapsed? (-> arg1 waypoint-time0) (seconds 3.5))
|
|
(not (channel-active? arg1 (gui-channel none)))
|
|
)
|
|
(play-speech arg1 23)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 27
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(remove-setting! 'music)
|
|
(stop-speech arg0 (the-as uint 0) #f)
|
|
(logclear! (-> arg0 enemy-flags) (enemy-flag vulnerable vulnerable-backup))
|
|
(let ((v1-8 (-> arg0 sig5-course spots 35)))
|
|
(set! (-> v1-8 center quad) (-> arg0 root trans quad))
|
|
(set! (-> v1-8 center w) 16384.0)
|
|
)
|
|
(let ((v1-11 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-11 bytes 5) 1)
|
|
(set! (-> v1-11 bytes 6) 35)
|
|
(set! (-> v1-11 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-11) check-done)
|
|
(the-as
|
|
(function sigt-wait-spot sig symbol)
|
|
(lambda ((arg0 object) (arg1 sig-under)) (when (scene-release? arg1)
|
|
(reset-warn-time! arg1)
|
|
(ai-task-control-method-12 (-> arg1 ai-ctrl) arg1)
|
|
(go-to-waypoint! arg1 28 #f)
|
|
(ai-task-control-method-10 (-> arg1 ai-ctrl) arg1)
|
|
#t
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
(new 'static 'bot-waypoint
|
|
:waypoint-id 28
|
|
:nav-mesh-index -1
|
|
:skip-to -1
|
|
:on-set (lambda ((arg0 sig-under))
|
|
(process-entity-status! arg0 (entity-perm-status bit-4) #f)
|
|
(process-entity-status! arg0 (entity-perm-status no-kill) #f)
|
|
(logclear! (-> arg0 enemy-flags) (enemy-flag cam-attack-mode))
|
|
(logclear! (-> arg0 bot-flags) (bot-flags bf06))
|
|
(bot-method-196 arg0)
|
|
(let ((v1-7 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0)))
|
|
(set! (-> v1-7 bytes 5) 1)
|
|
(set! (-> v1-7 bytes 6) 35)
|
|
(set! (-> v1-7 bytes 4) -1)
|
|
(set! (-> (the-as sigt-wait-spot v1-7) check-done)
|
|
(the-as (function sigt-wait-spot sig symbol) (lambda () #f))
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:on-update #f
|
|
:on-skipping-here #f
|
|
:check-too-far 'bot-check-too-far-always-okay
|
|
)
|
|
)
|
|
:speeches (new 'static 'inline-array bot-speech-info 30
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt082")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt056")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt046")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt047")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt083")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt087")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt060")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt062")
|
|
(new 'static 'bot-speech-info :hold-time #x21c :slave-id -1 :name "sigt068")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt061")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt070")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt069")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt059")
|
|
(new 'static 'bot-speech-info :flags (speech-flags sf01) :hold-time #x5a :slave-id -1 :name "sigt043")
|
|
(new 'static 'bot-speech-info :flags (speech-flags sf01) :hold-time #x5a :slave-id -1 :name "sigt044")
|
|
(new 'static 'bot-speech-info :flags (speech-flags sf01) :hold-time #x5a :slave-id -1 :name "sigt045")
|
|
(new 'static 'bot-speech-info :flags (speech-flags sf01) :hold-time #x5a :slave-id -1 :name "sigt053")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt091")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt065")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt066")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt067")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt075")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt108")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt103")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt072")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt073")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt074")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt076")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt077")
|
|
(new 'static 'bot-speech-info :hold-time #x5a :slave-id -1 :name "sigt078")
|
|
)
|
|
:speech-tunings (new 'static 'inline-array bot-speech-tuning 1
|
|
(new 'static 'bot-speech-tuning :fo-min 30 :fo-max #x78 :fo-curve 11 :trans? #t)
|
|
)
|
|
:spots (new 'static 'inline-array bot-spot 36
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -308019.2 :y -266199.03 :z 7887175.5 :w 8192.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -307036.16 :y -212992.0 :z 7998914.5 :w 4096.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -390389.75 :y -212992.0 :z 7958937.5 :w 4096.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -384000.0 :y -262144.0 :z 8051425.5 :w 12288.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -356638.72 :y -274432.0 :z 8130109.5 :w 14336.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -243343.36 :y -274391.03 :z 8183521.5 :w 14336.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -250470.4 :y -274391.03 :z 8217600.0 :w 14336.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -264601.6 :y -274145.28 :z 8243118.0 :w 14336.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -788848.6 :y -274432.0 :z 8396390.0 :w 14336.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -799170.56 :y -274432.0 :z 8391762.0 :w 14336.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -925736.94 :y -274432.0 :z 8324137.0 :w 15360.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -927580.2 :y -274432.0 :z 8278016.0 :w 15360.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -914350.06 :y -274432.0 :z 8265974.0 :w 15360.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -963911.7 :y -274432.0 :z 8239145.0 :w 9216.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -914350.06 :y -274432.0 :z 8265974.0 :w 8192.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -1017733.1 :y -278487.03 :z 8185446.5 :w 14336.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -1051934.8 :y -278487.03 :z 8145428.5 :w 14336.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -1204633.6 :y -216145.92 :z 8084193.5 :w 4096.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -1111695.4 :y -278487.03 :z 8137564.0 :w 14336.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -1148682.2 :y -278487.03 :z 8114503.5 :w 14336.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -1082736.6 :y -290775.03 :z 8085012.5 :w 14336.0))
|
|
(new 'static 'bot-spot
|
|
:center (new 'static 'vector :x -1049436.1 :y -290816.0 :z 8026562.5 :w 6144.0)
|
|
:blocked-xz-dist 6144.0
|
|
)
|
|
(new 'static 'bot-spot
|
|
:center (new 'static 'vector :x -1035591.7 :y -290816.0 :z 8032379.0 :w 6144.0)
|
|
:blocked-xz-dist 6144.0
|
|
)
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -971816.94 :y -290816.0 :z 7933378.5 :w 12288.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -993935.4 :y -290816.0 :z 7965040.5 :w 4096.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -982917.1 :y -290816.0 :z 7947387.0 :w 4096.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -743751.7 :y -290775.03 :z 7586201.5 :w 4096.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -762880.0 :y -289505.28 :z 7576125.5 :w 4096.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -762019.8 :y -339968.0 :z 7567155.0 :w 12288.0))
|
|
(new 'static 'bot-spot
|
|
:center (new 'static 'vector :x -754810.9 :y -339968.0 :z 7534715.0 :w 6144.0)
|
|
:blocked-xz-dist 7168.0
|
|
)
|
|
(new 'static 'bot-spot
|
|
:center (new 'static 'vector :x -746782.75 :y -339968.0 :z 7539343.5 :w 6144.0)
|
|
:blocked-xz-dist 7168.0
|
|
)
|
|
(new 'static 'bot-spot
|
|
:center (new 'static 'vector :x -735846.4 :y -339968.0 :z 7545651.0 :w 6144.0)
|
|
:blocked-xz-dist 7168.0
|
|
)
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -725278.75 :y -405504.0 :z 7510630.5 :w 12288.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -754810.9 :y -405504.0 :z 7487365.0 :w 17408.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :x -722984.94 :y -339968.0 :z 7535657.0 :w 4096.0))
|
|
(new 'static 'bot-spot :center (new 'static 'vector :w 16384.0))
|
|
)
|
|
:chase-speeches (new 'static 'bot-speech-list-shuffle
|
|
:flags #x8
|
|
:last-local-index -1
|
|
:speech-indexes (new 'static 'boxed-array :type int16 24 25 26 27 28 29)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(set! (-> *bot-course-table* course 13) *sig5-course*)
|