jak3: fix some collide decomp + fix projectiles aiming at intangible objects (#3485)

Say goodbye to half of the laser needle shots spinning around doing
nothing. This is toggleable with `fix-projectile-focus` in the pc
settings.
This commit is contained in:
ManDude
2024-04-26 16:22:26 +01:00
committed by GitHub
parent 667553850d
commit 889fdcd79c
62 changed files with 246 additions and 513 deletions
+5 -5
View File
@@ -23598,8 +23598,8 @@
:size-assert #x30
:flag-assert #xb00000030
(:methods
(resolve-moving-sphere-tri (_type_ collide-tri-result collide-prim-core vector float collide-action) float) ;; 9
(resolve-moving-sphere-sphere (_type_ collide-tri-result collide-prim-core vector float collide-action) float) ;; 10
(resolve-moving-sphere-tri (_type_ collide-query sphere vector float collide-action) float) ;; 9
(resolve-moving-sphere-sphere (_type_ collide-query sphere vector float collide-action) float) ;; 10
)
)
@@ -28704,7 +28704,7 @@
(new (symbol type int int) _type_) ;; 0
(spatial-hash-method-33 (_type_ vector hash-object-info) none) ;; 33
(add-an-object (_type_ bounding-box (pointer collide-shape) int) int) ;; 34
(fill-actor-list-for-box (_type_ bounding-box (pointer collide-shape) int) int) ;; 35
(fill-actor-list-for-box (_type_ vector (pointer collide-shape) int) int) ;; 35
(fill-actor-list-for-sphere (_type_ vector vector float (pointer collide-shape) int int) int) ;; 36
(fill-actor-list-for-line-sphere (_type_ vector vector float (pointer collide-shape) int int) int) ;; 37
(fill-actor-list-for-vec+r (_type_ vector (pointer collide-shape) int) int) ;; 38
@@ -36405,7 +36405,7 @@
(define-extern gun-blue-shot-3-move (function gun-blue-shot-3 none))
(define-extern *blue-shot-trail* light-trail-composition)
(define-extern gun-fire-blue-3 (function object :behavior target))
(define-extern draw-beam-segment (function none))
(define-extern draw-beam-segment (function symbol))
(define-extern *found-objects* (pointer handle))
(define-extern *gun-blue-2-last-attack-id* uint)
(define-extern *gun-blue-2-last-attack-id-time* timeframe-wrapper)
@@ -60312,7 +60312,7 @@
(des-beast-method-164 (_type_) none) ;; 164
(des-beast-method-165 (_type_) none) ;; 165
(des-beast-method-166 (_type_) none) ;; 166
(des-beast-method-167 (_type_ bounding-box) symbol) ;; 167
(des-beast-method-167 (_type_ vector) symbol) ;; 167
)
)
@@ -225,7 +225,7 @@
],
"board-turn-around?": [[48, "vector"]],
"target-board-green-eco-attack": [
[16, "bounding-box"],
[16, "vector"],
[32, ["array", "collide-shape", 384]]
],
"(enter target-board-jump)": [[48, "vector"]],
@@ -502,7 +502,7 @@
[128, "vector"],
[1696, "vector"]
],
"(method 26 gun-red-shot)": [[16, "bounding-box"]],
"(method 26 gun-red-shot)": [[16, "vector"]],
"gun-dark-reaction": [[112, "vector"]],
"gun-fire-red-1": [
[16, "vector"],
@@ -613,7 +613,7 @@
"(method 50 collide-shape)": [[32, "vector"]],
"(method 45 collide-shape)": [[16, "do-push-aways-work"]],
"(method 18 collide-shape-prim-mesh)": [[16, "collide-tri-result"]],
"(method 15 collide-shape-prim-sphere)": [[16, "collide-tri-result"]],
"(method 15 collide-shape-prim-sphere)": [[16, "collide-query"]],
"cshape-reaction-update-state": [
[16, "vector"],
[32, "vector"]
@@ -642,7 +642,7 @@
"(method 33 spatial-hash)": [[16, ["inline-array", "vector", 2]]],
"(method 24 grid-hash)": [[16, "vector"]],
"(method 14 collide-cache)": [[16, "bounding-box"]],
"(method 16 collide-cache)": [[16, "collide-cache-tri"]],
"(method 16 collide-cache)": [[16, "collide-puls-work"]],
"(method 20 collide-cache)": [[16, "matrix"]],
"col-rend-draw": [[16, "matrix"]],
"(method 11 collide-mesh)": [[16, "spat-work"]],
@@ -1579,7 +1579,7 @@
],
"(method 62 wascity-turret)": [
[16, "matrix"],
[80, "bounding-box"],
[80, "vector"],
[752, "vector"],
[624, "vector"],
[656, "vector"],
@@ -3516,7 +3516,7 @@
[43, "s3", "process-focusable"],
[93, "s3", "process-focusable"],
[122, "s3", "process-focusable"],
["_stack_", 32, "bounding-box"]
["_stack_", 32, "vector"]
],
"gun-fire-red-3": [
[216, "s1", "process-focusable"],
@@ -76,8 +76,8 @@ This can represent a sphere, a triangle mesh, or a group of other primitives wit
(prim-type prim-type :overlay-at (-> prim-core prim-type))
)
(:methods
(resolve-moving-sphere-tri (_type_ collide-tri-result collide-prim-core vector float collide-action) float)
(resolve-moving-sphere-sphere (_type_ collide-tri-result collide-prim-core vector float collide-action) float)
(resolve-moving-sphere-tri (_type_ collide-query sphere vector float collide-action) float)
(resolve-moving-sphere-sphere (_type_ collide-query sphere vector float collide-action) float)
)
)
+10 -10
View File
@@ -790,14 +790,14 @@
(vf4 :class vf)
)
(init-vf0-vector)
(let ((s5-0 (new 'stack-no-clear 'collide-cache-tri)))
(let ((s5-0 (new 'stack-no-clear 'collide-puls-work)))
(.lvf vf4 (&-> arg0 exit-planes 0 quad))
(.lvf vf3 (&-> arg0 start-pos quad))
(.lvf vf2 (&-> arg0 move-dist quad))
(set! (-> s5-0 vertex 0 x) (the-as float (-> arg0 ignore-pat)))
(set! (-> s5-0 ignore-pat) (-> arg0 ignore-pat))
(.mul.w.vf vf3 vf0 vf4 :mask #b1000)
(.svf (&-> s5-0 vertex 2 quad) vf2)
(.svf (&-> s5-0 vertex 1 quad) vf3)
(.svf (&-> s5-0 move-dist quad) vf2)
(.svf (&-> s5-0 bsphere quad) vf3)
(let ((s4-0 (the-as object (-> this prims)))
(f30-0 -100000000.0)
)
@@ -809,9 +809,9 @@
((>= (-> (the-as collide-cache-prim s4-0) prim-core prim-type) 0)
(let ((f0-0 ((method-of-type collide-cache-prim resolve-moving-sphere-tri)
(the-as collide-cache-prim s4-0)
(the-as collide-tri-result arg0)
(the-as collide-prim-core (-> s5-0 vertex 1))
(-> s5-0 vertex 2)
arg0
(-> s5-0 bsphere)
(-> s5-0 move-dist)
f30-0
(collide-action solid)
)
@@ -829,9 +829,9 @@
)
(let ((f0-1 ((method-of-type collide-cache-prim resolve-moving-sphere-sphere)
(the-as collide-cache-prim s4-0)
(the-as collide-tri-result arg0)
(the-as collide-prim-core (-> s5-0 vertex 1))
(-> s5-0 vertex 2)
arg0
(-> s5-0 bsphere)
(-> s5-0 move-dist)
f30-0
(collide-action solid)
)
@@ -169,7 +169,7 @@
(set! *actor-list-length* 0)
(if (logtest? s5-0 (collide-spec hit-by-others-list))
(set! *actor-list-length*
(fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> s4-0 prim-core)) *actor-list* 256)
(fill-actor-list-for-box *actor-hash* (the-as vector (-> s4-0 prim-core)) *actor-list* 256)
)
)
(when (logtest? s5-0 (collide-spec player-list))
+22 -36
View File
@@ -417,11 +417,11 @@
(vf4 :class vf)
(vf5 :class vf)
)
(let* ((gp-0 (new 'stack-no-clear 'collide-tri-result))
(let* ((gp-0 (new 'stack-no-clear 'collide-query))
(f0-1 (resolve-moving-sphere-tri
arg1
gp-0
(-> this prim-core)
(the-as sphere (-> this prim-core))
(-> arg0 move-dist)
(-> arg0 best-dist)
(-> this prim-core action)
@@ -442,13 +442,13 @@
(b! (= v1-5 #f) cfg-5 :likely-delay (set! a2-2 (the-as collide-shape-prim #f)))
(b! (logtest? (-> a0-3 penetrate-using) (-> v1-5 penetrated-by)) cfg-6 :delay (nop!))
(label cfg-5)
(.lvf vf3 (&-> gp-0 vertex 0 quad))
(.lvf vf4 (&-> gp-0 vertex 1 quad))
(.lvf vf5 (&-> gp-0 vertex 2 quad))
(.lvf vf1 (&-> gp-0 intersect quad))
(.lvf vf2 (&-> gp-0 normal quad))
(let ((a0-6 (-> gp-0 pat))
(a1-4 (-> gp-0 collide-ptr))
(.lvf vf3 (&-> gp-0 best-other-tri vertex 0 quad))
(.lvf vf4 (&-> gp-0 best-other-tri vertex 1 quad))
(.lvf vf5 (&-> gp-0 best-other-tri vertex 2 quad))
(.lvf vf1 (&-> gp-0 best-other-tri intersect quad))
(.lvf vf2 (&-> gp-0 best-other-tri normal quad))
(let ((a0-6 (-> gp-0 best-other-tri pat))
(a1-4 (-> gp-0 best-other-tri collide-ptr))
)
(set! (-> arg0 best-dist) f0-1)
(.svf (&-> arg0 best-other-tri vertex 0 quad) vf3)
@@ -464,14 +464,7 @@
(label cfg-6)
(b! (not v1-5) cfg-8 :delay (empty-form))
)
(add-touching-prims
*touching-list*
this
a2-2
f0-1
(the-as collide-tri-result #f)
(the-as collide-tri-result (-> gp-0 vertex))
)
(add-touching-prims *touching-list* this a2-2 f0-1 (the-as collide-tri-result #f) (-> gp-0 best-other-tri))
)
)
)
@@ -515,11 +508,11 @@
(vf4 :class vf)
(vf5 :class vf)
)
(let* ((gp-0 (new 'stack-no-clear 'collide-tri-result))
(let* ((gp-0 (new 'stack-no-clear 'collide-query))
(f0-1 (resolve-moving-sphere-sphere
arg1
gp-0
(-> this prim-core)
(the-as sphere (-> this prim-core))
(-> arg0 move-dist)
(-> arg0 best-dist)
(-> arg1 prim-core action)
@@ -539,13 +532,13 @@
(b! (zero? a1-2) cfg-4 :delay (nop!))
(b! (logtest? (-> v1-4 penetrate-using) (-> a0-4 penetrated-by)) cfg-4 :delay (nop!))
)
(.lvf vf3 (&-> gp-0 vertex 0 quad))
(.lvf vf4 (&-> gp-0 vertex 1 quad))
(.lvf vf5 (&-> gp-0 vertex 2 quad))
(.lvf vf1 (&-> gp-0 intersect quad))
(.lvf vf2 (&-> gp-0 normal quad))
(let ((v1-7 (-> gp-0 pat))
(a0-6 (-> gp-0 collide-ptr))
(.lvf vf3 (&-> gp-0 best-other-tri vertex 0 quad))
(.lvf vf4 (&-> gp-0 best-other-tri vertex 1 quad))
(.lvf vf5 (&-> gp-0 best-other-tri vertex 2 quad))
(.lvf vf1 (&-> gp-0 best-other-tri intersect quad))
(.lvf vf2 (&-> gp-0 best-other-tri normal quad))
(let ((v1-7 (-> gp-0 best-other-tri pat))
(a0-6 (-> gp-0 best-other-tri collide-ptr))
)
(set! (-> arg0 best-dist) f0-1)
(.svf (&-> arg0 best-other-tri vertex 0 quad) vf3)
@@ -559,14 +552,7 @@
(set! (-> arg0 best-other-prim) a2-2)
(set! (-> arg0 best-my-prim) this)
(label cfg-4)
(add-touching-prims
*touching-list*
this
a2-2
f0-1
(the-as collide-tri-result #f)
(the-as collide-tri-result (-> gp-0 vertex))
)
(add-touching-prims *touching-list* this a2-2 f0-1 (the-as collide-tri-result #f) (-> gp-0 best-other-tri))
)
)
(label cfg-5)
@@ -2386,7 +2372,7 @@
(set! *actor-list-length* 0)
(if (logtest? s4-0 (collide-spec hit-by-others-list))
(set! *actor-list-length*
(fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> this root-prim prim-core)) *actor-list* 256)
(fill-actor-list-for-box *actor-hash* (the-as vector (-> this root-prim prim-core)) *actor-list* 256)
)
)
(when (logtest? s4-0 (collide-spec player-list))
@@ -2567,7 +2553,7 @@
(set! *actor-list-length* 0)
(b! (not (logtest? (the-as collide-spec s2-0) 512)) cfg-2 :delay (empty-form))
(set! *actor-list-length*
(fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> s3-0 prim-core)) *actor-list* 256)
(fill-actor-list-for-box *actor-hash* (the-as vector (-> s3-0 prim-core)) *actor-list* 256)
)
(label cfg-2)
(b! (not (logtest? (the-as collide-spec s2-0) 1024)) cfg-11 :delay (empty-form))
+2 -1
View File
@@ -106,7 +106,8 @@
(let* ((s2-1 (get-trans (the-as process-focusable s3-0) 3))
(f30-0 (- (vector-vector-distance (-> gp-0 point) s2-1) (-> s2-1 w)))
)
(when (nonzero? (-> s0-0 root-prim prim-core collide-as))
(when (#if PC_PORT (and (nonzero? (-> s0-0 root-prim prim-core collide-as)) (or (not (-> *pc-settings* fix-projectile-focus)) (logtest? (collide-action solid) (-> s0-0 root-prim prim-core action))))
(nonzero? (-> s0-0 root-prim prim-core collide-as)))
(let ((s0-1 (search-info-flag)))
0.0
(set! sv-736 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s2-1 (-> gp-0 point)) 1.0))
@@ -309,9 +309,7 @@
(init-vf0-vector)
(set! *actor-list-length* 0)
(if #t
(set! *actor-list-length*
(fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> this collide-bounds)) *actor-list* 256)
)
(set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (-> this collide-bounds) *actor-list* 256))
)
(when #t
(let ((a0-2 (-> *collide-player-list* alive-list next0)))
+1 -1
View File
@@ -254,7 +254,7 @@
)
)
(else
(let ((s1-0 (new 'stack-no-clear 'bounding-box))
(let ((s1-0 (new 'stack-no-clear 'vector))
(s2-1 (new 'stack 'boxed-array collide-shape 32))
)
(sphere<-vector+r! (the-as sphere s1-0) arg1 arg2)
@@ -133,7 +133,7 @@ O(n^2) 'check everybody against everybody' collision loop."
(new (symbol type int int) _type_)
(spatial-hash-method-33 (_type_ vector hash-object-info) none)
(add-an-object (_type_ bounding-box (pointer collide-shape) int) int)
(fill-actor-list-for-box (_type_ bounding-box (pointer collide-shape) int) int)
(fill-actor-list-for-box (_type_ vector (pointer collide-shape) int) int)
(fill-actor-list-for-sphere (_type_ vector vector float (pointer collide-shape) int int) int)
(fill-actor-list-for-line-sphere (_type_ vector vector float (pointer collide-shape) int int) int)
(fill-actor-list-for-vec+r (_type_ vector (pointer collide-shape) int) int)
@@ -884,9 +884,9 @@
(arg4 int)
(arg5 int)
)
(let ((v1-0 (new 'stack-no-clear 'bounding-box)))
(set! (-> v1-0 min quad) (-> arg0 quad))
(set! (-> v1-0 min w) 0.0)
(let ((v1-0 (new 'stack-no-clear 'vector)))
(set! (-> v1-0 quad) (-> arg0 quad))
(set! (-> v1-0 w) 0.0)
(fill-actor-list-for-box this v1-0 (the-as (pointer collide-shape) arg1) (the-as int arg2))
)
)
@@ -501,16 +501,16 @@
(vf2 :class vf)
)
(init-vf0-vector)
(let ((gp-0 (new 'stack-no-clear 'bounding-box)))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(cond
(arg0
(set! (-> gp-0 min quad) (-> self control trans quad))
(set! (-> gp-0 min w) 49152.0)
(set! (-> gp-0 quad) (-> self control trans quad))
(set! (-> gp-0 w) 49152.0)
)
(else
(vector-normalize! (vector-z-quaternion! (the-as vector gp-0) (-> self control quat)) -12288.0)
(vector+! (the-as vector gp-0) (the-as vector gp-0) (-> self control trans))
(set! (-> gp-0 min w) 24576.0)
(vector-normalize! (vector-z-quaternion! gp-0 (-> self control quat)) -12288.0)
(vector+! gp-0 gp-0 (-> self control trans))
(set! (-> gp-0 w) 24576.0)
)
)
(let ((s5-1 (new 'stack-no-clear 'array 'collide-shape 384)))
@@ -530,7 +530,7 @@
)
(when a0-11
(when (!= *target* a0-11)
(let ((v1-13 (vector-! (new 'stack-no-clear 'vector) (-> a0-11 root trans) (the-as vector gp-0))))
(let ((v1-13 (vector-! (new 'stack-no-clear 'vector) (-> a0-11 root trans) gp-0)))
0.0
(.lvf vf1 (&-> v1-13 quad))
)
@@ -541,7 +541,7 @@
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
(.mov v1-14 vf1)
(let ((f0-3 v1-14)
(f1-0 (-> gp-0 min w))
(f1-0 (-> gp-0 w))
)
(if (>= (* f1-0 f1-0) f0-3)
(send-event a0-11 'green-eco-attack)
@@ -560,9 +560,9 @@
)
)
)
(when (and s5-2 (< (vector-vector-distance (get-trans s5-2 0) (the-as vector gp-0)) (-> gp-0 min w)))
(when (and s5-2 (< (vector-vector-distance (get-trans s5-2 0) gp-0) (-> gp-0 w)))
(when (!= *target* s5-2)
(let ((v1-24 (vector-! (new 'stack-no-clear 'vector) (-> s5-2 control trans) (the-as vector gp-0))))
(let ((v1-24 (vector-! (new 'stack-no-clear 'vector) (-> s5-2 control trans) gp-0)))
0.0
(.lvf vf1 (&-> v1-24 quad))
)
@@ -573,7 +573,7 @@
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
(.mov v1-25 vf1)
(let ((f0-6 v1-25)
(f1-4 (-> gp-0 min w))
(f1-4 (-> gp-0 w))
)
(if (>= (* f1-4 f1-4) f0-6)
(send-event s5-2 'green-eco-attack)
@@ -523,7 +523,7 @@
(vector+! s5-1 s5-1 (-> this root trans))
(set! (-> s5-1 w) 16384.0)
(let ((s4-1 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s5-1) s4-1 384))
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-1 s4-1 384))
(let* ((s2-0 (-> s4-1 s3-0))
(v1-21 (if (type? s2-0 collide-shape)
s2-0
+1 -3
View File
@@ -70,9 +70,7 @@
(let ((gp-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 32))))
(let ((a1-2 (sphere<-vector+r! (new 'stack-no-clear 'sphere) (-> this root trans) 16384.0)))
(+! (-> a1-2 y) 12288.0)
(set! (-> gp-0 length)
(fill-actor-list-for-box *actor-hash* (the-as bounding-box a1-2) (-> gp-0 data) (-> gp-0 allocated-length))
)
(set! (-> gp-0 length) (fill-actor-list-for-box *actor-hash* a1-2 (-> gp-0 data) (-> gp-0 allocated-length)))
)
(let* ((s5-1 (-> gp-0 length))
(s4-0 0)
@@ -478,7 +478,7 @@
(set! (-> sv-1280 quad) (-> sv-144 fire-point quad))
(set! (-> sv-1280 w) 163840.0)
(let ((gp-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s5-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-1280) gp-0 384))
(countdown (s5-0 (fill-actor-list-for-box *actor-hash* sv-1280 gp-0 384))
(let* ((s4-0 (-> gp-0 s5-0))
(v1-16 (if (type? s4-0 collide-shape)
s4-0
@@ -496,6 +496,7 @@
(when (and (!= *target* s4-1)
(!= sv-1300 s4-1)
(not (focus-test? (the-as process-focusable s4-1) disable dead inactive gun-no-target))
(pc-check-focus-fix (the-as process-focusable s4-1)) ;; og:preserve-this
(or (logtest? (process-mask crate enemy vehicle civilian) (-> s4-1 mask))
(and (logtest? (process-mask guard) (-> s4-1 mask)) (-> *setting-control* user-current gun-target-guards?))
)
@@ -552,63 +553,7 @@
)
)
)
(let* ((s5-1 *target*)
(gp-1 (if (type? s5-1 process-focusable)
s5-1
)
)
)
(when (and gp-1 (< (vector-vector-distance (get-trans gp-1 0) sv-1280) (-> sv-1280 w)))
(when (and (!= *target* gp-1)
(!= sv-1300 gp-1)
(not (focus-test? gp-1 disable dead inactive gun-no-target))
(or (logtest? (process-mask crate enemy vehicle civilian) (-> gp-1 mask))
(and (logtest? (process-mask guard) (-> gp-1 mask)) (-> *setting-control* user-current gun-target-guards?))
)
)
(let ((s5-3 (new 'stack-no-clear 'collide-query)))
(vector+float*! (-> s5-3 start-pos) (-> sv-144 fire-point) (-> sv-144 fire-dir-out) 40960.0)
(+! (-> s5-3 start-pos y) 24576.0)
(vector-! (-> s5-3 move-dist) (get-trans gp-1 3) (-> sv-144 fire-point))
(let ((v1-91 s5-3))
(set! (-> v1-91 radius) 40.96)
(set! (-> v1-91 collide-with) (collide-spec backgnd))
(set! (-> v1-91 ignore-process0) #f)
(set! (-> v1-91 ignore-process1) #f)
(set! (-> v1-91 ignore-pat)
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
)
(set! (-> v1-91 action-mask) (collide-action solid))
)
(when (< (fill-and-probe-using-line-sphere *collide-cache* s5-3) 0.0)
(let ((s5-5 (vector-! (new 'stack-no-clear 'vector) (get-trans gp-1 3) (-> self control trans))))
(vector-normalize! s5-5 1.0)
(when (< (-> s5-5 y) 0.5)
(set! (-> sv-1284 sv-1288 targ) (process->handle gp-1))
(let ((f30-1 1.0))
(if (and (nonzero? (-> gp-1 draw)) (logtest? (-> gp-1 draw status) (draw-control-status on-screen)))
(set! f30-1 (+ 2.0 f30-1))
)
(if (< (vector-vector-xz-distance-squared (-> sv-144 fire-point) (get-trans gp-1 3)) 2415919000.0)
(set! f30-1 (+ 4.0 f30-1))
)
(if (logtest? (process-mask enemy guard) (-> gp-1 mask))
(set! f30-1 (+ 28.0 f30-1))
)
(if (logtest? (process-mask vehicle civilian) (-> gp-1 mask))
(set! f30-1 (* 0.25 f30-1))
)
(set! (-> sv-1284 sv-1288 value) f30-1)
(set! sv-1296 (+ sv-1296 f30-1))
)
(set! sv-1288 (+ sv-1288 1))
)
)
)
)
)
)
)
;; og:preserve-this *snip* there was dead code here!
(let* ((v1-132 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-133 (the-as number (logior #x3f800000 v1-132)))
(f0-32 (* (+ -1.0 (the-as float v1-133)) sv-1296))
@@ -727,7 +672,7 @@
;; WARN: Return type mismatch symbol vs none.
(defun draw-beam-segment ()
(none)
#f
)
(define *found-objects* (the-as (pointer handle) (malloc 'global 112)))
@@ -1654,6 +1599,7 @@
(set! (-> a1-1 message) 'get-vehicle)
(and (!= (send-event-function *target* a1-1) arg0)
(not (focus-test? arg0 disable dead inactive gun-no-target))
(pc-check-focus-fix arg0) ;; og:preserve-this
(or (logtest? (process-mask enemy vehicle civilian) (-> arg0 mask))
(and (logtest? (process-mask guard) (-> arg0 mask)) (-> *setting-control* user-current gun-target-guards?))
)
@@ -1684,7 +1630,7 @@
)
(set! (-> sv-40 w) 0.0)
(let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box arg0) s4-0 384))
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* arg0 s4-0 384))
(let* ((s2-0 (-> s4-0 s3-0))
(a0-5 (if (type? s2-0 collide-shape)
s2-0
@@ -1748,7 +1694,7 @@
(set! (-> arg0 w) 16384.0)
(set! (-> sv-40 w) 1.0)
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box arg0) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* arg0 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(a0-5 (if (type? s1-0 collide-shape)
s1-0
@@ -755,7 +755,7 @@
(set! (-> s4-0 quad) (-> this root trans quad))
(set! (-> s4-0 w) 1228800.0)
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s4-0 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(v1-5 (if (type? s1-0 collide-shape)
s1-0
@@ -1984,7 +1984,7 @@
(let ((s5-1 (send-event-function *target* a1-13)))
(set! (-> s4-0 w) (-> self blast-radius))
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s4-0 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(v1-66 (if (type? s1-0 collide-shape)
s1-0
@@ -2580,7 +2580,7 @@
(set! (-> sv-144 quad) (-> (get-trans (the-as process-focusable s5-0) 3) quad))
(set! (-> sv-144 r) sv-160)
(let ((s3-2 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-144) s3-2 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-144 s3-2 384))
(let* ((s1-0 (-> s3-2 s2-0))
(a0-15 (if (type? s1-0 collide-shape)
s1-0
@@ -3683,7 +3683,7 @@
)
(set! (-> s5-0 w) f28-0)
(let ((s3-1 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s5-0) s3-1 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-1 384))
(let* ((s1-0 (-> s3-1 s2-0))
(v1-17 (if (type? s1-0 collide-shape)
s1-0
+24 -119
View File
@@ -228,7 +228,7 @@
(set! (-> s5-0 quad) (-> this root trans quad))
(set! (-> s5-0 w) (-> this blast-radius))
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s5-0) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(a0-8 (if (type? s1-0 collide-shape)
s1-0
@@ -245,6 +245,7 @@
(when s1-1
(when (and (!= s4-0 s1-1)
(not (focus-test? (the-as process-focusable s1-1) disable dead inactive))
(pc-check-focus-fix (the-as process-focusable s1-1)) ;; og:preserve-this
(logtest? (process-mask crate enemy guard vehicle civilian) (-> s1-1 mask))
(nonzero? (-> (the-as process-focusable s1-1) root root-prim prim-core collide-with))
)
@@ -298,6 +299,7 @@
(when (and s3-1 (< (vector-vector-distance (get-trans s3-1 0) s5-0) (-> s5-0 w)))
(when (and (!= s4-0 s3-1)
(not (focus-test? s3-1 disable dead inactive))
(pc-check-focus-fix (the-as process-focusable s3-1)) ;; og:preserve-this
(logtest? (process-mask crate enemy guard vehicle civilian) (-> s3-1 mask))
(nonzero? (-> s3-1 control root-prim prim-core collide-with))
)
@@ -366,7 +368,7 @@
(set! (-> s4-0 quad) (-> this root trans quad))
(set! (-> s4-0 w) (* 0.6666667 (-> this blast-radius)))
(let ((s2-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s1-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s2-0 384))
(countdown (s1-0 (fill-actor-list-for-box *actor-hash* s4-0 s2-0 384))
(let* ((s0-0 (-> s2-0 s1-0))
(a0-8 (if (type? s0-0 collide-shape)
s0-0
@@ -384,6 +386,7 @@
(when (and (!= s3-0 a0-10)
(not (focus-test? (the-as process-focusable a0-10) disable dead inactive gun-no-target))
(nonzero? (-> (the-as process-focusable a0-10) root root-prim prim-core collide-with))
(pc-check-focus-fix (the-as process-focusable a0-10)) ;; og:preserve-this
(or (logtest? (process-mask crate enemy vehicle civilian) (-> a0-10 mask))
(and (logtest? (process-mask guard) (-> a0-10 mask)) (-> *setting-control* user-current gun-target-guards?))
)
@@ -430,6 +433,7 @@
(when (and (!= s3-0 s2-1)
(not (focus-test? s2-1 disable dead inactive gun-no-target))
(nonzero? (-> s2-1 control root-prim prim-core collide-with))
(pc-check-focus-fix s2-1) ;; og:preserve-this
(or (logtest? (process-mask crate enemy vehicle civilian) (-> s2-1 mask))
(and (logtest? (process-mask guard) (-> s2-1 mask)) (-> *setting-control* user-current gun-target-guards?))
)
@@ -632,7 +636,7 @@
(defmethod find-targets-and-attack! ((this gun-red-2-shockwave))
(local-vars
(sv-32 bounding-box)
(sv-32 vector)
(sv-2672 (function vector vector float))
(sv-2688 vector)
(sv-2704 vector)
@@ -644,9 +648,9 @@
(vf6 :class vf)
)
(init-vf0-vector)
(set! sv-32 (the-as bounding-box (new 'stack-no-clear 'vector)))
(set! (-> sv-32 min quad) (-> this origin quad))
(set! (-> sv-32 min w) (-> this current-radius))
(set! sv-32 (new 'stack-no-clear 'vector))
(set! (-> sv-32 quad) (-> this origin quad))
(set! (-> sv-32 w) (-> this current-radius))
(let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* sv-32 s5-0 384))
(let* ((s3-0 (-> s5-0 s4-0))
@@ -665,6 +669,7 @@
(when s3-1
(when (and (!= *target* s3-1)
(not (focus-test? (the-as process-focusable s3-1) disable dead inactive))
(pc-check-focus-fix (the-as process-focusable s3-1)) ;; og:preserve-this
(or (logtest? (process-mask crate enemy vehicle civilian) (-> s3-1 mask))
(and (logtest? (process-mask guard) (-> s3-1 mask)) (-> *setting-control* user-current gun-target-guards?))
)
@@ -739,74 +744,7 @@
)
)
)
(let* ((s4-1 *target*)
(s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) (the-as vector sv-32)) (-> sv-32 min w)))
(when (and (!= *target* s5-1)
(not (focus-test? s5-1 disable dead inactive))
(or (logtest? (process-mask crate enemy vehicle civilian) (-> s5-1 mask))
(and (logtest? (process-mask guard) (-> s5-1 mask)) (-> *setting-control* user-current gun-target-guards?))
)
)
(let ((s4-3 #f))
(let ((s3-2 (process->handle s5-1)))
(dotimes (v1-68 (-> this num-previously-attacked-targets))
(when (= (-> this previously-attacked-targets v1-68) s3-2)
(set! s4-3 #t)
0
(goto cfg-71)
)
)
(label cfg-71)
(when (not s4-3)
(let ((s2-2 #f))
(let ((f0-5 (vector-vector-xz-distance-squared (-> this origin) (get-trans s5-1 3)))
(f1-5 24576.0)
)
(cond
((< f0-5 (* f1-5 f1-5))
(set! s2-2 #t)
)
(else
(let ((s1-2 (new 'stack-no-clear 'collide-query)))
(set! (-> s1-2 start-pos quad) (-> this origin quad))
(vector-! (-> s1-2 move-dist) (get-trans s5-1 3) (-> this origin))
(let ((v1-80 s1-2))
(set! (-> v1-80 radius) 40.96)
(set! (-> v1-80 collide-with) (collide-spec backgnd))
(set! (-> v1-80 ignore-process0) #f)
(set! (-> v1-80 ignore-process1) #f)
(set! (-> v1-80 ignore-pat)
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
)
(set! (-> v1-80 action-mask) (collide-action solid))
)
(if (= (fill-and-probe-using-line-sphere *collide-cache* s1-2) -100000000.0)
(set! s2-2 #t)
)
)
)
)
)
(when s2-2
(send-attack! this s5-1 #t)
(set! (-> this previously-attacked-targets (-> this num-previously-attacked-targets)) (the-as handle s3-2))
(+! (-> this num-previously-attacked-targets) 1)
)
)
)
)
(if (and s4-3 (logtest? (process-mask vehicle) (-> s5-1 mask)))
(send-attack! this s5-1 #f)
)
)
)
)
)
;; og:preserve-this *snip* there was dead code here!
(none)
)
)
@@ -1768,7 +1706,7 @@
(set! (-> a1-11 message) 'get-vehicle)
(let ((s4-0 (send-event-function *target* a1-11)))
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-144) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-144 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(v1-54 (if (type? s1-0 collide-shape)
s1-0
@@ -1785,6 +1723,7 @@
(when s1-1
(when (and (!= *target* s1-1)
(not (focus-test? (the-as process-focusable s1-1) disable dead inactive gun-no-target))
(pc-check-focus-fix (the-as process-focusable s1-1)) ;; og:preserve-this
(or (logtest? (process-mask crate enemy vehicle civilian) (-> s1-1 mask))
(and (logtest? (process-mask guard) (-> s1-1 mask)) (-> *setting-control* user-current gun-target-guards?))
)
@@ -1836,41 +1775,7 @@
)
)
)
(let* ((s2-1 *target*)
(s3-1 (if (type? s2-1 process-focusable)
s2-1
)
)
)
(when (and s3-1 (< (vector-vector-distance (get-trans s3-1 0) sv-144) (-> sv-144 w)))
(when (and (!= *target* s3-1)
(not (focus-test? s3-1 disable dead inactive gun-no-target))
(or (logtest? (process-mask crate enemy vehicle civilian) (-> s3-1 mask))
(and (logtest? (process-mask guard) (-> s3-1 mask)) (-> *setting-control* user-current gun-target-guards?))
)
(!= s4-0 s3-1)
)
(when (or (not s5-0) (logtest? (process-mask enemy guard) (-> s3-1 mask)))
(let ((s1-2 (new 'stack-no-clear 'vector)))
(set! (-> s1-2 quad) (-> (get-trans s3-1 0) quad))
(let ((s2-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) sv-148 1.0))
(s4-1 (new 'stack-no-clear 'vector))
)
(vector-! s4-1 s1-2 sv-24)
(let ((f0-9 (vector-normalize-ret-len! s4-1 1.0))
(f1-8 (vector-dot s2-3 s4-1))
(v1-101 (and (not s5-0) (logtest? (process-mask enemy guard) (-> s3-1 mask))))
)
(if (and (< 0.707 f1-8) (< (fabs (-> s4-1 y)) 28672.0) (or v1-101 (< f0-9 f0-9)))
(set! gp-2 s3-1)
)
)
)
)
)
)
)
)
;; og:preserve-this *snip* there was dead code here!
)
)
(when gp-2
@@ -2317,11 +2222,11 @@
(vf2 :class vf)
(vf3 :class vf)
)
(let ((s5-0 (new 'stack-no-clear 'bounding-box)))
(set! (-> s5-0 min quad) (-> this start-dir quad))
(vector-float*! (the-as vector s5-0) (the-as vector s5-0) 43417.6)
(vector+! (the-as vector s5-0) (the-as vector s5-0) (-> this start-pos))
(set! (-> s5-0 min w) 43827.2)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 quad) (-> this start-dir quad))
(vector-float*! s5-0 s5-0 43417.6)
(vector+! s5-0 s5-0 (-> this start-pos))
(set! (-> s5-0 w) 43827.2)
(let ((s4-0 (-> this root root-prim prim-core collide-with)))
(set! *actor-list-length* 0)
(if (logtest? s4-0 (collide-spec hit-by-others-list))
@@ -2341,7 +2246,7 @@
(a3-1 s5-0)
)
(.lvf vf2 (&-> a2-4 world-sphere quad))
(.lvf vf3 (&-> a3-1 min quad))
(.lvf vf3 (&-> a3-1 quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
@@ -2349,7 +2254,7 @@
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-5 vf1)
(let ((f0-2 a2-5)
(f1-1 (+ (-> a1-5 world-sphere w) (-> s5-0 min w)))
(f1-1 (+ (-> a1-5 world-sphere w) (-> s5-0 w)))
)
(when (< f0-2 (* f1-1 f1-1))
(when (< *actor-list-length* 256)
@@ -2382,7 +2287,7 @@
(a3-2 s5-0)
)
(.lvf vf2 (&-> a2-11 world-sphere quad))
(.lvf vf3 (&-> a3-2 min quad))
(.lvf vf3 (&-> a3-2 quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
@@ -2390,7 +2295,7 @@
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-12 vf1)
(let ((f0-3 a2-12)
(f1-5 (+ (-> a1-17 world-sphere w) (-> s5-0 min w)))
(f1-5 (+ (-> a1-17 world-sphere w) (-> s5-0 w)))
)
(when (< f0-3 (* f1-5 f1-5))
(when (< *actor-list-length* 256)
@@ -5,6 +5,9 @@
;; name in dgo: gun-util
;; dgos: GAME
(defmacro pc-check-focus-fix (focusable)
`(#if PC_PORT (or (not (-> *pc-settings* fix-projectile-focus)) (logtest? (collide-action solid) (-> ,focusable root root-prim prim-core action))) #t))
;; DECOMP BEGINS
(deftype gun-eject (projectile-bounce)
@@ -202,7 +202,7 @@
(set! (-> sv-1072 quad) (-> this root trans quad))
(set! (-> sv-1072 w) 143360.0)
(let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-1072) s5-0 384))
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* sv-1072 s5-0 384))
(let* ((s3-0 (-> s5-0 s4-0))
(v1-34 (if (type? s3-0 collide-shape)
s3-0
@@ -219,6 +219,7 @@
(when s3-1
(when (and (!= *target* s3-1)
(not (focus-test? (the-as process-focusable s3-1) disable dead inactive gun-no-target))
(pc-check-focus-fix (the-as process-focusable s3-1)) ;; og:preserve-this
(or (logtest? (process-mask enemy vehicle civilian) (-> s3-1 mask))
(and (logtest? (process-mask guard) (-> s3-1 mask)) (-> *setting-control* user-current gun-target-guards?))
)
@@ -261,53 +262,7 @@
)
)
)
(let* ((s4-1 *target*)
(s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) sv-1072) (-> sv-1072 w)))
(when (and (!= *target* s5-1)
(not (focus-test? s5-1 disable dead inactive gun-no-target))
(or (logtest? (process-mask enemy vehicle civilian) (-> s5-1 mask))
(and (logtest? (process-mask guard) (-> s5-1 mask)) (-> *setting-control* user-current gun-target-guards?))
)
)
(let ((s4-3 (new 'stack-no-clear 'collide-query)))
(set! (-> s4-3 start-pos quad) (-> this root trans quad))
(vector-! (-> s4-3 move-dist) (get-trans s5-1 3) (-> this root trans))
(let ((v1-94 s4-3))
(set! (-> v1-94 radius) 40.96)
(set! (-> v1-94 collide-with) (collide-spec backgnd))
(set! (-> v1-94 ignore-process0) #f)
(set! (-> v1-94 ignore-process1) #f)
(set! (-> v1-94 ignore-pat)
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
)
(set! (-> v1-94 action-mask) (collide-action solid))
)
(when (< (fill-and-probe-using-line-sphere *collide-cache* s4-3) 0.0)
(set! (-> sv-1076 sv-1080 targ) (process->handle s5-1))
(let ((f0-16 1.0))
(if (and (nonzero? (-> s5-1 draw)) (logtest? (-> s5-1 draw status) (draw-control-status on-screen)))
(set! f0-16 (+ 2.0 f0-16))
)
(if (logtest? (process-mask enemy guard) (-> s5-1 mask))
(set! f0-16 (+ 28.0 f0-16))
)
(if (logtest? (process-mask vehicle civilian) (-> s5-1 mask))
(set! f0-16 (* 0.25 f0-16))
)
(set! (-> sv-1076 sv-1080 value) f0-16)
(set! sv-1088 (+ sv-1088 f0-16))
)
(set! sv-1080 (+ sv-1080 1))
)
)
)
)
)
;; og:preserve-this *snip* there was dead code here!
(set! sv-3792 (new 'stack-no-clear 'array 'int8 100))
(set! sv-3800 0)
(set! sv-3808 (the-as float 0.0))
@@ -1408,7 +1363,7 @@
(set! sv-128 (the-as symbol #f))
(set! sv-136 (the-as handle #f))
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-84) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-84 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(v1-31 (if (type? s1-0 collide-shape)
s1-0
@@ -2367,13 +2367,7 @@
(set! sv-132 (-> self handle-search))
(set! (-> sv-132 length) 0)
(set! (-> sv-128 w) 327680.0)
(set! sv-120 (fill-actor-list-for-box
*actor-hash*
(the-as bounding-box sv-128)
(-> sv-112 data)
(-> sv-112 allocated-length)
)
)
(set! sv-120 (fill-actor-list-for-box *actor-hash* sv-128 (-> sv-112 data) (-> sv-112 allocated-length)))
(set! (-> sv-112 length) sv-120)
(countdown (s5-0 sv-120)
(let* ((s4-0 (-> sv-112 s5-0 process))
+1 -3
View File
@@ -1590,9 +1590,7 @@
(s3-0 (vector-average! (new 'stack-no-clear 'vector) gp-0 s5-0))
)
(set! (-> s3-0 w) (* 0.5 (vector-vector-distance gp-0 s5-0)))
(set! (-> s4-1 length)
(fill-actor-list-for-box *actor-hash* (the-as bounding-box s3-0) (-> s4-1 data) (-> s4-1 allocated-length))
)
(set! (-> s4-1 length) (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-1 data) (-> s4-1 allocated-length)))
)
)
)
+1 -1
View File
@@ -652,7 +652,7 @@
)
(set! *actor-list-length* 0)
(if (logtest? s5-0 (collide-spec hit-by-others-list))
(set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (the-as bounding-box gp-0) *actor-list* 256))
(set! *actor-list-length* (fill-actor-list-for-box *actor-hash* gp-0 *actor-list* 256))
)
(when (logtest? s5-0 (collide-spec player-list))
(let ((a0-2 (-> *collide-player-list* alive-list next0)))
@@ -3161,10 +3161,10 @@
(when (and (not (-> *setting-control* user-current nuke-active?))
(time-elapsed? (-> self spawn-timer) (seconds 6))
(let ((a2-1 (new 'stack-no-clear 'array 'collide-shape 1))
(a1-1 (new 'stack-no-clear 'bounding-box))
(a1-1 (new 'stack-no-clear 'vector))
)
(set! (-> a1-1 min quad) (-> self entity extra trans quad))
(set! (-> a1-1 min w) 24576.0)
(set! (-> a1-1 quad) (-> self entity extra trans quad))
(set! (-> a1-1 w) 24576.0)
(zero? (fill-actor-list-for-box *actor-hash* a1-1 a2-1 1))
)
)
@@ -1399,7 +1399,7 @@
(des-beast-method-164 (_type_) none)
(des-beast-method-165 (_type_) none)
(des-beast-method-166 (_type_) none)
(des-beast-method-167 (_type_ bounding-box) symbol)
(des-beast-method-167 (_type_ vector) symbol)
)
)
@@ -1579,12 +1579,11 @@
(let ((a1-6 (new 'stack-no-clear 'vector)))
(set! (-> a1-6 quad) (-> self root trans quad))
(set! (-> a1-6 w) 409600.0)
(if (or (des-beast-method-167 self (the-as bounding-box a1-6))
(and (-> self can-turn?)
(time-elapsed? (-> self state-time) (seconds 6))
(>= (+ (current-time) (seconds -0.1)) (-> self behind-time))
(< 15.0 (-> self hit-points))
)
(if (or (des-beast-method-167 self a1-6) (and (-> self can-turn?)
(time-elapsed? (-> self state-time) (seconds 6))
(>= (+ (current-time) (seconds -0.1)) (-> self behind-time))
(< 15.0 (-> self hit-points))
)
)
(go-virtual turn-back)
)
@@ -1841,7 +1840,7 @@
)
)
(defmethod des-beast-method-167 ((this des-beast) (arg0 bounding-box))
(defmethod des-beast-method-167 ((this des-beast) (arg0 vector))
;; og:preserve-this
; (gpr->fpr #x7f800000)
(let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))))
@@ -1032,7 +1032,7 @@
(vector-normalize-copy! sv-656 (-> gp-0 fvec) 1.0)
(vector+float*! s4-0 (-> gp-0 trans) sv-656 512000.0)
(set! (-> s4-0 w) 614400.0)
(let ((s3-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) (-> s5-0 data) (-> s5-0 length))))
(let ((s3-0 (fill-actor-list-for-box *actor-hash* s4-0 (-> s5-0 data) (-> s5-0 length))))
(set! (-> s5-0 length) s3-0)
(let ((s4-1 (the-as process #f)))
(let ((f30-0 0.0))
@@ -745,7 +745,7 @@
(set! (-> this lizards-left) s5-1)
)
(set! (-> *game-info* score) (the float (-> this lizards-left)))
(let ((s3-0 (new 'stack-no-clear 'bounding-box))
(let ((s3-0 (new 'stack-no-clear 'vector))
(s4-3 (the-as (array collide-shape) ((method-of-type array new)
(the-as symbol (new 'stack-no-clear 'array 'collide-shape 32))
array
@@ -756,7 +756,7 @@
)
(s5-2 0)
)
(set! (-> s3-0 min quad) (-> this corral-pos quad))
(set! (-> s3-0 quad) (-> this corral-pos quad))
(set! (-> s4-3 length) (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-3 data) (-> s4-3 allocated-length)))
(dotimes (s3-1 (-> s4-3 length))
(if (type? (-> s4-3 s3-1 process) flut)
@@ -757,7 +757,7 @@
(let ((s4-1 (new 'stack 'boxed-array collide-shape 128)))
(set! (-> gp-0 ground-normal-sum x) (the-as float (fill-actor-list-for-box
*actor-hash*
(the-as bounding-box (-> gp-0 p-body))
(-> gp-0 p-body)
(the-as (pointer collide-shape) (-> s4-1 data))
(-> s4-1 allocated-length)
)
+1 -1
View File
@@ -1309,7 +1309,7 @@
(let ((s4-0 544))
(set! *actor-list-length* 0)
(if (logtest? s4-0 512)
(set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (the-as bounding-box s3-0) *actor-list* 256))
(set! *actor-list-length* (fill-actor-list-for-box *actor-hash* s3-0 *actor-list* 256))
)
(when (logtest? s4-0 1024)
(let ((a0-4 (-> *collide-player-list* alive-list next0)))
+3 -3
View File
@@ -777,11 +777,11 @@
(defmethod can-spawn-creature? ((this tow-spawner) (arg0 vector) (arg1 float))
(and (or (not *target*) (< 14336.0 (vector-vector-xz-distance (-> *target* control trans) (-> this root trans))))
(let ((s3-0 (new 'stack-no-clear 'bounding-box))
(let ((s3-0 (new 'stack-no-clear 'vector))
(s4-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 8)))
)
(set! (-> s3-0 min quad) (-> arg0 quad))
(set! (-> s3-0 min w) arg1)
(set! (-> s3-0 quad) (-> arg0 quad))
(set! (-> s3-0 w) arg1)
(let ((gp-1 (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-0 data) (-> s4-0 length))))
(or (zero? gp-1) (begin
(dotimes (s5-1 gp-1)
@@ -1281,7 +1281,7 @@
)
(init-vf0-vector)
(let ((s5-0 (new 'stack-no-clear 'matrix))
(s3-0 (new 'stack-no-clear 'bounding-box))
(s3-0 (new 'stack-no-clear 'vector))
(s4-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 128)))
(f26-0 0.0)
(f28-0 0.0)
@@ -1293,8 +1293,8 @@
(set! (-> this lerp2) 0.0)
(vector-lerp! (-> this aim-dir) (-> s5-0 fvec) (-> this aim-dir) (-> this lerp))
(vector-lerp! (-> this reticle-dir) (-> s5-0 fvec) (-> this reticle-dir) (-> this lerp2))
(vector+float*! (the-as vector s3-0) (-> s5-0 trans) (-> this aim-dir) 2457600.0)
(set! (-> s3-0 min w) 2457600.0)
(vector+float*! s3-0 (-> s5-0 trans) (-> this aim-dir) 2457600.0)
(set! (-> s3-0 w) 2457600.0)
(set! (-> this target-handle) (the-as handle #f))
(let ((s2-1 (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-0 data) (-> s4-0 length))))
(set! (-> s4-0 length) s2-1)
@@ -112,7 +112,7 @@
)
(set! (-> s4-0 w) 16384.0)
(let ((s5-1 (new 'stack-no-clear 'array 'collide-shape 64)))
(countdown (s4-1 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s5-1 64))
(countdown (s4-1 (fill-actor-list-for-box *actor-hash* s4-0 s5-1 64))
(let* ((s3-0 (-> s5-1 s4-1))
(v1-12 (if (type? s3-0 collide-shape)
s3-0
@@ -904,6 +904,7 @@
(flag "Faster airlocks" #f ,(dm-lambda-boolean-flag (-> *pc-settings* fast-airlock?)))
(flag "Faster elevators" #f ,(dm-lambda-boolean-flag (-> *pc-settings* fast-elevator?)))
(flag "Faster progress" #f ,(dm-lambda-boolean-flag (-> *pc-settings* fast-progress?)))
(flag "Fix projectile focus" #f ,(dm-lambda-boolean-flag (-> *pc-settings* fix-projectile-focus)))
)
(menu "Level of detail"
(flag "PS2 LOD " #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-lod-dist?)))
+3
View File
@@ -90,6 +90,8 @@
(fast-progress? symbol)
(minimap-force-north symbol)
(fix-projectile-focus symbol)
;(stats statistics)
;; gfx
@@ -140,6 +142,7 @@
(true! (-> obj fast-airlock?))
(true! (-> obj fast-elevator?))
(false! (-> obj fast-progress?))
(true! (-> obj fix-projectile-focus))
(true! (-> obj smooth-minimap?))
(false! (-> obj minimap-force-north))
(false! (-> obj hires-clouds?))
+2
View File
@@ -606,6 +606,7 @@
(("fast-airlock?") (set! (-> obj fast-airlock?) (file-stream-read-symbol file)))
(("fast-elevator?") (set! (-> obj fast-elevator?) (file-stream-read-symbol file)))
(("fast-progress?") (set! (-> obj fast-progress?) (file-stream-read-symbol file)))
(("fix-projectile-focus") (set! (-> obj fix-projectile-focus) (file-stream-read-symbol file)))
(("smooth-minimap?") (set! (-> obj smooth-minimap?) (file-stream-read-symbol file)))
(("minimap-force-north") (set! (-> obj minimap-force-north) (file-stream-read-symbol file)))
(("hires-clouds?") (set! (-> obj hires-clouds?) (file-stream-read-symbol file)))
@@ -657,6 +658,7 @@
(format file " (fast-airlock? ~A)~%" (-> obj fast-airlock?))
(format file " (fast-elevator? ~A)~%" (-> obj fast-elevator?))
(format file " (fast-progress? ~A)~%" (-> obj fast-progress?))
(format file " (fix-projectile-focus ~A)~%" (-> obj fix-projectile-focus))
(format file " (smooth-minimap? ~A)~%" (-> obj smooth-minimap?))
(format file " (minimap-force-north ~A)~%" (-> obj minimap-force-north))
(format file " (hires-clouds? ~A)~%" (-> obj hires-clouds?))
+2 -2
View File
@@ -104,8 +104,8 @@ This can represent a sphere, a triangle mesh, or a group of other primitives wit
(prim-type prim-type :overlay-at (-> prim-core prim-type))
)
(:methods
(resolve-moving-sphere-tri (_type_ collide-tri-result collide-prim-core vector float collide-action) float)
(resolve-moving-sphere-sphere (_type_ collide-tri-result collide-prim-core vector float collide-action) float)
(resolve-moving-sphere-tri (_type_ collide-query sphere vector float collide-action) float)
(resolve-moving-sphere-sphere (_type_ collide-query sphere vector float collide-action) float)
)
)
+10 -14
View File
@@ -830,14 +830,14 @@
(vf4 :class vf)
)
(init-vf0-vector)
(let ((s5-0 (new 'stack-no-clear 'collide-cache-tri)))
(let ((s5-0 (new 'stack-no-clear 'collide-puls-work)))
(.lvf vf4 (&-> arg0 exit-planes 0 quad))
(.lvf vf3 (&-> arg0 start-pos quad))
(.lvf vf2 (&-> arg0 move-dist quad))
(set! (-> s5-0 vertex 0 x) (the-as float (-> arg0 ignore-pat)))
(set! (-> s5-0 ignore-pat) (-> arg0 ignore-pat))
(.mul.w.vf vf3 vf0 vf4 :mask #b1000)
(.svf (&-> s5-0 vertex 2 quad) vf2)
(.svf (&-> s5-0 vertex 1 quad) vf3)
(.svf (&-> s5-0 move-dist quad) vf2)
(.svf (&-> s5-0 bsphere quad) vf3)
(let ((s4-0 (the-as object (-> this prims)))
(f30-0 -100000000.0)
)
@@ -849,9 +849,9 @@
((>= (-> (the-as collide-cache-prim s4-0) prim-core prim-type) 0)
(let ((f0-0 ((method-of-type collide-cache-prim resolve-moving-sphere-tri)
(the-as collide-cache-prim s4-0)
(the-as collide-tri-result arg0)
(the-as collide-prim-core (-> s5-0 vertex 1))
(-> s5-0 vertex 2)
arg0
(-> s5-0 bsphere)
(-> s5-0 move-dist)
f30-0
(collide-action solid)
)
@@ -869,9 +869,9 @@
)
(let ((f0-1 ((method-of-type collide-cache-prim resolve-moving-sphere-sphere)
(the-as collide-cache-prim s4-0)
(the-as collide-tri-result arg0)
(the-as collide-prim-core (-> s5-0 vertex 1))
(-> s5-0 vertex 2)
arg0
(-> s5-0 bsphere)
(-> s5-0 move-dist)
f30-0
(collide-action solid)
)
@@ -1058,7 +1058,3 @@
(set! v0-4 #f)
(ret-value v0-4)
)
+1 -5
View File
@@ -171,7 +171,7 @@
(set! *actor-list-length* 0)
(if (logtest? s5-0 (collide-spec hit-by-others-list))
(set! *actor-list-length*
(fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> s4-0 prim-core)) *actor-list* 256)
(fill-actor-list-for-box *actor-hash* (the-as vector (-> s4-0 prim-core)) *actor-list* 256)
)
)
(when (logtest? s5-0 (collide-spec player-list))
@@ -438,7 +438,3 @@
)
)
)
+22 -36
View File
@@ -416,11 +416,11 @@
(vf4 :class vf)
(vf5 :class vf)
)
(let* ((gp-0 (new 'stack-no-clear 'collide-tri-result))
(let* ((gp-0 (new 'stack-no-clear 'collide-query))
(f0-1 (resolve-moving-sphere-tri
arg1
gp-0
(-> this prim-core)
(the-as sphere (-> this prim-core))
(-> arg0 move-dist)
(-> arg0 best-dist)
(-> this prim-core action)
@@ -441,13 +441,13 @@
(b! (= v1-5 #f) cfg-5 :likely-delay (set! a2-2 (the-as collide-shape-prim #f)))
(b! (logtest? (-> a0-3 penetrate-using) (-> v1-5 penetrated-by)) cfg-6 :delay (nop!))
(label cfg-5)
(.lvf vf3 (&-> gp-0 vertex 0 quad))
(.lvf vf4 (&-> gp-0 vertex 1 quad))
(.lvf vf5 (&-> gp-0 vertex 2 quad))
(.lvf vf1 (&-> gp-0 intersect quad))
(.lvf vf2 (&-> gp-0 normal quad))
(let ((a0-6 (-> gp-0 pat))
(a1-4 (-> gp-0 collide-ptr))
(.lvf vf3 (&-> gp-0 best-other-tri vertex 0 quad))
(.lvf vf4 (&-> gp-0 best-other-tri vertex 1 quad))
(.lvf vf5 (&-> gp-0 best-other-tri vertex 2 quad))
(.lvf vf1 (&-> gp-0 best-other-tri intersect quad))
(.lvf vf2 (&-> gp-0 best-other-tri normal quad))
(let ((a0-6 (-> gp-0 best-other-tri pat))
(a1-4 (-> gp-0 best-other-tri collide-ptr))
)
(set! (-> arg0 best-dist) f0-1)
(.svf (&-> arg0 best-other-tri vertex 0 quad) vf3)
@@ -463,14 +463,7 @@
(label cfg-6)
(b! (not v1-5) cfg-8 :delay (empty-form))
)
(add-touching-prims
*touching-list*
this
a2-2
f0-1
(the-as collide-tri-result #f)
(the-as collide-tri-result (-> gp-0 vertex))
)
(add-touching-prims *touching-list* this a2-2 f0-1 (the-as collide-tri-result #f) (-> gp-0 best-other-tri))
)
)
)
@@ -520,11 +513,11 @@
(vf4 :class vf)
(vf5 :class vf)
)
(let* ((gp-0 (new 'stack-no-clear 'collide-tri-result))
(let* ((gp-0 (new 'stack-no-clear 'collide-query))
(f0-1 (resolve-moving-sphere-sphere
arg1
gp-0
(-> this prim-core)
(the-as sphere (-> this prim-core))
(-> arg0 move-dist)
(-> arg0 best-dist)
(-> arg1 prim-core action)
@@ -544,13 +537,13 @@
(b! (zero? a1-2) cfg-4 :delay (nop!))
(b! (logtest? (-> v1-4 penetrate-using) (-> a0-4 penetrated-by)) cfg-4 :delay (nop!))
)
(.lvf vf3 (&-> gp-0 vertex 0 quad))
(.lvf vf4 (&-> gp-0 vertex 1 quad))
(.lvf vf5 (&-> gp-0 vertex 2 quad))
(.lvf vf1 (&-> gp-0 intersect quad))
(.lvf vf2 (&-> gp-0 normal quad))
(let ((v1-7 (-> gp-0 pat))
(a0-6 (-> gp-0 collide-ptr))
(.lvf vf3 (&-> gp-0 best-other-tri vertex 0 quad))
(.lvf vf4 (&-> gp-0 best-other-tri vertex 1 quad))
(.lvf vf5 (&-> gp-0 best-other-tri vertex 2 quad))
(.lvf vf1 (&-> gp-0 best-other-tri intersect quad))
(.lvf vf2 (&-> gp-0 best-other-tri normal quad))
(let ((v1-7 (-> gp-0 best-other-tri pat))
(a0-6 (-> gp-0 best-other-tri collide-ptr))
)
(set! (-> arg0 best-dist) f0-1)
(.svf (&-> arg0 best-other-tri vertex 0 quad) vf3)
@@ -564,14 +557,7 @@
(set! (-> arg0 best-other-prim) a2-2)
(set! (-> arg0 best-my-prim) this)
(label cfg-4)
(add-touching-prims
*touching-list*
this
a2-2
f0-1
(the-as collide-tri-result #f)
(the-as collide-tri-result (-> gp-0 vertex))
)
(add-touching-prims *touching-list* this a2-2 f0-1 (the-as collide-tri-result #f) (-> gp-0 best-other-tri))
)
)
(label cfg-5)
@@ -2476,7 +2462,7 @@
(set! *actor-list-length* 0)
(if (logtest? s4-0 (collide-spec hit-by-others-list))
(set! *actor-list-length*
(fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> this root-prim prim-core)) *actor-list* 256)
(fill-actor-list-for-box *actor-hash* (the-as vector (-> this root-prim prim-core)) *actor-list* 256)
)
)
(when (logtest? s4-0 (collide-spec player-list))
@@ -2658,7 +2644,7 @@
(set! *actor-list-length* 0)
(b! (not (logtest? (the-as collide-spec s2-0) 512)) cfg-2 :delay (empty-form))
(set! *actor-list-length*
(fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> s3-0 prim-core)) *actor-list* 256)
(fill-actor-list-for-box *actor-hash* (the-as vector (-> s3-0 prim-core)) *actor-list* 256)
)
(label cfg-2)
(b! (not (logtest? (the-as collide-spec s2-0) 1024)) cfg-11 :delay (empty-form))
+1 -7
View File
@@ -362,9 +362,7 @@
(init-vf0-vector)
(set! *actor-list-length* 0)
(if #t
(set! *actor-list-length*
(fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> this collide-bounds)) *actor-list* 256)
)
(set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (-> this collide-bounds) *actor-list* 256))
)
(when #t
(let ((a0-2 (-> *collide-player-list* alive-list next0)))
@@ -695,7 +693,3 @@
(set! (-> this flow) (new 'process 'flow-control (the-as process-drawable this) (the-as res-lump #f)))
(go (method-of-object this idle))
)
+1 -1
View File
@@ -277,7 +277,7 @@
)
)
(else
(let ((s1-0 (new 'stack-no-clear 'bounding-box))
(let ((s1-0 (new 'stack-no-clear 'vector))
(s2-1 (new 'stack 'boxed-array collide-shape 32))
)
(sphere<-vector+r! (the-as sphere s1-0) arg1 arg2)
+1 -5
View File
@@ -212,7 +212,7 @@ O(n^2) 'check everybody against everybody' collision loop."
(new (symbol type int int) _type_)
(spatial-hash-method-33 (_type_ vector hash-object-info) none)
(add-an-object (_type_ bounding-box (pointer collide-shape) int) int)
(fill-actor-list-for-box (_type_ bounding-box (pointer collide-shape) int) int)
(fill-actor-list-for-box (_type_ vector (pointer collide-shape) int) int)
(fill-actor-list-for-sphere (_type_ vector vector float (pointer collide-shape) int int) int)
(fill-actor-list-for-line-sphere (_type_ vector vector float (pointer collide-shape) int int) int)
(fill-actor-list-for-vec+r (_type_ vector (pointer collide-shape) int) int)
@@ -258,7 +258,3 @@ O(n^2) 'check everybody against everybody' collision loop."
;; failed to figure out what this is:
0
+3 -3
View File
@@ -976,9 +976,9 @@
(arg4 int)
(arg5 int)
)
(let ((v1-0 (new 'stack-no-clear 'bounding-box)))
(set! (-> v1-0 min quad) (-> arg0 quad))
(set! (-> v1-0 min w) 0.0)
(let ((v1-0 (new 'stack-no-clear 'vector)))
(set! (-> v1-0 quad) (-> arg0 quad))
(set! (-> v1-0 w) 0.0)
(fill-actor-list-for-box this v1-0 (the-as (pointer collide-shape) arg1) (the-as int arg2))
)
)
+11 -11
View File
@@ -510,16 +510,16 @@
(vf2 :class vf)
)
(init-vf0-vector)
(let ((gp-0 (new 'stack-no-clear 'bounding-box)))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(cond
(arg0
(set! (-> gp-0 min quad) (-> self control trans quad))
(set! (-> gp-0 min w) 49152.0)
(set! (-> gp-0 quad) (-> self control trans quad))
(set! (-> gp-0 w) 49152.0)
)
(else
(vector-normalize! (vector-z-quaternion! (the-as vector gp-0) (-> self control quat)) -12288.0)
(vector+! (the-as vector gp-0) (the-as vector gp-0) (-> self control trans))
(set! (-> gp-0 min w) 24576.0)
(vector-normalize! (vector-z-quaternion! gp-0 (-> self control quat)) -12288.0)
(vector+! gp-0 gp-0 (-> self control trans))
(set! (-> gp-0 w) 24576.0)
)
)
(let ((s5-1 (new 'stack-no-clear 'array 'collide-shape 384)))
@@ -539,7 +539,7 @@
)
(when a0-11
(when (!= *target* a0-11)
(let ((v1-13 (vector-! (new 'stack-no-clear 'vector) (-> a0-11 root trans) (the-as vector gp-0))))
(let ((v1-13 (vector-! (new 'stack-no-clear 'vector) (-> a0-11 root trans) gp-0)))
0.0
(.lvf vf1 (&-> v1-13 quad))
)
@@ -550,7 +550,7 @@
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
(.mov v1-14 vf1)
(let ((f0-3 v1-14)
(f1-0 (-> gp-0 min w))
(f1-0 (-> gp-0 w))
)
(if (>= (* f1-0 f1-0) f0-3)
(send-event a0-11 'green-eco-attack)
@@ -569,9 +569,9 @@
)
)
)
(when (and s5-2 (< (vector-vector-distance (get-trans s5-2 0) (the-as vector gp-0)) (-> gp-0 min w)))
(when (and s5-2 (< (vector-vector-distance (get-trans s5-2 0) gp-0) (-> gp-0 w)))
(when (!= *target* s5-2)
(let ((v1-24 (vector-! (new 'stack-no-clear 'vector) (-> s5-2 control trans) (the-as vector gp-0))))
(let ((v1-24 (vector-! (new 'stack-no-clear 'vector) (-> s5-2 control trans) gp-0)))
0.0
(.lvf vf1 (&-> v1-24 quad))
)
@@ -582,7 +582,7 @@
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
(.mov v1-25 vf1)
(let ((f0-6 v1-25)
(f1-4 (-> gp-0 min w))
(f1-4 (-> gp-0 w))
)
(if (>= (* f1-4 f1-4) f0-6)
(send-event s5-2 'green-eco-attack)
+1 -1
View File
@@ -550,7 +550,7 @@
(vector+! s5-1 s5-1 (-> this root trans))
(set! (-> s5-1 w) 16384.0)
(let ((s4-1 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s5-1) s4-1 384))
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-1 s4-1 384))
(let* ((s2-0 (-> s4-1 s3-0))
(v1-21 (if (type? s2-0 collide-shape)
s2-0
+1 -3
View File
@@ -74,9 +74,7 @@
(let ((gp-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 32))))
(let ((a1-2 (sphere<-vector+r! (new 'stack-no-clear 'sphere) (-> this root trans) 16384.0)))
(+! (-> a1-2 y) 12288.0)
(set! (-> gp-0 length)
(fill-actor-list-for-box *actor-hash* (the-as bounding-box a1-2) (-> gp-0 data) (-> gp-0 allocated-length))
)
(set! (-> gp-0 length) (fill-actor-list-for-box *actor-hash* a1-2 (-> gp-0 data) (-> gp-0 allocated-length)))
)
(let* ((s5-1 (-> gp-0 length))
(s4-0 0)
+4 -5
View File
@@ -565,7 +565,7 @@
(set! (-> sv-1280 quad) (-> sv-144 fire-point quad))
(set! (-> sv-1280 w) 163840.0)
(let ((gp-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s5-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-1280) gp-0 384))
(countdown (s5-0 (fill-actor-list-for-box *actor-hash* sv-1280 gp-0 384))
(let* ((s4-0 (-> gp-0 s5-0))
(v1-16 (if (type? s4-0 collide-shape)
s4-0
@@ -813,9 +813,8 @@
)
;; definition for function draw-beam-segment
;; WARN: Return type mismatch symbol vs none.
(defun draw-beam-segment ()
(none)
#f
)
;; definition for symbol *found-objects*, type (pointer handle)
@@ -2037,7 +2036,7 @@
)
(set! (-> sv-40 w) 0.0)
(let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box arg0) s4-0 384))
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* arg0 s4-0 384))
(let* ((s2-0 (-> s4-0 s3-0))
(a0-5 (if (type? s2-0 collide-shape)
s2-0
@@ -2103,7 +2102,7 @@
(set! (-> arg0 w) 16384.0)
(set! (-> sv-40 w) 1.0)
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box arg0) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* arg0 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(a0-5 (if (type? s1-0 collide-shape)
s1-0
+4 -4
View File
@@ -902,7 +902,7 @@
(set! (-> s4-0 quad) (-> this root trans quad))
(set! (-> s4-0 w) 1228800.0)
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s4-0 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(v1-5 (if (type? s1-0 collide-shape)
s1-0
@@ -2164,7 +2164,7 @@
(let ((s5-1 (send-event-function *target* a1-13)))
(set! (-> s4-0 w) (-> self blast-radius))
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s4-0 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(v1-66 (if (type? s1-0 collide-shape)
s1-0
@@ -2807,7 +2807,7 @@
(set! (-> sv-144 quad) (-> (get-trans (the-as process-focusable s5-0) 3) quad))
(set! (-> sv-144 r) sv-160)
(let ((s3-2 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-144) s3-2 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-144 s3-2 384))
(let* ((s1-0 (-> s3-2 s2-0))
(a0-15 (if (type? s1-0 collide-shape)
s1-0
@@ -3977,7 +3977,7 @@
)
(set! (-> s5-0 w) f28-0)
(let ((s3-1 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s5-0) s3-1 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-1 384))
(let* ((s1-0 (-> s3-1 s2-0))
(v1-17 (if (type? s1-0 collide-shape)
s1-0
+17 -17
View File
@@ -270,7 +270,7 @@
(set! (-> s5-0 quad) (-> this root trans quad))
(set! (-> s5-0 w) (-> this blast-radius))
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s5-0) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(a0-8 (if (type? s1-0 collide-shape)
s1-0
@@ -410,7 +410,7 @@
(set! (-> s4-0 quad) (-> this root trans quad))
(set! (-> s4-0 w) (* 0.6666667 (-> this blast-radius)))
(let ((s2-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s1-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s2-0 384))
(countdown (s1-0 (fill-actor-list-for-box *actor-hash* s4-0 s2-0 384))
(let* ((s0-0 (-> s2-0 s1-0))
(a0-8 (if (type? s0-0 collide-shape)
s0-0
@@ -765,7 +765,7 @@
;; INFO: Used lq/sq
(defmethod find-targets-and-attack! ((this gun-red-2-shockwave))
(local-vars
(sv-32 bounding-box)
(sv-32 vector)
(sv-2672 (function vector vector float))
(sv-2688 vector)
(sv-2704 vector)
@@ -777,9 +777,9 @@
(vf6 :class vf)
)
(init-vf0-vector)
(set! sv-32 (the-as bounding-box (new 'stack-no-clear 'vector)))
(set! (-> sv-32 min quad) (-> this origin quad))
(set! (-> sv-32 min w) (-> this current-radius))
(set! sv-32 (new 'stack-no-clear 'vector))
(set! (-> sv-32 quad) (-> this origin quad))
(set! (-> sv-32 w) (-> this current-radius))
(let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* sv-32 s5-0 384))
(let* ((s3-0 (-> s5-0 s4-0))
@@ -878,7 +878,7 @@
)
)
)
(when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) (the-as vector sv-32)) (-> sv-32 min w)))
(when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) sv-32) (-> sv-32 w)))
(when (and (!= *target* s5-1)
(not (focus-test? s5-1 disable dead inactive))
(or (logtest? (process-mask crate enemy vehicle civilian) (-> s5-1 mask))
@@ -2025,7 +2025,7 @@
(set! (-> a1-11 message) 'get-vehicle)
(let ((s4-0 (send-event-function *target* a1-11)))
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-144) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-144 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(v1-54 (if (type? s1-0 collide-shape)
s1-0
@@ -2593,11 +2593,11 @@
(vf2 :class vf)
(vf3 :class vf)
)
(let ((s5-0 (new 'stack-no-clear 'bounding-box)))
(set! (-> s5-0 min quad) (-> this start-dir quad))
(vector-float*! (the-as vector s5-0) (the-as vector s5-0) 43417.6)
(vector+! (the-as vector s5-0) (the-as vector s5-0) (-> this start-pos))
(set! (-> s5-0 min w) 43827.2)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 quad) (-> this start-dir quad))
(vector-float*! s5-0 s5-0 43417.6)
(vector+! s5-0 s5-0 (-> this start-pos))
(set! (-> s5-0 w) 43827.2)
(let ((s4-0 (-> this root root-prim prim-core collide-with)))
(set! *actor-list-length* 0)
(if (logtest? s4-0 (collide-spec hit-by-others-list))
@@ -2617,7 +2617,7 @@
(a3-1 s5-0)
)
(.lvf vf2 (&-> a2-4 world-sphere quad))
(.lvf vf3 (&-> a3-1 min quad))
(.lvf vf3 (&-> a3-1 quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
@@ -2625,7 +2625,7 @@
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-5 vf1)
(let ((f0-2 a2-5)
(f1-1 (+ (-> a1-5 world-sphere w) (-> s5-0 min w)))
(f1-1 (+ (-> a1-5 world-sphere w) (-> s5-0 w)))
)
(when (< f0-2 (* f1-1 f1-1))
(when (< *actor-list-length* 256)
@@ -2658,7 +2658,7 @@
(a3-2 s5-0)
)
(.lvf vf2 (&-> a2-11 world-sphere quad))
(.lvf vf3 (&-> a3-2 min quad))
(.lvf vf3 (&-> a3-2 quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
@@ -2666,7 +2666,7 @@
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-12 vf1)
(let ((f0-3 a2-12)
(f1-5 (+ (-> a1-17 world-sphere w) (-> s5-0 min w)))
(f1-5 (+ (-> a1-17 world-sphere w) (-> s5-0 w)))
)
(when (< f0-3 (* f1-5 f1-5))
(when (< *actor-list-length* 256)
+2 -2
View File
@@ -321,7 +321,7 @@
(set! (-> sv-1072 quad) (-> this root trans quad))
(set! (-> sv-1072 w) 143360.0)
(let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-1072) s5-0 384))
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* sv-1072 s5-0 384))
(let* ((s3-0 (-> s5-0 s4-0))
(v1-34 (if (type? s3-0 collide-shape)
s3-0
@@ -1592,7 +1592,7 @@
(set! sv-128 (the-as symbol #f))
(set! sv-136 (the-as handle #f))
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-84) s3-0 384))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-84 s3-0 384))
(let* ((s1-0 (-> s3-0 s2-0))
(v1-31 (if (type? s1-0 collide-shape)
s1-0
+1 -7
View File
@@ -2457,13 +2457,7 @@
(set! sv-132 (-> self handle-search))
(set! (-> sv-132 length) 0)
(set! (-> sv-128 w) 327680.0)
(set! sv-120 (fill-actor-list-for-box
*actor-hash*
(the-as bounding-box sv-128)
(-> sv-112 data)
(-> sv-112 allocated-length)
)
)
(set! sv-120 (fill-actor-list-for-box *actor-hash* sv-128 (-> sv-112 data) (-> sv-112 allocated-length)))
(set! (-> sv-112 length) sv-120)
(countdown (s5-0 sv-120)
(let* ((s4-0 (-> sv-112 s5-0 process))
+1 -3
View File
@@ -1602,9 +1602,7 @@
(s3-0 (vector-average! (new 'stack-no-clear 'vector) gp-0 s5-0))
)
(set! (-> s3-0 w) (* 0.5 (vector-vector-distance gp-0 s5-0)))
(set! (-> s4-1 length)
(fill-actor-list-for-box *actor-hash* (the-as bounding-box s3-0) (-> s4-1 data) (-> s4-1 allocated-length))
)
(set! (-> s4-1 length) (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-1 data) (-> s4-1 allocated-length)))
)
)
)
+1 -1
View File
@@ -780,7 +780,7 @@
)
(set! *actor-list-length* 0)
(if (logtest? s5-0 (collide-spec hit-by-others-list))
(set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (the-as bounding-box gp-0) *actor-list* 256))
(set! *actor-list-length* (fill-actor-list-for-box *actor-hash* gp-0 *actor-list* 256))
)
(when (logtest? s5-0 (collide-spec player-list))
(let ((a0-2 (-> *collide-player-list* alive-list next0)))
@@ -3326,10 +3326,10 @@
(when (and (not (-> *setting-control* user-current nuke-active?))
(time-elapsed? (-> self spawn-timer) (seconds 6))
(let ((a2-1 (new 'stack-no-clear 'array 'collide-shape 1))
(a1-1 (new 'stack-no-clear 'bounding-box))
(a1-1 (new 'stack-no-clear 'vector))
)
(set! (-> a1-1 min quad) (-> self entity extra trans quad))
(set! (-> a1-1 min w) 24576.0)
(set! (-> a1-1 quad) (-> self entity extra trans quad))
(set! (-> a1-1 w) 24576.0)
(zero? (fill-actor-list-for-box *actor-hash* a1-1 a2-1 1))
)
)
+7 -8
View File
@@ -1522,7 +1522,7 @@
(des-beast-method-164 (_type_) none)
(des-beast-method-165 (_type_) none)
(des-beast-method-166 (_type_) none)
(des-beast-method-167 (_type_ bounding-box) symbol)
(des-beast-method-167 (_type_ vector) symbol)
)
)
@@ -1745,12 +1745,11 @@
(let ((a1-6 (new 'stack-no-clear 'vector)))
(set! (-> a1-6 quad) (-> self root trans quad))
(set! (-> a1-6 w) 409600.0)
(if (or (des-beast-method-167 self (the-as bounding-box a1-6))
(and (-> self can-turn?)
(time-elapsed? (-> self state-time) (seconds 6))
(>= (+ (current-time) (seconds -0.1)) (-> self behind-time))
(< 15.0 (-> self hit-points))
)
(if (or (des-beast-method-167 self a1-6) (and (-> self can-turn?)
(time-elapsed? (-> self state-time) (seconds 6))
(>= (+ (current-time) (seconds -0.1)) (-> self behind-time))
(< 15.0 (-> self hit-points))
)
)
(go-virtual turn-back)
)
@@ -2015,7 +2014,7 @@
)
;; definition for method 167 of type des-beast
(defmethod des-beast-method-167 ((this des-beast) (arg0 bounding-box))
(defmethod des-beast-method-167 ((this des-beast) (arg0 vector))
(gpr->fpr #x7f800000)
(let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))))
(set! (-> s5-0 y) 0.0)
+1 -1
View File
@@ -1150,7 +1150,7 @@
(vector-normalize-copy! sv-656 (-> gp-0 fvec) 1.0)
(vector+float*! s4-0 (-> gp-0 trans) sv-656 512000.0)
(set! (-> s4-0 w) 614400.0)
(let ((s3-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) (-> s5-0 data) (-> s5-0 length))))
(let ((s3-0 (fill-actor-list-for-box *actor-hash* s4-0 (-> s5-0 data) (-> s5-0 length))))
(set! (-> s5-0 length) s3-0)
(let ((s4-1 (the-as process #f)))
(let ((f30-0 0.0))
@@ -813,7 +813,7 @@
(set! (-> this lizards-left) s5-1)
)
(set! (-> *game-info* score) (the float (-> this lizards-left)))
(let ((s3-0 (new 'stack-no-clear 'bounding-box))
(let ((s3-0 (new 'stack-no-clear 'vector))
(s4-3 (the-as (array collide-shape) ((method-of-type array new)
(the-as symbol (new 'stack-no-clear 'array 'collide-shape 32))
array
@@ -824,7 +824,7 @@
)
(s5-2 0)
)
(set! (-> s3-0 min quad) (-> this corral-pos quad))
(set! (-> s3-0 quad) (-> this corral-pos quad))
(set! (-> s4-3 length) (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-3 data) (-> s4-3 allocated-length)))
(dotimes (s3-1 (-> s4-3 length))
(if (type? (-> s4-3 s3-1 process) flut)
@@ -1058,7 +1058,3 @@
;; failed to figure out what this is:
0
@@ -810,7 +810,7 @@
(let ((s4-1 (new 'stack 'boxed-array collide-shape 128)))
(set! (-> gp-0 ground-normal-sum x) (the-as float (fill-actor-list-for-box
*actor-hash*
(the-as bounding-box (-> gp-0 p-body))
(-> gp-0 p-body)
(the-as (pointer collide-shape) (-> s4-1 data))
(-> s4-1 allocated-length)
)
+1 -5
View File
@@ -1383,7 +1383,7 @@
(let ((s4-0 544))
(set! *actor-list-length* 0)
(if (logtest? s4-0 512)
(set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (the-as bounding-box s3-0) *actor-list* 256))
(set! *actor-list-length* (fill-actor-list-for-box *actor-hash* s3-0 *actor-list* 256))
)
(when (logtest? s4-0 1024)
(let ((a0-4 (-> *collide-player-list* alive-list next0)))
@@ -2071,7 +2071,3 @@
0
(none)
)
+3 -7
View File
@@ -873,11 +873,11 @@
;; INFO: Used lq/sq
(defmethod can-spawn-creature? ((this tow-spawner) (arg0 vector) (arg1 float))
(and (or (not *target*) (< 14336.0 (vector-vector-xz-distance (-> *target* control trans) (-> this root trans))))
(let ((s3-0 (new 'stack-no-clear 'bounding-box))
(let ((s3-0 (new 'stack-no-clear 'vector))
(s4-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 8)))
)
(set! (-> s3-0 min quad) (-> arg0 quad))
(set! (-> s3-0 min w) arg1)
(set! (-> s3-0 quad) (-> arg0 quad))
(set! (-> s3-0 w) arg1)
(let ((gp-1 (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-0 data) (-> s4-0 length))))
(or (zero? gp-1) (begin
(dotimes (s5-1 gp-1)
@@ -1162,7 +1162,3 @@
0
(none)
)
+3 -3
View File
@@ -1257,7 +1257,7 @@
)
(init-vf0-vector)
(let ((s5-0 (new 'stack-no-clear 'matrix))
(s3-0 (new 'stack-no-clear 'bounding-box))
(s3-0 (new 'stack-no-clear 'vector))
(s4-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 128)))
(f26-0 0.0)
(f28-0 0.0)
@@ -1269,8 +1269,8 @@
(set! (-> this lerp2) 0.0)
(vector-lerp! (-> this aim-dir) (-> s5-0 fvec) (-> this aim-dir) (-> this lerp))
(vector-lerp! (-> this reticle-dir) (-> s5-0 fvec) (-> this reticle-dir) (-> this lerp2))
(vector+float*! (the-as vector s3-0) (-> s5-0 trans) (-> this aim-dir) 2457600.0)
(set! (-> s3-0 min w) 2457600.0)
(vector+float*! s3-0 (-> s5-0 trans) (-> this aim-dir) 2457600.0)
(set! (-> s3-0 w) 2457600.0)
(set! (-> this target-handle) (the-as handle #f))
(let ((s2-1 (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-0 data) (-> s4-0 length))))
(set! (-> s4-0 length) s2-1)
@@ -124,7 +124,7 @@
)
(set! (-> s4-0 w) 16384.0)
(let ((s5-1 (new 'stack-no-clear 'array 'collide-shape 64)))
(countdown (s4-1 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s5-1 64))
(countdown (s4-1 (fill-actor-list-for-box *actor-hash* s4-0 s5-1 64))
(let* ((s3-0 (-> s5-1 s4-1))
(v1-12 (if (type? s3-0 collide-shape)
s3-0