mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-23 22:29:53 +00:00
08741f0a42
Should fix https://github.com/open-goal/jak-project/issues/2679 Here's a test program that will trigger the bug when near these guards: ```lisp (define *cquery* (new 'global 'collide-query)) (defun test-bad-collide () (let ((lower (new 'static 'vector :x 1681893.8750 :y 61314.2031 :z 345208.6562 :w 1.)) (upper (new 'static 'vector :x 1701603.8750 :y 67624.0625 :z 357881.0312 :w 1.)) ;(cquery (new 'stack-no-clear 'collide-query)) ) (set! (-> *cquery* collide-with) (the-as collide-spec 1)) (set! (-> *cquery* ignore-process0) #f) (set! (-> *cquery* ignore-process1) #f) (set! (-> *cquery* ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1)) (set! (-> *cquery* action-mask) (collide-action solid)) (set! (-> *cquery* bbox min quad) (-> lower quad)) (set! (-> *cquery* bbox max quad) (-> upper quad)) (format 0 "doing collide...~%") (fill-using-bounding-box *collide-cache* *cquery*) (format 0 "have ~d and ~d~%" (-> *collide-cache* num-tris) (-> *collide-cache* num-prims)) ) (none) ) ``` As far as I can tell, there's a totally invalid collide-hash with an inside `axis-scale.z`. On the PS2, it gets ignore because of how float->int works for floats that are too big. On PC, it ends up using a negative value and loop forever. |
||
---|---|---|
.. | ||
img | ||
progress-notes | ||
scratch |