mirror of
https://github.com/open-goal/jak-project
synced 2026-05-30 00:47:20 -04:00
a5ac2b0fcc
If the `arg0` vector has extreme values, `a2-0` and `a1-1` can end up being negative, which leads to out-of-bounds access when using these values to read from the `xz-height-map`'s `data` array, and crashes the game (you can pretty easily reproduce this in jak 3 by overcharging the "superfasthoverbikeglitch") The `min` here already makes sure these values don't go too high, but doesn't cover the case when they go negative. As I understand it, this `data` in the `*traffic-height-map*` functions as a 2d array, bucketing x/z coordinates into heights for the vehicle.