2020-10-26 21:08:24 -04:00
|
|
|
;;-*-Lisp-*-
|
2020-09-04 14:44:23 -04:00
|
|
|
(in-package goal)
|
2024-05-12 12:37:59 -04:00
|
|
|
(bundles "SNO.DGO")
|
|
|
|
|
|
|
|
(require "engine/game/task/task-control.gc")
|
|
|
|
(require "engine/common-obs/collectables.gc")
|
|
|
|
(require "engine/camera/pov-camera-h.gc")
|
|
|
|
(require "engine/util/sync-info.gc")
|
|
|
|
(require "engine/common-obs/baseplat.gc")
|
2020-09-04 14:44:23 -04:00
|
|
|
|
|
|
|
;; name: snow-obs.gc
|
|
|
|
;; name in dgo: snow-obs
|
|
|
|
;; dgos: L1, SNO
|
|
|
|
|
2021-12-28 23:16:42 -05:00
|
|
|
;; DECOMP BEGINS
|
2022-06-09 21:18:08 -04:00
|
|
|
|
2021-12-11 13:27:24 -05:00
|
|
|
(deftype snowcam (pov-camera)
|
2023-10-29 23:20:02 -04:00
|
|
|
((seq uint64)
|
2021-12-11 13:27:24 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
|
|
|
|
2022-05-19 21:30:14 -04:00
|
|
|
(defskelgroup *snowcam-sg* snowcam snowcam-lod0-jg -1
|
|
|
|
((snowcam-lod0-mg (meters 999999)))
|
|
|
|
:bounds (static-spherem 0 0 0 10)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod set-stack-size! ((this snowcam))
|
2023-09-26 10:17:00 -04:00
|
|
|
(stack-size-set! (-> this main-thread) 512)
|
2021-12-28 23:16:42 -05:00
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate pov-camera-playing (snowcam)
|
|
|
|
:virtual #t
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((v1-0 (-> self seq)))
|
|
|
|
(cond
|
|
|
|
((zero? v1-0)
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snowcam-gearstart-ja :num! (seek! max 0.2) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek! max 0.2))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snowcam-gate-ja :num! (seek! max 0.25) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek! max 0.25))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snowcam-gearend-ja :num! (seek!) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek!))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
(let ((gp-0 (current-time)))
|
|
|
|
(until (time-elapsed? gp-0 (seconds 4.5))
|
2021-12-28 23:16:42 -05:00
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
((= v1-0 1)
|
2022-06-09 21:18:08 -04:00
|
|
|
(let ((gp-2
|
|
|
|
(ppointer->handle
|
|
|
|
(process-spawn
|
|
|
|
fuel-cell
|
|
|
|
:init fuel-cell-init-as-clone
|
|
|
|
(process->handle self)
|
|
|
|
(-> self entity extra perm task)
|
|
|
|
:to (ppointer->process (-> self parent))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2022-06-12 12:23:08 -04:00
|
|
|
(add-setting! 'music-volume 'abs 0.0 0)
|
|
|
|
(add-setting! 'sfx-volume 'rel 50.0 0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(ja-play-spooled-anim
|
|
|
|
(the-as spool-anim (-> self anim-name))
|
|
|
|
(the-as art-joint-anim #f)
|
|
|
|
(the-as art-joint-anim #f)
|
|
|
|
(the-as (function process-drawable symbol) false-func)
|
|
|
|
)
|
2022-06-12 12:23:08 -04:00
|
|
|
(remove-setting! 'music-volume)
|
|
|
|
(remove-setting! 'sfx-volume)
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((a0-21 (handle->process gp-2)))
|
|
|
|
(if a0-21
|
|
|
|
(send-event a0-21 'stop-cloning)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
((= v1-0 2)
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snowcam-eggtop-activating-ja :num! (seek!) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek!))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(send-event (handle->process (-> self notify-handle)) 'notify 'cut)
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snowcam-ecovent-activating-ja :num! (seek!) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek!))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(else
|
|
|
|
(suspend)
|
|
|
|
0
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(go-virtual pov-camera-done-playing)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(deftype snow-eggtop (process-drawable)
|
2023-10-29 23:20:02 -04:00
|
|
|
((root collide-shape-moving :override)
|
|
|
|
(spawn-trans vector :inline)
|
|
|
|
(play-sound? symbol)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(:states
|
|
|
|
snow-eggtop-activate
|
|
|
|
snow-eggtop-idle-down
|
|
|
|
snow-eggtop-idle-up
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-05-19 21:30:14 -04:00
|
|
|
(defskelgroup *snow-eggtop-sg* snow-eggtop snow-eggtop-lod0-jg snow-eggtop-idle-ja
|
|
|
|
((snow-eggtop-lod0-mg (meters 999999)))
|
|
|
|
:bounds (static-spherem 0 0 0 4)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpartgroup group-snow-yellow-eco-room-open
|
|
|
|
:id 510
|
|
|
|
:bounds (static-bspherem 0 -6 0 8)
|
2022-06-09 21:18:08 -04:00
|
|
|
:parts ((sp-item 1990 :fade-after (meters 110))
|
2022-01-15 20:01:38 -05:00
|
|
|
(sp-item 1991 :fade-after (meters 110))
|
|
|
|
(sp-item 1992 :fade-after (meters 110))
|
|
|
|
(sp-item 1993 :fade-after (meters 110))
|
|
|
|
(sp-item 1994 :fade-after (meters 110))
|
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpartgroup group-snow-yellow-eco-room-activate
|
|
|
|
:id 511
|
2023-03-14 22:57:31 -04:00
|
|
|
:duration (seconds 3)
|
2022-01-15 20:01:38 -05:00
|
|
|
:bounds (static-bspherem 0 -6 0 8)
|
2023-04-29 11:01:47 -04:00
|
|
|
:parts ((sp-item 1994) (sp-item 1994) (sp-item 1995 :flags (bit1) :period (seconds 4) :length (seconds 0.05)))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1995
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :index #x2 :page #x2))
|
|
|
|
(:num 30.0)
|
|
|
|
(:y (meters -4))
|
|
|
|
(:scale-x (meters 20) (meters 10))
|
|
|
|
(:rot-x 4)
|
|
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
|
|
(:scale-y (meters 5) (meters 2))
|
|
|
|
(:r 127.0)
|
|
|
|
(:g 127.0)
|
|
|
|
(:b 0.0 16.0)
|
|
|
|
(:a 0.0)
|
|
|
|
(:rotvel-z (degrees -0.05) (degrees 0.1))
|
|
|
|
(:fade-a 0.85333335)
|
|
|
|
(:timer (seconds 2))
|
|
|
|
(:flags (bit2 bit3 left-multiply-quat))
|
|
|
|
(:next-time (seconds 0.25))
|
|
|
|
(:next-launcher 1996)
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1996
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:fade-a 0.0) (:next-time (seconds 0.75)) (:next-launcher 1997))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1997
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:fade-a -0.14222223))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1990
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :index #xf :page #x2))
|
|
|
|
(:num 1.0)
|
|
|
|
(:y (meters -4))
|
|
|
|
(:scale-x (meters 10) (meters 2))
|
|
|
|
(:scale-y (meters 8) (meters 2))
|
|
|
|
(:r 255.0)
|
|
|
|
(:g 255.0)
|
|
|
|
(:b 0.0 64.0)
|
|
|
|
(:a 128.0 128.0)
|
|
|
|
(:timer (seconds 0.017))
|
|
|
|
(:flags (bit2 bit3))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1991
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :index #xf :page #x2))
|
|
|
|
(:num 1.0)
|
|
|
|
(:y (meters -4))
|
|
|
|
(:scale-x (meters 3) (meters 2))
|
|
|
|
(:scale-y :copy scale-x)
|
|
|
|
(:r 128.0)
|
|
|
|
(:g 128.0)
|
|
|
|
(:b 128.0)
|
|
|
|
(:a 128.0 128.0)
|
|
|
|
(:timer (seconds 0.017))
|
|
|
|
(:flags (bit2 bit3))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1992
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :index #x1f :page #x2))
|
|
|
|
(:num 0.5 1.0)
|
|
|
|
(:y (meters -4))
|
|
|
|
(:scale-x (meters 3) (meters 3))
|
|
|
|
(:rot-x 4)
|
|
|
|
(:rot-z (degrees -30) (degrees 60))
|
|
|
|
(:scale-y (meters 0.7) (meters 0.4))
|
|
|
|
(:r 128.0)
|
|
|
|
(:g 128.0)
|
|
|
|
(:b 64.0)
|
|
|
|
(:a 128.0)
|
|
|
|
(:fade-a -1.6)
|
|
|
|
(:timer (seconds 0.3))
|
|
|
|
(:flags (bit2 bit3))
|
|
|
|
(:next-time (seconds 0.035))
|
|
|
|
(:next-launcher 1998)
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1998
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:r 64.0) (:g 64.0) (:fade-r -1.0) (:fade-g -1.0) (:fade-a -2.0))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1993
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :index #x1f :page #x2))
|
|
|
|
(:num 0.5 1.0)
|
|
|
|
(:y (meters -4))
|
|
|
|
(:scale-x (meters 3) (meters 3))
|
|
|
|
(:rot-x 4)
|
|
|
|
(:rot-z (degrees 150) (degrees 60))
|
|
|
|
(:scale-y (meters 0.7) (meters 0.4))
|
|
|
|
(:r 128.0)
|
|
|
|
(:g 128.0)
|
|
|
|
(:b 64.0)
|
|
|
|
(:a 128.0)
|
|
|
|
(:fade-a -1.6)
|
|
|
|
(:timer (seconds 0.3))
|
|
|
|
(:flags (bit2 bit3))
|
|
|
|
(:next-time (seconds 0.035))
|
|
|
|
(:next-launcher 1998)
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1994
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :index #x1f :page #x2))
|
|
|
|
(:num 1.0 1.0)
|
|
|
|
(:y (meters -6.5) (meters 1))
|
|
|
|
(:scale-x (meters 6) (meters 2))
|
|
|
|
(:rot-x 4)
|
|
|
|
(:rot-z (degrees -140) (degrees 100.00001))
|
|
|
|
(:scale-y (meters 0.7) (meters 0.4))
|
|
|
|
(:r 128.0)
|
|
|
|
(:g 128.0)
|
|
|
|
(:b 64.0)
|
|
|
|
(:a 128.0)
|
|
|
|
(:fade-a -1.6)
|
|
|
|
(:timer (seconds 0.3))
|
|
|
|
(:flags (bit2 bit3))
|
|
|
|
(:next-time (seconds 0.035))
|
|
|
|
(:next-launcher 1998)
|
|
|
|
(:conerot-x (degrees 90))
|
|
|
|
(:conerot-y (degrees 80) (degrees 200.00002))
|
|
|
|
(:conerot-radius (meters 4))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
|
|
|
(defstate snow-eggtop-idle-up (snow-eggtop)
|
2023-09-22 05:54:49 -04:00
|
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
|
|
(case message
|
|
|
|
(('notify)
|
|
|
|
(case (-> block param 0)
|
|
|
|
(('pickup)
|
|
|
|
(if (type-type? (-> proc type) fuel-cell)
|
|
|
|
(save-reminder (get-task-control (-> self entity extra perm task)) 1 4)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:trans (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(if (and (not (-> self child)) (task-complete? *game-info* (-> self entity extra perm task)))
|
|
|
|
(go snow-eggtop-activate)
|
|
|
|
)
|
2023-10-29 23:20:02 -04:00
|
|
|
(spawn (-> self part) (-> self root trans))
|
2021-12-28 23:16:42 -05:00
|
|
|
(update! (-> self sound))
|
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(ja-channel-push! 1 0)
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja :group! snow-eggtop-idle-ja :num! min)
|
2021-12-28 23:16:42 -05:00
|
|
|
(transform-post)
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask sleep-code))
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-eggtop-activate (snow-eggtop)
|
2023-09-22 05:54:49 -04:00
|
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
|
|
(case message
|
2021-12-28 23:16:42 -05:00
|
|
|
(('notify)
|
2023-03-14 22:57:31 -04:00
|
|
|
(when (= (-> proc type) snowcam)
|
2021-12-28 23:16:42 -05:00
|
|
|
(cond
|
2023-09-22 05:54:49 -04:00
|
|
|
((= (-> block param 0) 'die)
|
2021-12-28 23:16:42 -05:00
|
|
|
(if *target*
|
2023-07-08 02:34:38 -04:00
|
|
|
(+! (-> *target* control trans y) 1024.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(go snow-eggtop-idle-down)
|
|
|
|
)
|
2023-09-22 05:54:49 -04:00
|
|
|
((= (-> block param 0) 'cut)
|
2021-12-28 23:16:42 -05:00
|
|
|
(stop! (-> self sound))
|
|
|
|
(set! (-> self play-sound?) #f)
|
|
|
|
#f
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:enter (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(logclear! (-> self mask) (process-mask actor-pause))
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #t)
|
|
|
|
(set! (-> self play-sound?) #t)
|
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:exit (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(stop! (-> self sound))
|
|
|
|
(logior! (-> self mask) (process-mask actor-pause))
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #f)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:trans rider-trans
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
|
|
|
(process-spawn
|
|
|
|
part-tracker
|
|
|
|
:init part-tracker-init
|
|
|
|
(-> *part-group-id-table* 511)
|
|
|
|
-1
|
|
|
|
#f
|
|
|
|
#f
|
|
|
|
#f
|
2023-10-29 23:20:02 -04:00
|
|
|
(-> self root trans)
|
2022-06-09 21:18:08 -04:00
|
|
|
:to *entity-pool*
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
(let ((v1-7
|
|
|
|
(process-spawn
|
|
|
|
snowcam
|
|
|
|
:init pov-camera-init-by-other
|
|
|
|
(-> self spawn-trans)
|
|
|
|
*snowcam-sg*
|
|
|
|
"gearstart"
|
|
|
|
0
|
|
|
|
self
|
|
|
|
'((0 ambient camera "gamcam38") (10 alive "ecovent-278"))
|
|
|
|
:to self
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> (the-as snowcam (-> v1-7 0)) seq) (the-as uint 2))
|
|
|
|
)
|
|
|
|
(change-sound! (-> self sound) (static-sound-name "snw-eggtop-seq"))
|
|
|
|
(save-reminder (get-task-control (-> self entity extra perm task)) 2 4)
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snow-eggtop-idle-ja :num! (seek!) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(if (-> self play-sound?)
|
|
|
|
(update! (-> self sound))
|
|
|
|
)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek!))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(level-hint-spawn
|
2023-04-07 23:32:35 -04:00
|
|
|
(text-id snow-eggtop-resolution)
|
2021-12-28 23:16:42 -05:00
|
|
|
"sksp0360"
|
|
|
|
(the-as entity #f)
|
|
|
|
*entity-pool*
|
|
|
|
(game-task none)
|
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
(set-time! (-> self state-time))
|
|
|
|
(until (time-elapsed? (-> self state-time) (seconds 1.1))
|
2021-12-28 23:16:42 -05:00
|
|
|
(if (-> self play-sound?)
|
|
|
|
(update! (-> self sound))
|
|
|
|
)
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
(process-entity-status! self (entity-perm-status complete) #t)
|
|
|
|
(let ((a0-18 (-> self entity)))
|
|
|
|
(if (and a0-18 (= self (-> a0-18 extra process)))
|
|
|
|
(entity-task-complete-on a0-18)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(send-event (ppointer->process (-> *hud-parts* fuel-cell)) 'show)
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(if (-> self play-sound?)
|
|
|
|
(update! (-> self sound))
|
|
|
|
)
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:post rider-post
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-eggtop-idle-down (snow-eggtop)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(process-entity-status! self (entity-perm-status complete) #t)
|
|
|
|
(let ((a0-1 (-> self entity)))
|
|
|
|
(if (and a0-1 (= self (-> a0-1 extra process)))
|
|
|
|
(entity-task-complete-on a0-1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(ja-channel-push! 1 0)
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja :group! snow-eggtop-idle-ja :num! max)
|
2021-12-28 23:16:42 -05:00
|
|
|
(transform-post)
|
|
|
|
(logior! (-> self mask) (process-mask sleep-code))
|
|
|
|
(suspend)
|
|
|
|
0
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod init-from-entity! ((this snow-eggtop) (arg0 entity-actor))
|
2023-09-26 10:17:00 -04:00
|
|
|
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
|
|
|
|
(set! (-> s4-0 reaction) default-collision-reaction)
|
|
|
|
(set! (-> s4-0 no-reaction)
|
|
|
|
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
|
|
|
|
)
|
2022-01-12 10:47:17 -05:00
|
|
|
(alloc-riders s4-0 1)
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s3-0 prim-core collide-as) (collide-kind ground-object))
|
|
|
|
(set! (-> s3-0 collide-with) (collide-kind target))
|
2023-06-15 14:59:54 -04:00
|
|
|
(set! (-> s3-0 prim-core action) (collide-action solid rider-plat-sticky))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s3-0 prim-core offense) (collide-offense indestructible))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s3-0 transform-index) 4)
|
|
|
|
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 -7372.8 18022.4)
|
|
|
|
(set-root-prim! s4-0 s3-0)
|
|
|
|
)
|
|
|
|
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
|
|
|
(backup-collide-with-as s4-0)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this root) s4-0)
|
2023-09-26 10:17:00 -04:00
|
|
|
)
|
|
|
|
(process-drawable-from-entity! this arg0)
|
|
|
|
(initialize-skeleton this *snow-eggtop-sg* '())
|
|
|
|
(logior! (-> this skel status) (janim-status inited))
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this spawn-trans quad) (-> this root trans quad))
|
|
|
|
(+! (-> this root trans y) -2662.4)
|
|
|
|
(update-transforms! (-> this root))
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 510) this))
|
|
|
|
(set! (-> this sound)
|
2023-10-29 23:20:02 -04:00
|
|
|
(new 'process 'ambient-sound (static-sound-spec "electric-loop" :fo-max 40) (-> this root trans))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(cond
|
2023-09-26 10:17:00 -04:00
|
|
|
((task-complete? *game-info* (-> this entity extra perm task))
|
2021-12-28 23:16:42 -05:00
|
|
|
(go snow-eggtop-idle-down)
|
|
|
|
)
|
|
|
|
(else
|
|
|
|
(let ((a0-17 (new 'stack-no-clear 'vector)))
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> a0-17 quad) (-> this root trans quad))
|
2023-07-08 02:34:38 -04:00
|
|
|
(+! (-> a0-17 y) 3072.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(birth-pickup-at-point
|
|
|
|
a0-17
|
|
|
|
(pickup-type fuel-cell)
|
2023-09-26 10:17:00 -04:00
|
|
|
(the float (-> this entity extra perm task))
|
2021-12-28 23:16:42 -05:00
|
|
|
#f
|
2023-09-26 10:17:00 -04:00
|
|
|
this
|
2021-12-28 23:16:42 -05:00
|
|
|
(the-as fact-info #f)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(go snow-eggtop-idle-up)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(deftype snowpusher (process-drawable)
|
2023-10-29 23:20:02 -04:00
|
|
|
((root collide-shape-moving :override)
|
|
|
|
(max-frame float)
|
|
|
|
(open-sound sound-name)
|
|
|
|
(close-sound sound-name)
|
|
|
|
(sync sync-info-paused :inline)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(:states
|
|
|
|
snowpusher-idle
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-05-19 21:30:14 -04:00
|
|
|
(defskelgroup *snowpusher-sg* snowpusher snowpusher-lod0-jg snowpusher-idle-ja
|
|
|
|
((snowpusher-lod0-mg (meters 999999)))
|
|
|
|
:bounds (static-spherem 0 0 0 10)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
|
|
|
(defstate snowpusher-idle (snowpusher)
|
2023-09-22 05:54:49 -04:00
|
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
|
|
(case message
|
|
|
|
(('touch)
|
|
|
|
(send-event proc 'no-look-around (seconds 1.5))
|
|
|
|
#f
|
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((gp-0 #f))
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((f0-0 (get-current-phase-with-mirror (-> self sync))))
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num-func num-func-identity :frame-num (* f0-0 (-> self max-frame)))
|
2021-12-28 23:16:42 -05:00
|
|
|
(cond
|
|
|
|
((or (= f0-0 0.0) (= f0-0 1.0))
|
|
|
|
(set! gp-0 #f)
|
|
|
|
)
|
|
|
|
(else
|
|
|
|
(when (not gp-0)
|
|
|
|
(set! gp-0 #t)
|
|
|
|
(if (>= f0-0 0.5)
|
2022-06-13 18:39:22 -04:00
|
|
|
(sound-play-by-name (-> self close-sound) (new-sound-id) 1024 0 0 (sound-group sfx) #t)
|
|
|
|
(sound-play-by-name (-> self open-sound) (new-sound-id) 1024 0 0 (sound-group sfx) #t)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:post pusher-post
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod init-from-entity! ((this snowpusher) (arg0 entity-actor))
|
2021-12-28 23:16:42 -05:00
|
|
|
(local-vars (sv-16 res-tag))
|
2023-09-26 10:17:00 -04:00
|
|
|
(logior! (-> this mask) (process-mask enemy platform))
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((s3-0 0)
|
|
|
|
(s4-0 0)
|
|
|
|
)
|
|
|
|
(set! sv-16 (new 'static 'res-tag))
|
2023-09-26 10:17:00 -04:00
|
|
|
(let ((v1-3 (res-lump-data (-> this entity) 'mode (pointer int32) :tag-ptr (& sv-16))))
|
2021-12-28 23:16:42 -05:00
|
|
|
(when v1-3
|
|
|
|
(set! s3-0 (-> v1-3 0))
|
|
|
|
(set! s4-0 (-> v1-3 1))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(cond
|
|
|
|
((zero? s3-0)
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> this open-sound) (static-sound-name "snow-piston-opn"))
|
|
|
|
(set! (-> this close-sound) (static-sound-name "snow-piston-cls"))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
((= s3-0 1)
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> this open-sound) (static-sound-name "snow-pist-opn3"))
|
|
|
|
(set! (-> this close-sound) (static-sound-name "snow-pist-cls3"))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
((= s3-0 2)
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> this open-sound) (static-sound-name "snow-pist-opn2"))
|
|
|
|
(set! (-> this close-sound) (static-sound-name "snow-pist-cls2"))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
(let ((s3-1 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others))))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s3-1 dynam) (copy *standard-dynamics* 'process))
|
|
|
|
(set! (-> s3-1 reaction) default-collision-reaction)
|
|
|
|
(set! (-> s3-1 no-reaction)
|
|
|
|
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
|
|
|
|
)
|
|
|
|
(let ((s4-1 (new 'process 'collide-shape-prim-mesh s3-1 (the-as uint s4-0) (the-as uint 0))))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s4-1 prim-core collide-as) (collide-kind ground-object))
|
|
|
|
(set! (-> s4-1 collide-with) (collide-kind target))
|
2023-06-15 14:59:54 -04:00
|
|
|
(set! (-> s4-1 prim-core action) (collide-action solid rider-plat-sticky))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s4-1 prim-core offense) (collide-offense indestructible))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s4-1 transform-index) 3)
|
|
|
|
(set-vector! (-> s4-1 local-sphere) 0.0 20480.0 -12288.0 25600.0)
|
|
|
|
(set-root-prim! s3-1 s4-1)
|
|
|
|
)
|
|
|
|
(set! (-> s3-1 nav-radius) (* 0.75 (-> s3-1 root-prim local-sphere w)))
|
|
|
|
(backup-collide-with-as s3-1)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this root) s3-1)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
(process-drawable-from-entity! this arg0)
|
|
|
|
(initialize-skeleton this *snowpusher-sg* '())
|
|
|
|
(let ((s4-2 (-> this skel root-channel 0)))
|
2021-12-28 23:16:42 -05:00
|
|
|
(joint-control-channel-group-eval!
|
|
|
|
s4-2
|
2023-09-26 10:17:00 -04:00
|
|
|
(the-as art-joint-anim (-> this draw art-group data 2))
|
2021-12-28 23:16:42 -05:00
|
|
|
num-func-identity
|
|
|
|
)
|
|
|
|
(set! (-> s4-2 frame-num) 0.0)
|
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
(load-params! (-> this sync) this (the-as uint 1500) 0.0 0.15 0.15)
|
|
|
|
(set! (-> this max-frame) (* (the float (ja-num-frames 0)) (res-lump-float arg0 'max-frame :default 1.0)))
|
|
|
|
(logclear! (-> this mask) (process-mask actor-pause))
|
2021-12-28 23:16:42 -05:00
|
|
|
(go snowpusher-idle)
|
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(deftype snow-spatula (baseplat)
|
2023-10-29 23:20:02 -04:00
|
|
|
((sync sync-info :inline)
|
|
|
|
(startmat matrix :inline)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(:states
|
|
|
|
snow-spatula-idle
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-05-19 21:30:14 -04:00
|
|
|
(defskelgroup *snow-spatula-sg* snow-spatula snow-spatula-lod0-jg snow-spatula-idle-ja
|
|
|
|
((snow-spatula-lod0-mg (meters 999999)))
|
|
|
|
:bounds (static-spherem 0 10 0 10)
|
|
|
|
:longest-edge (meters 9.4)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
|
|
|
(defstate snow-spatula-idle (snow-spatula)
|
2023-09-22 05:54:49 -04:00
|
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
|
|
(case message
|
|
|
|
(('bonk)
|
|
|
|
(baseplat-method-22 self)
|
|
|
|
(sound-play "snow-spat-short" :vol 75 :pitch 0.75)
|
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:trans plat-trans
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((f28-0 0.0)
|
|
|
|
(gp-0 1)
|
|
|
|
)
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((f30-0 (get-current-phase-with-mirror (-> self sync))))
|
|
|
|
(when (!= f30-0 f28-0)
|
|
|
|
(let ((v1-3 1))
|
|
|
|
(if (< f30-0 f28-0)
|
|
|
|
(set! v1-3 -1)
|
|
|
|
)
|
|
|
|
(when (!= v1-3 gp-0)
|
|
|
|
(set! gp-0 v1-3)
|
|
|
|
(cond
|
|
|
|
((> v1-3 0)
|
2022-06-13 18:39:22 -04:00
|
|
|
(sound-play "snow-spat-long" :pitch (rand-vu-float-range -0.2 0.2))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(1
|
2022-06-13 18:39:22 -04:00
|
|
|
(sound-play "snow-spat-short" :pitch (rand-vu-float-range -0.2 0.2))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set! f28-0 f30-0)
|
|
|
|
)
|
|
|
|
(let ((s5-2 (new 'stack-no-clear 'matrix)))
|
|
|
|
(matrix-rotate-y! s5-2 (* 16384.0 f30-0))
|
|
|
|
(matrix*! s5-2 s5-2 (-> self startmat))
|
2023-10-29 23:20:02 -04:00
|
|
|
(matrix->quaternion (-> self root quat) s5-2)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:post plat-post
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod init-from-entity! ((this snow-spatula) (arg0 entity-actor))
|
2023-09-26 10:17:00 -04:00
|
|
|
(logior! (-> this mask) (process-mask platform))
|
|
|
|
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
|
|
|
|
(set! (-> s4-0 reaction) default-collision-reaction)
|
|
|
|
(set! (-> s4-0 no-reaction)
|
|
|
|
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
|
|
|
|
)
|
2022-01-12 10:47:17 -05:00
|
|
|
(alloc-riders s4-0 1)
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s3-0 prim-core collide-as) (collide-kind ground-object))
|
|
|
|
(set! (-> s3-0 collide-with) (collide-kind target))
|
2023-06-15 14:59:54 -04:00
|
|
|
(set! (-> s3-0 prim-core action) (collide-action solid rider-plat-sticky))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s3-0 prim-core offense) (collide-offense indestructible))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s3-0 transform-index) 3)
|
|
|
|
(set-vector! (-> s3-0 local-sphere) 0.0 49152.0 -16384.0 16384.0)
|
|
|
|
(set-root-prim! s4-0 s3-0)
|
|
|
|
)
|
|
|
|
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
|
|
|
(backup-collide-with-as s4-0)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this root) s4-0)
|
2023-09-26 10:17:00 -04:00
|
|
|
)
|
|
|
|
(process-drawable-from-entity! this arg0)
|
|
|
|
(initialize-skeleton this *snow-spatula-sg* '())
|
|
|
|
(logior! (-> this skel status) (janim-status inited))
|
|
|
|
(load-params! (-> this sync) this (the-as uint 1500) 0.0 0.15 0.15)
|
2023-10-29 23:20:02 -04:00
|
|
|
(quaternion->matrix (-> this startmat) (-> this root quat))
|
2023-09-26 10:17:00 -04:00
|
|
|
(baseplat-method-21 this)
|
2021-12-28 23:16:42 -05:00
|
|
|
(go snow-spatula-idle)
|
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(deftype snow-fort-gate (process-drawable)
|
2023-10-29 23:20:02 -04:00
|
|
|
((root collide-shape :override)
|
|
|
|
(part2 sparticle-launch-control)
|
|
|
|
(part3 sparticle-launch-control)
|
|
|
|
(open-trans vector :inline)
|
|
|
|
(closed-trans vector :inline)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(:states
|
|
|
|
snow-fort-gate-activate
|
|
|
|
snow-fort-gate-idle-closed
|
|
|
|
snow-fort-gate-idle-open
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-05-19 21:30:14 -04:00
|
|
|
(defskelgroup *snow-fort-gate-sg* snow-fort-gate snow-fort-gate-lod0-jg -1
|
|
|
|
((snow-fort-gate-lod0-mg (meters 999999)))
|
|
|
|
:bounds (static-spherem 0 15 0 24)
|
|
|
|
:longest-edge (meters 12.8)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpartgroup group-snow-fort-gate-coming-down
|
|
|
|
:id 512
|
|
|
|
:flags (use-local-clock)
|
|
|
|
:bounds (static-bspherem 0 0 0 8)
|
2022-06-09 21:18:08 -04:00
|
|
|
:parts ((sp-item 1896))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1896
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :page #x2))
|
|
|
|
(:num 0.5 1.0)
|
|
|
|
(:x (meters -10) (meters 20))
|
|
|
|
(:y (meters 0.5) (meters 1))
|
|
|
|
(:scale-x (meters 10.5) (meters 8.5))
|
|
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
|
|
(:scale-y :copy scale-x)
|
|
|
|
(:r 96.0)
|
|
|
|
(:g 96.0)
|
|
|
|
(:b 96.0 16.0)
|
|
|
|
(:a 0.0)
|
|
|
|
(:vel-x (meters -0.026666667) (meters 0.053333335))
|
|
|
|
(:vel-z (meters -0.053333335) (meters 0.053333335))
|
|
|
|
(:rotvel-z (degrees -0.4) (degrees 0.8))
|
|
|
|
(:fade-a 0.42666668)
|
|
|
|
(:accel-y (meters -0.00066666666))
|
|
|
|
(:friction 0.98)
|
|
|
|
(:timer (seconds 1.5))
|
|
|
|
(:flags (bit2))
|
|
|
|
(:next-time (seconds 0.25) (seconds 0.247))
|
|
|
|
(:next-launcher 1897)
|
|
|
|
(:rotate-y (degrees 0))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1897
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:fade-a -0.21333334))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpartgroup group-snow-fort-gate-hits-bottom
|
|
|
|
:id 513
|
|
|
|
:flags (use-local-clock)
|
|
|
|
:bounds (static-bspherem 0 0 0 8)
|
2022-06-09 21:18:08 -04:00
|
|
|
:parts ((sp-item 1898))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1898
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :page #x2))
|
|
|
|
(:num 64.0)
|
|
|
|
(:x (meters -10) (meters 20))
|
|
|
|
(:y (meters 0.5) (meters 1))
|
|
|
|
(:z (meters -3))
|
|
|
|
(:scale-x (meters 4) (meters 8))
|
|
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
|
|
(:scale-y :copy scale-x)
|
|
|
|
(:r 128.0)
|
|
|
|
(:g 128.0)
|
|
|
|
(:b 128.0 16.0)
|
|
|
|
(:a 0.0)
|
|
|
|
(:vel-x (meters -0.013333334) (meters 0.026666667))
|
|
|
|
(:vel-z (meters -0.053333335) (meters 0.046666667))
|
|
|
|
(:rotvel-z (degrees -0.4) (degrees 0.8))
|
|
|
|
(:fade-a 0.42666668)
|
|
|
|
(:accel-y (meters -0.00016666666))
|
|
|
|
(:friction 0.98)
|
|
|
|
(:timer (seconds 2.5))
|
|
|
|
(:flags (bit2))
|
|
|
|
(:next-time (seconds 0.25) (seconds 0.247))
|
|
|
|
(:next-launcher 1899)
|
|
|
|
(:rotate-y (degrees 0))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1899
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:fade-a -0.10666667))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpartgroup group-snow-fort-gate-snowdrops
|
|
|
|
:id 514
|
|
|
|
:bounds (static-bspherem 0 -16 0 32)
|
2023-04-29 11:01:47 -04:00
|
|
|
:parts ((sp-item 2271 :fade-after (meters 100) :falloff-to (meters 130) :period (seconds 4) :length (seconds 0.5))
|
|
|
|
(sp-item 2271 :fade-after (meters 100) :falloff-to (meters 130) :period (seconds 4) :length (seconds 0.335))
|
|
|
|
(sp-item 2271 :fade-after (meters 100) :falloff-to (meters 130) :period (seconds 4) :length (seconds 0.2))
|
|
|
|
(sp-item 2271 :fade-after (meters 100) :falloff-to (meters 130) :period (seconds 4) :length (seconds 0.1))
|
|
|
|
(sp-item 2271 :fade-after (meters 100) :falloff-to (meters 130) :period (seconds 4) :length (seconds 0.035))
|
|
|
|
(sp-item 2272 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 4) :length (seconds 0.667))
|
|
|
|
(sp-item 2272 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 4) :length (seconds 0.5))
|
|
|
|
(sp-item 2272 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 4) :length (seconds 0.335))
|
|
|
|
(sp-item 2272 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 4) :length (seconds 0.167))
|
|
|
|
(sp-item 2272 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 4) :length (seconds 0.067))
|
|
|
|
(sp-item 2273 :fade-after (meters 80) :falloff-to (meters 80) :period (seconds 4) :length (seconds 0.57))
|
|
|
|
(sp-item 2273 :fade-after (meters 80) :falloff-to (meters 80) :period (seconds 4) :length (seconds 0.385))
|
|
|
|
(sp-item 2273 :fade-after (meters 80) :falloff-to (meters 80) :period (seconds 4) :length (seconds 0.235))
|
|
|
|
(sp-item 2273 :fade-after (meters 80) :falloff-to (meters 80) :period (seconds 4) :length (seconds 0.117))
|
|
|
|
(sp-item 2273 :fade-after (meters 80) :falloff-to (meters 80) :period (seconds 4) :length (seconds 0.035))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 2271
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :index #x4 :page #x2))
|
|
|
|
(:num 0.25)
|
|
|
|
(:x (meters -1) (meters 2))
|
|
|
|
(:z (meters -1) (meters 2))
|
|
|
|
(:scale-x (meters 0.5) (meters 0.5))
|
|
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
|
|
(:scale-y (meters 0.5) (meters 0.25))
|
|
|
|
(:r 150.0)
|
|
|
|
(:g 150.0)
|
|
|
|
(:b 150.0 55.0)
|
|
|
|
(:a 128.0)
|
|
|
|
(:vel-y (meters -0.006666667))
|
|
|
|
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
|
|
|
(:accel-y (meters -0.00066666666) (meters -0.00033333333))
|
|
|
|
(:timer (seconds 3))
|
|
|
|
(:flags (bit2 bit12))
|
|
|
|
(:next-time (seconds 2))
|
|
|
|
(:next-launcher 2274)
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 2274
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:fade-a -0.42666668))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 2272
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :index #x4 :page #x2))
|
|
|
|
(:num 1.0)
|
|
|
|
(:x (meters -0.5) (meters 1))
|
|
|
|
(:y (meters 1))
|
|
|
|
(:z (meters -0.5) (meters 1))
|
|
|
|
(:scale-x (meters 0.25) (meters 0.25))
|
|
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
|
|
(:scale-y (meters 0.25) (meters 0.1))
|
|
|
|
(:r 150.0)
|
|
|
|
(:g 150.0)
|
|
|
|
(:b 150.0 55.0)
|
|
|
|
(:a 96.0 32.0)
|
|
|
|
(:vel-y (meters -0.006666667))
|
|
|
|
(:rotvel-z (degrees -0.2) (degrees 0.4))
|
|
|
|
(:accel-y (meters -0.0005) (meters -0.00033333333))
|
|
|
|
(:timer (seconds 3))
|
|
|
|
(:flags (bit2 bit12))
|
|
|
|
(:next-time (seconds 2))
|
|
|
|
(:next-launcher 2274)
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 2273
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :index #xb :page #x2))
|
|
|
|
(:num 0.25)
|
|
|
|
(:x (meters -0.5) (meters 1))
|
|
|
|
(:y (meters 1))
|
|
|
|
(:z (meters -0.5) (meters 1))
|
|
|
|
(:scale-x (meters 1) (meters 0.25))
|
|
|
|
(:scale-y (meters 2.5) (meters 1))
|
|
|
|
(:r 150.0)
|
|
|
|
(:g 150.0)
|
|
|
|
(:b 150.0 55.0)
|
|
|
|
(:a 32.0 96.0)
|
|
|
|
(:vel-y (meters -0.006666667))
|
|
|
|
(:fade-a -0.14222223)
|
|
|
|
(:accel-y (meters -0.0005) (meters -0.00033333333))
|
|
|
|
(:timer (seconds 3))
|
|
|
|
(:flags (bit2 bit12))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
|
|
|
(defstate snow-fort-gate-idle-closed (snow-fort-gate)
|
2023-09-22 05:54:49 -04:00
|
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
|
|
(case message
|
2021-12-28 23:16:42 -05:00
|
|
|
(('notice)
|
|
|
|
(go snow-fort-gate-activate)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:trans (behavior ()
|
2023-10-29 23:20:02 -04:00
|
|
|
(when (and *target* (>= 61440.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
|
2023-04-07 23:32:35 -04:00
|
|
|
(level-hint-spawn (text-id snow-fort-hint) "sksp0345" (the-as entity #f) *entity-pool* (game-task none))
|
2021-12-28 23:16:42 -05:00
|
|
|
(close-specific-task! (game-task snow-fort) (task-status need-hint))
|
|
|
|
)
|
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja :group! snow-fort-gate-idle-ja :num! min)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> self root trans quad) (-> self closed-trans quad))
|
2021-12-28 23:16:42 -05:00
|
|
|
(transform-post)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask sleep-code))
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-fort-gate-activate (snow-fort-gate)
|
2022-06-09 21:18:08 -04:00
|
|
|
:enter (behavior ()
|
2022-01-08 20:57:57 -05:00
|
|
|
(logclear! (-> self mask) (process-mask actor-pause))
|
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:exit (behavior ()
|
2022-01-08 20:57:57 -05:00
|
|
|
(stop! (-> self sound))
|
|
|
|
(logior! (-> self mask) (process-mask actor-pause))
|
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((gp-0 #f))
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((a1-0 (new 'stack-no-clear 'vector)))
|
|
|
|
(set! (-> a1-0 quad) (-> self closed-trans quad))
|
2023-07-08 02:34:38 -04:00
|
|
|
(+! (-> a1-0 y) -12288.0)
|
|
|
|
(+! (-> a1-0 z) -12288.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(spawn (-> self part) a1-0)
|
|
|
|
)
|
|
|
|
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> s5-0 quad) (-> self root trans quad))
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((f30-0 (vector-vector-distance-squared s5-0 (-> self open-trans))))
|
|
|
|
(when (and (not gp-0) (>= 1048576.0 f30-0))
|
|
|
|
(set! gp-0 #t)
|
|
|
|
(let ((a1-2 (new 'stack-no-clear 'vector)))
|
|
|
|
(set! (-> a1-2 quad) (-> self open-trans quad))
|
2023-07-08 02:34:38 -04:00
|
|
|
(+! (-> a1-2 y) -26624.0)
|
|
|
|
(+! (-> a1-2 z) -3072.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(spawn (-> self part2) a1-2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(when (>= 1677.7216 f30-0)
|
2022-06-13 18:39:22 -04:00
|
|
|
(sound-play "lodge-close")
|
2021-12-28 23:16:42 -05:00
|
|
|
(activate! *camera-smush-control* 819.2 37 150 1.0 0.99)
|
|
|
|
(go snow-fort-gate-idle-open)
|
|
|
|
)
|
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
(vector-seek-3d-smooth! s5-0 (-> self open-trans) (* 16384.0 (seconds-per-frame)) 0.9)
|
2023-10-29 23:20:02 -04:00
|
|
|
(move-to-point! (-> self root) s5-0)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(let ((a1-7 (new 'stack-no-clear 'vector)))
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> a1-7 quad) (-> self root trans quad))
|
2023-07-08 02:34:38 -04:00
|
|
|
(+! (-> a1-7 x) 20480.0)
|
|
|
|
(+! (-> a1-7 y) 106496.0)
|
|
|
|
(+! (-> a1-7 z) -32768.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(spawn (-> self part3) a1-7)
|
|
|
|
)
|
|
|
|
(update! (-> self sound))
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:post transform-post
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-fort-gate-idle-open (snow-fort-gate)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja :group! snow-fort-gate-idle-ja :num! min)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> self root trans quad) (-> self open-trans quad))
|
2021-12-28 23:16:42 -05:00
|
|
|
(transform-post)
|
|
|
|
(suspend)
|
|
|
|
(transform-post)
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask sleep-code))
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod deactivate ((this snow-fort-gate))
|
2023-09-26 10:17:00 -04:00
|
|
|
(if (nonzero? (-> this part2))
|
|
|
|
(kill-and-free-particles (-> this part2))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
(if (nonzero? (-> this part3))
|
|
|
|
(kill-and-free-particles (-> this part3))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
((method-of-type process-drawable deactivate) this)
|
2021-12-28 23:16:42 -05:00
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod relocate ((this snow-fort-gate) (arg0 int))
|
2023-09-26 10:17:00 -04:00
|
|
|
(if (nonzero? (-> this part2))
|
|
|
|
(&+! (-> this part2) arg0)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
(if (nonzero? (-> this part3))
|
|
|
|
(&+! (-> this part3) arg0)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-09-30 11:06:09 -04:00
|
|
|
(call-parent-method this arg0)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod init-from-entity! ((this snow-fort-gate) (arg0 entity-actor))
|
2023-09-26 10:17:00 -04:00
|
|
|
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-others))))
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s3-0 prim-core collide-as) (collide-kind ground-object))
|
|
|
|
(set! (-> s3-0 collide-with) (collide-kind target))
|
|
|
|
(set! (-> s3-0 prim-core action) (collide-action solid))
|
|
|
|
(set! (-> s3-0 prim-core offense) (collide-offense indestructible))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s3-0 transform-index) 0)
|
|
|
|
(set-vector! (-> s3-0 local-sphere) 0.0 61440.0 0.0 99123.2)
|
|
|
|
(set-root-prim! s4-0 s3-0)
|
|
|
|
)
|
|
|
|
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
|
|
|
(backup-collide-with-as s4-0)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this root) s4-0)
|
2023-09-26 10:17:00 -04:00
|
|
|
)
|
|
|
|
(process-drawable-from-entity! this arg0)
|
|
|
|
(initialize-skeleton this *snow-fort-gate-sg* '())
|
|
|
|
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 512) this))
|
|
|
|
(set! (-> this part2) (create-launch-control (-> *part-group-id-table* 513) this))
|
|
|
|
(set! (-> this part3) (create-launch-control (-> *part-group-id-table* 514) this))
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this open-trans quad) (-> this root trans quad))
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> this closed-trans quad) (-> this open-trans quad))
|
|
|
|
(+! (-> this open-trans y) -141312.0)
|
|
|
|
(+! (-> this open-trans z) 32768.0)
|
|
|
|
(set! (-> this sound)
|
|
|
|
(new 'process 'ambient-sound (static-sound-spec "lodge-door-mov" :fo-max 80) (-> this open-trans))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(ja-channel-push! 1 0)
|
2023-09-26 10:17:00 -04:00
|
|
|
(let ((s5-1 (-> this skel root-channel 0)))
|
2021-12-28 23:16:42 -05:00
|
|
|
(joint-control-channel-group-eval!
|
|
|
|
s5-1
|
2023-09-26 10:17:00 -04:00
|
|
|
(the-as art-joint-anim (-> this draw art-group data 2))
|
2021-12-28 23:16:42 -05:00
|
|
|
num-func-identity
|
|
|
|
)
|
|
|
|
(set! (-> s5-1 frame-num) 0.0)
|
|
|
|
)
|
|
|
|
(cond
|
|
|
|
((task-complete? *game-info* (game-task snow-ball))
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this root trans quad) (-> this open-trans quad))
|
2021-12-28 23:16:42 -05:00
|
|
|
(transform-post)
|
|
|
|
(go snow-fort-gate-idle-open)
|
|
|
|
)
|
|
|
|
(else
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this root trans quad) (-> this closed-trans quad))
|
2021-12-28 23:16:42 -05:00
|
|
|
(transform-post)
|
|
|
|
(go snow-fort-gate-idle-closed)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(deftype snow-gears (process-drawable)
|
|
|
|
()
|
|
|
|
(:methods
|
2023-10-29 23:20:02 -04:00
|
|
|
(snow-gears-method-20 (_type_) none)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(:states
|
|
|
|
snow-gears-activate
|
|
|
|
snow-gears-halt
|
|
|
|
snow-gears-idle
|
|
|
|
snow-gears-stopped
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-05-19 21:30:14 -04:00
|
|
|
(defskelgroup *snow-gears-sg* snow-gears snow-gears-lod0-jg snow-gears-idle-ja
|
|
|
|
((snow-gears-lod0-mg (meters 999999)))
|
|
|
|
:bounds (static-spherem 0 0 0 60)
|
|
|
|
:longest-edge (meters 12.1)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpartgroup group-snow-gears-dripping
|
|
|
|
:id 515
|
|
|
|
:flags (use-local-clock)
|
|
|
|
:bounds (static-bspherem 0 -4 0 16)
|
2022-06-09 21:18:08 -04:00
|
|
|
:parts ((sp-item 1900) (sp-item 1901))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1900
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :index #x1d :page #x2))
|
|
|
|
(:num 0.5)
|
|
|
|
(:x (meters -9) (meters 18))
|
|
|
|
(:y (meters -6))
|
|
|
|
(:z (meters -9) (meters 18))
|
|
|
|
(:scale-x (meters 0.1) (meters 0.5))
|
|
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
|
|
(:scale-y :copy scale-x)
|
|
|
|
(:r 32.0 40.0)
|
|
|
|
(:g 32.0 40.0)
|
|
|
|
(:b 32.0 40.0)
|
|
|
|
(:a 128.0)
|
|
|
|
(:vel-y (meters 0) (meters -0.04))
|
|
|
|
(:rotvel-z (degrees -0.3) (degrees 0.6))
|
|
|
|
(:accel-y (meters -0.0016666667) (meters -0.00016666666))
|
|
|
|
(:timer (seconds 1.3))
|
|
|
|
(:flags (bit2))
|
|
|
|
(:userdata 0.0)
|
|
|
|
(:func 'check-water-level-drop)
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1901
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:texture (new 'static 'texture-id :page #x2))
|
|
|
|
(:num 1.0)
|
|
|
|
(:y (meters -7))
|
|
|
|
(:scale-x (meters 3) (meters 4.5))
|
|
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
|
|
(:scale-y :copy scale-x)
|
|
|
|
(:r 64.0 16.0)
|
|
|
|
(:g 64.0)
|
|
|
|
(:b 64.0)
|
|
|
|
(:a 0.0)
|
|
|
|
(:vel-y (meters 0) (meters 0.006666667))
|
|
|
|
(:rotvel-z (degrees -0.3) (degrees 0.6))
|
|
|
|
(:fade-a 1.0666667)
|
|
|
|
(:accel-y (meters 0.000016666667))
|
|
|
|
(:timer (seconds 4))
|
|
|
|
(:flags (bit2 bit12))
|
|
|
|
(:next-time (seconds 0.2))
|
|
|
|
(:next-launcher 1902)
|
|
|
|
(:conerot-x (degrees 90) (degrees 10))
|
|
|
|
(:conerot-y (degrees 0) (degrees 360))
|
|
|
|
(:conerot-radius (meters 3.5) (meters 6))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1902
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:fade-a 0.0) (:next-time (seconds 1.5) (seconds 0.797)) (:next-launcher 1903))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2022-01-15 20:01:38 -05:00
|
|
|
(defpart 1903
|
2023-04-29 11:01:47 -04:00
|
|
|
:init-specs ((:fade-a -0.14222223))
|
2022-01-15 20:01:38 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod snow-gears-method-20 ((this snow-gears))
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((a1-0 (new 'stack-no-clear 'vector)))
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> a1-0 quad) (-> this root trans quad))
|
2023-07-08 02:34:38 -04:00
|
|
|
(+! (-> a1-0 y) 61440.0)
|
2023-09-26 10:17:00 -04:00
|
|
|
(spawn (-> this part) a1-0)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-gears-idle (snow-gears)
|
2023-09-22 05:54:49 -04:00
|
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
|
|
(case message
|
2021-12-28 23:16:42 -05:00
|
|
|
(('notice)
|
|
|
|
(logclear! (-> self mask) (process-mask actor-pause))
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #t)
|
|
|
|
(go snow-gears-activate)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja :group! snow-gears-idle-ja :num! min)
|
2021-12-28 23:16:42 -05:00
|
|
|
(ja-post)
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask sleep-code))
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-gears-activate (snow-gears)
|
2022-06-09 21:18:08 -04:00
|
|
|
:trans (behavior ()
|
2023-04-05 18:41:05 -04:00
|
|
|
(snow-gears-method-20 self)
|
2022-01-08 20:57:57 -05:00
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2022-06-13 18:39:22 -04:00
|
|
|
(sound-play "eng-start-up")
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snow-gears-start-ja :num! (seek! max 0.85) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek! max 0.85))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snow-gears-loop-ja :num! (seek! max 0.35) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(update! (-> self sound))
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek! max 0.35))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
(set-time! (-> self state-time))
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja :group! snow-gears-idle-ja :num! min)
|
2023-09-26 10:17:00 -04:00
|
|
|
(until (time-elapsed? (-> self state-time) (seconds 2))
|
2021-12-28 23:16:42 -05:00
|
|
|
(update! (-> self sound))
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
(go snow-gears-halt)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:post ja-post
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-gears-halt (snow-gears)
|
2022-06-09 21:18:08 -04:00
|
|
|
:exit (behavior ()
|
2022-01-08 20:57:57 -05:00
|
|
|
(stop! (-> self sound))
|
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:trans (behavior ()
|
2023-04-05 18:41:05 -04:00
|
|
|
(snow-gears-method-20 self)
|
2022-01-08 20:57:57 -05:00
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snow-gears-loop-ja :num! (seek! max 0.35) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(update! (-> self sound))
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek! max 0.35))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(stop! (-> self sound))
|
2022-06-13 18:39:22 -04:00
|
|
|
(sound-play "eng-shut-down")
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snow-gears-stop-ja :num! (seek! max 0.85) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek! max 0.85))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(go snow-gears-stopped)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:post ja-post
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-gears-stopped (snow-gears)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask actor-pause))
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #f)
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask sleep-code))
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod init-from-entity! ((this snow-gears) (arg0 entity-actor))
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> this root) (new 'process 'trsqv))
|
|
|
|
(process-drawable-from-entity! this arg0)
|
|
|
|
(initialize-skeleton this *snow-gears-sg* '())
|
|
|
|
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 515) this))
|
|
|
|
(set! (-> this sound)
|
|
|
|
(new 'process 'ambient-sound (static-sound-spec "snow-engine" :fo-max 300) (-> this root trans))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(go snow-gears-idle)
|
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(deftype snow-switch (process-drawable)
|
2023-10-29 23:20:02 -04:00
|
|
|
((root collide-shape-moving :override)
|
|
|
|
(pressed? symbol)
|
|
|
|
(fcell-handle handle)
|
|
|
|
(orig-trans vector :inline)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(:states
|
|
|
|
snow-switch-activate
|
|
|
|
snow-switch-idle-down
|
|
|
|
snow-switch-idle-up
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-05-19 21:30:14 -04:00
|
|
|
(defskelgroup *snow-switch-sg* snow-switch snow-switch-lod0-jg snow-switch-idle-ja
|
|
|
|
((snow-switch-lod0-mg (meters 999999)))
|
|
|
|
:bounds (static-spherem 0 0 0 2)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
|
|
|
(defbehavior snow-switch-event-handler snow-switch ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
|
|
|
(local-vars (v0-0 object))
|
|
|
|
(case arg2
|
|
|
|
(('notify)
|
|
|
|
(cond
|
|
|
|
((= (-> arg0 type) fuel-cell)
|
|
|
|
(when (= (-> arg3 param 0) 'pickup)
|
|
|
|
(set! (-> self pressed?) #t)
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #t)
|
|
|
|
(logclear! (-> self mask) (process-mask actor-pause))
|
|
|
|
(go snow-switch-activate)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
((= (-> arg0 type) snowcam)
|
|
|
|
(if (= (-> arg3 param 0) 'die)
|
|
|
|
(go snow-switch-idle-down)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(('query)
|
|
|
|
(return (-> self pressed?))
|
|
|
|
v0-0
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-switch-idle-up (snow-switch)
|
2022-06-09 21:18:08 -04:00
|
|
|
:event snow-switch-event-handler
|
|
|
|
:code (behavior ()
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask sleep-code))
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-switch-activate (snow-switch)
|
2022-06-09 21:18:08 -04:00
|
|
|
:event snow-switch-event-handler
|
|
|
|
:exit (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #f)
|
|
|
|
(logior! (-> self mask) (process-mask actor-pause))
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:trans rider-trans
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(local-vars (v1-1 symbol))
|
|
|
|
(until v1-1
|
|
|
|
(suspend)
|
2023-03-14 22:57:31 -04:00
|
|
|
(set! v1-1 (or (not *target*) (not (logtest? (-> *target* state-flags) (state-flags grabbed)))))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2022-06-13 18:39:22 -04:00
|
|
|
(sound-play "prec-button1" :pitch -1)
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((gp-1 (get-process *default-dead-pool* snowcam #x4000)))
|
|
|
|
(set! (-> (the-as snowcam (-> (when gp-1
|
2022-01-08 20:57:57 -05:00
|
|
|
(let ((t9-3 (method-of-type snowcam activate)))
|
|
|
|
(t9-3 (the-as snowcam gp-1) self 'snowcam (the-as pointer #x70004000))
|
|
|
|
)
|
|
|
|
(run-now-in-process
|
|
|
|
gp-1
|
|
|
|
pov-camera-init-by-other
|
|
|
|
(new 'static 'vector :x 3411656.8 :y 779689.56 :z -13573010.0 :w 1.0)
|
|
|
|
*snowcam-sg*
|
|
|
|
"gearstart"
|
|
|
|
0
|
|
|
|
self
|
|
|
|
'()
|
|
|
|
)
|
|
|
|
(-> gp-1 ppointer)
|
|
|
|
)
|
|
|
|
0
|
|
|
|
)
|
|
|
|
)
|
|
|
|
seq
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
(the-as uint 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
0
|
|
|
|
(let ((gp-2 #f))
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((s5-1 (new 'stack-no-clear 'vector))
|
|
|
|
(f0-1 (+ -1433.6 (-> self orig-trans y)))
|
|
|
|
)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> s5-1 quad) (-> self root trans quad))
|
2021-12-28 23:16:42 -05:00
|
|
|
(cond
|
|
|
|
((= (-> s5-1 y) f0-1)
|
|
|
|
(when (not gp-2)
|
|
|
|
(set! gp-2 #t)
|
|
|
|
(send-to-all (-> self link) 'notice)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(else
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> s5-1 y) (seek-with-smooth (-> self root trans y) f0-1 (* 6144.0 (seconds-per-frame)) 0.2 204.8))
|
|
|
|
(move-to-point! (-> self root) s5-1)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:post rider-post
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-switch-idle-down (snow-switch)
|
2022-06-09 21:18:08 -04:00
|
|
|
:event snow-switch-event-handler
|
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> self pressed?) #t)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> self root trans quad) (-> self orig-trans quad))
|
|
|
|
(+! (-> self root trans y) -1433.6)
|
2021-12-28 23:16:42 -05:00
|
|
|
(transform-post)
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask sleep-code))
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod init-from-entity! ((this snow-switch) (arg0 entity-actor))
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> this pressed?) #f)
|
|
|
|
(set! (-> this fcell-handle) (the-as handle #f))
|
|
|
|
(set! (-> this link) (new 'process 'actor-link-info this))
|
|
|
|
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
|
|
|
|
(set! (-> s4-0 reaction) default-collision-reaction)
|
|
|
|
(set! (-> s4-0 no-reaction)
|
|
|
|
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
|
|
|
|
)
|
2022-01-12 10:47:17 -05:00
|
|
|
(alloc-riders s4-0 1)
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s3-0 prim-core collide-as) (collide-kind ground-object))
|
|
|
|
(set! (-> s3-0 collide-with) (collide-kind target))
|
2023-06-15 14:59:54 -04:00
|
|
|
(set! (-> s3-0 prim-core action) (collide-action solid rider-plat-sticky))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s3-0 prim-core offense) (collide-offense indestructible))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s3-0 transform-index) 3)
|
|
|
|
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 8192.0)
|
|
|
|
(set-root-prim! s4-0 s3-0)
|
|
|
|
)
|
|
|
|
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
|
|
|
(backup-collide-with-as s4-0)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this root) s4-0)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
(process-drawable-from-entity! this arg0)
|
|
|
|
(initialize-skeleton this *snow-switch-sg* '())
|
|
|
|
(logior! (-> this skel status) (janim-status inited))
|
2021-12-28 23:16:42 -05:00
|
|
|
(ja-channel-push! 1 0)
|
2023-09-26 10:17:00 -04:00
|
|
|
(let ((s5-1 (-> this skel root-channel 0)))
|
2021-12-28 23:16:42 -05:00
|
|
|
(joint-control-channel-group-eval!
|
|
|
|
s5-1
|
2023-09-26 10:17:00 -04:00
|
|
|
(the-as art-joint-anim (-> this draw art-group data 2))
|
2021-12-28 23:16:42 -05:00
|
|
|
num-func-identity
|
|
|
|
)
|
|
|
|
(set! (-> s5-1 frame-num) 0.0)
|
|
|
|
)
|
|
|
|
(transform-post)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this orig-trans quad) (-> this root trans quad))
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((s5-2 (task-complete? *game-info* (game-task snow-ball))))
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> this pressed?) s5-2)
|
2021-12-28 23:16:42 -05:00
|
|
|
(when (not s5-2)
|
|
|
|
(let ((a0-17 (new 'stack-no-clear 'vector)))
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> a0-17 quad) (-> this orig-trans quad))
|
2023-07-08 02:34:38 -04:00
|
|
|
(+! (-> a0-17 y) 12288.0)
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> this fcell-handle) (ppointer->handle (birth-pickup-at-point
|
|
|
|
a0-17
|
|
|
|
(pickup-type fuel-cell)
|
|
|
|
(the float (-> this entity extra perm task))
|
|
|
|
#f
|
|
|
|
this
|
|
|
|
(the-as fact-info #f)
|
|
|
|
)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if s5-2
|
|
|
|
(go snow-switch-idle-down)
|
|
|
|
(go snow-switch-idle-up)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(deftype snow-log (process-drawable)
|
2023-10-29 23:20:02 -04:00
|
|
|
((root collide-shape-moving :override)
|
|
|
|
(master entity-actor)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(:states
|
|
|
|
snow-log-activate
|
|
|
|
snow-log-active
|
|
|
|
snow-log-hidden
|
|
|
|
snow-log-wait-for-master
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-05-19 21:30:14 -04:00
|
|
|
(defskelgroup *snow-log-sg* snow-log snow-log-lod0-jg -1
|
|
|
|
((snow-log-lod0-mg (meters 999999)))
|
|
|
|
:bounds (static-spherem 0 5 0 9)
|
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
|
|
|
|
(defstate snow-log-wait-for-master (snow-log)
|
2023-09-22 05:54:49 -04:00
|
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
|
|
(case message
|
2022-01-08 20:57:57 -05:00
|
|
|
(('trigger)
|
|
|
|
(go snow-log-activate)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(while (let ((v1-0 (-> self master)))
|
|
|
|
(not (if v1-0
|
|
|
|
(-> v1-0 extra process)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
(suspend)
|
|
|
|
(let* ((v1-3 (-> self master))
|
|
|
|
(a0-1 (if v1-3
|
|
|
|
(-> v1-3 extra process)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(when a0-1
|
2022-06-09 21:18:08 -04:00
|
|
|
(cond
|
|
|
|
((send-event a0-1 'query)
|
|
|
|
(logclear! (-> self mask) (process-mask actor-pause))
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #t)
|
|
|
|
(go snow-log-active)
|
|
|
|
)
|
|
|
|
(else
|
|
|
|
(go snow-log-hidden)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-log-hidden (snow-log)
|
2023-09-22 05:54:49 -04:00
|
|
|
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
|
|
|
(case message
|
2021-12-28 23:16:42 -05:00
|
|
|
(('trigger)
|
|
|
|
(logclear! (-> self mask) (process-mask actor-pause))
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #t)
|
|
|
|
(go snow-log-activate)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(ja-channel-push! 1 0)
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja :group! snow-log-activate-ja :num! min)
|
2021-12-28 23:16:42 -05:00
|
|
|
(transform-post)
|
|
|
|
(logior! (-> self mask) (process-mask sleep-code))
|
|
|
|
(suspend)
|
|
|
|
0
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-log-activate (snow-log)
|
2022-06-09 21:18:08 -04:00
|
|
|
:enter (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(logclear! (-> self mask) (process-mask actor-pause))
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #t)
|
2022-02-13 13:03:30 -05:00
|
|
|
(logclear! (-> self draw status) (draw-status hidden))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2022-06-09 21:18:08 -04:00
|
|
|
:exit (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask actor-pause))
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #f)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:trans rider-trans
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(activate! *camera-smush-control* 819.2 37 150 1.0 0.99)
|
|
|
|
(ja-channel-push! 1 0)
|
|
|
|
(let ((gp-0 #f))
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snow-log-activate-ja :num! (seek!) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(when (and (not gp-0) (>= (ja-frame-num 0) 5.0))
|
|
|
|
(set! gp-0 #t)
|
2022-06-13 18:39:22 -04:00
|
|
|
(sound-play "explosion" :vol 40 :pitch 0.9)
|
|
|
|
(sound-play "snow-spat-short" :pitch 0.25)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek!))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(go snow-log-active)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:post rider-post
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-log-active (snow-log)
|
2023-09-23 09:53:50 -04:00
|
|
|
:trans rider-trans
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask actor-pause))
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #f)
|
2022-02-13 13:03:30 -05:00
|
|
|
(logclear! (-> self draw status) (draw-status hidden))
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja-channel-push! 1 (seconds 0.075))
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((gp-0 #t)
|
|
|
|
(s5-0 #t)
|
|
|
|
)
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2023-10-06 10:42:16 -04:00
|
|
|
(ja-no-eval :group! snow-log-active-loop-ja :num! (seek! max 0.25) :frame-num 0.0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(until (ja-done? 0)
|
|
|
|
(let ((f0-4 (ja-aframe-num 0)))
|
|
|
|
(cond
|
|
|
|
((and gp-0 (< f0-4 1.0))
|
|
|
|
(set! gp-0 #f)
|
|
|
|
(set! s5-0 #t)
|
2022-06-13 18:39:22 -04:00
|
|
|
(sound-play "snow-spat-long" :vol 85 :pitch (rand-vu-float-range -0.2 0.2))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
((and s5-0 (>= f0-4 11.0))
|
|
|
|
(set! s5-0 #f)
|
|
|
|
(set! gp-0 #t)
|
2022-06-13 18:39:22 -04:00
|
|
|
(sound-play "snow-spat-short" :vol 85 :pitch (rand-vu-float-range -0.2 0.2))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(suspend)
|
2022-05-19 21:30:14 -04:00
|
|
|
(ja :num! (seek! max 0.25))
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:post rider-post
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod init-from-entity! ((this snow-log) (arg0 entity-actor))
|
2023-09-26 10:17:00 -04:00
|
|
|
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
|
|
|
|
(set! (-> s4-0 reaction) default-collision-reaction)
|
|
|
|
(set! (-> s4-0 no-reaction)
|
|
|
|
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
|
|
|
|
)
|
2022-01-12 10:47:17 -05:00
|
|
|
(alloc-riders s4-0 1)
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s3-0 prim-core collide-as) (collide-kind ground-object))
|
|
|
|
(set! (-> s3-0 collide-with) (collide-kind target))
|
2023-06-15 14:59:54 -04:00
|
|
|
(set! (-> s3-0 prim-core action) (collide-action solid rider-plat-sticky))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s3-0 prim-core offense) (collide-offense indestructible))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s3-0 transform-index) 3)
|
|
|
|
(set-vector! (-> s3-0 local-sphere) 0.0 20480.0 0.0 36864.0)
|
|
|
|
(set-root-prim! s4-0 s3-0)
|
|
|
|
)
|
|
|
|
(set! (-> s4-0 nav-radius) 11264.0)
|
|
|
|
(backup-collide-with-as s4-0)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this root) s4-0)
|
2023-09-26 10:17:00 -04:00
|
|
|
)
|
|
|
|
(process-drawable-from-entity! this arg0)
|
|
|
|
(initialize-skeleton this *snow-log-sg* '())
|
|
|
|
(logior! (-> this skel status) (janim-status inited))
|
|
|
|
(logior! (-> this draw status) (draw-status hidden))
|
2023-10-29 23:20:02 -04:00
|
|
|
(+! (-> this root trans x) -1024.0)
|
|
|
|
(+! (-> this root trans y) -4915.2)
|
|
|
|
(set-vector! (-> this root scale) 1.5 1.0 1.5 1.0)
|
|
|
|
(nav-mesh-connect this (-> this root) (the-as nav-control #f))
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> this master) (entity-actor-lookup arg0 'alt-actor 0))
|
|
|
|
(set! (-> this draw origin-joint-index) (the-as uint 3))
|
2021-12-28 23:16:42 -05:00
|
|
|
(go snow-log-wait-for-master)
|
|
|
|
(none)
|
|
|
|
)
|
|
|
|
|
|
|
|
(deftype snow-log-button (process-drawable)
|
2023-10-29 23:20:02 -04:00
|
|
|
((root collide-shape-moving :override)
|
|
|
|
(log entity-actor)
|
|
|
|
(orig-trans vector :inline)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
(:states
|
|
|
|
snow-log-button-activate
|
|
|
|
snow-log-button-idle-down
|
|
|
|
snow-log-button-idle-up
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
(defbehavior snow-log-button-event-handler snow-log-button ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
|
|
|
(local-vars (v0-2 basic))
|
|
|
|
(case arg2
|
|
|
|
(('touch 'bonk 'attack)
|
2022-01-08 20:57:57 -05:00
|
|
|
(when (and (= (-> arg0 type) target)
|
|
|
|
(not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete))))
|
2023-10-29 23:20:02 -04:00
|
|
|
(>= 6553.6 (vector-vector-xz-distance (target-pos 0) (-> self root trans)))
|
2022-01-08 20:57:57 -05:00
|
|
|
)
|
2021-12-28 23:16:42 -05:00
|
|
|
(process-entity-status! self (entity-perm-status complete) #t)
|
|
|
|
(logclear! (-> self mask) (process-mask actor-pause))
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #t)
|
|
|
|
(go snow-log-button-activate)
|
|
|
|
(return (the-as object #f))
|
|
|
|
v0-2
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(('query)
|
|
|
|
(when (= (-> arg0 type) snow-log)
|
|
|
|
(return (the-as
|
|
|
|
object
|
|
|
|
(and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete)))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
v0-2
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-log-button-idle-up (snow-log-button)
|
2022-06-09 21:18:08 -04:00
|
|
|
:event snow-log-button-event-handler
|
|
|
|
:code (behavior ()
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask sleep-code))
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-log-button-activate (snow-log-button)
|
2022-06-09 21:18:08 -04:00
|
|
|
:event snow-log-button-event-handler
|
|
|
|
:exit (behavior ()
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask actor-pause))
|
|
|
|
(process-entity-status! self (entity-perm-status bit-3) #f)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:trans rider-trans
|
2022-06-09 21:18:08 -04:00
|
|
|
:code (behavior ()
|
2022-06-13 18:39:22 -04:00
|
|
|
(sound-play "prec-button1")
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((f30-0 (+ -1433.6 (-> self orig-trans y))))
|
2023-10-29 23:20:02 -04:00
|
|
|
(when (= (-> self root trans y) f30-0)
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
|
|
|
(set! (-> a1-1 from) self)
|
|
|
|
(set! (-> a1-1 num-params) 0)
|
|
|
|
(set! (-> a1-1 message) 'trigger)
|
|
|
|
(let ((t9-2 send-event-function)
|
|
|
|
(v1-4 (-> self log))
|
|
|
|
)
|
|
|
|
(t9-2
|
|
|
|
(if v1-4
|
|
|
|
(-> v1-4 extra process)
|
|
|
|
)
|
|
|
|
a1-1
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(go snow-log-button-idle-down)
|
|
|
|
)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> self root trans y)
|
|
|
|
(seek-with-smooth (-> self root trans y) f30-0 (* 12288.0 (seconds-per-frame)) 0.2 204.8)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
2023-09-23 09:53:50 -04:00
|
|
|
:post rider-post
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
(defstate snow-log-button-idle-down (snow-log-button)
|
2022-06-09 21:18:08 -04:00
|
|
|
:event snow-log-button-event-handler
|
|
|
|
:code (behavior ()
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> self root trans quad) (-> self orig-trans quad))
|
|
|
|
(+! (-> self root trans y) -1433.6)
|
2021-12-28 23:16:42 -05:00
|
|
|
(transform-post)
|
2022-05-19 21:30:14 -04:00
|
|
|
(loop
|
2021-12-28 23:16:42 -05:00
|
|
|
(logior! (-> self mask) (process-mask sleep-code))
|
|
|
|
(suspend)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2023-10-29 23:20:02 -04:00
|
|
|
(defmethod init-from-entity! ((this snow-log-button) (arg0 entity-actor))
|
2023-09-26 10:17:00 -04:00
|
|
|
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
|
|
|
|
(set! (-> s4-0 reaction) default-collision-reaction)
|
|
|
|
(set! (-> s4-0 no-reaction)
|
|
|
|
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
|
|
|
|
)
|
2022-01-12 10:47:17 -05:00
|
|
|
(alloc-riders s4-0 1)
|
2021-12-28 23:16:42 -05:00
|
|
|
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s3-0 prim-core collide-as) (collide-kind ground-object))
|
|
|
|
(set! (-> s3-0 collide-with) (collide-kind target))
|
2023-06-15 14:59:54 -04:00
|
|
|
(set! (-> s3-0 prim-core action) (collide-action solid rider-plat-sticky))
|
2022-01-08 20:57:57 -05:00
|
|
|
(set! (-> s3-0 prim-core offense) (collide-offense indestructible))
|
2021-12-28 23:16:42 -05:00
|
|
|
(set! (-> s3-0 transform-index) 3)
|
|
|
|
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 8192.0)
|
|
|
|
(set-root-prim! s4-0 s3-0)
|
|
|
|
)
|
|
|
|
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
|
|
|
|
(backup-collide-with-as s4-0)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this root) s4-0)
|
2021-12-28 23:16:42 -05:00
|
|
|
)
|
2023-09-26 10:17:00 -04:00
|
|
|
(process-drawable-from-entity! this arg0)
|
|
|
|
(initialize-skeleton this *snow-switch-sg* '())
|
|
|
|
(logior! (-> this skel status) (janim-status inited))
|
2021-12-28 23:16:42 -05:00
|
|
|
(ja-channel-push! 1 0)
|
2023-09-26 10:17:00 -04:00
|
|
|
(let ((s4-1 (-> this skel root-channel 0)))
|
2021-12-28 23:16:42 -05:00
|
|
|
(joint-control-channel-group-eval!
|
|
|
|
s4-1
|
2023-09-26 10:17:00 -04:00
|
|
|
(the-as art-joint-anim (-> this draw art-group data 2))
|
2021-12-28 23:16:42 -05:00
|
|
|
num-func-identity
|
|
|
|
)
|
|
|
|
(set! (-> s4-1 frame-num) 0.0)
|
|
|
|
)
|
|
|
|
(transform-post)
|
2023-10-29 23:20:02 -04:00
|
|
|
(set! (-> this orig-trans quad) (-> this root trans quad))
|
2023-09-26 10:17:00 -04:00
|
|
|
(set! (-> this log) (entity-actor-lookup arg0 'alt-actor 0))
|
|
|
|
(if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status complete)))
|
2021-12-28 23:16:42 -05:00
|
|
|
(go snow-log-button-idle-down)
|
|
|
|
(go snow-log-button-idle-up)
|
|
|
|
)
|
|
|
|
(none)
|
|
|
|
)
|