diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-22 22:40:03 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-22 22:40:03 -0500 |
commit | 96e93ae852f79346f71c1b94f704b7f8e986f251 (patch) | |
tree | db27ec59e7d0f7ab3d3f3c211e67b9af41318982 /res | |
parent | 09133930d96ec1b9dc398cda59376622b7d5177f (diff) | |
download | tanetane-96e93ae852f79346f71c1b94f704b7f8e986f251.tar.gz tanetane-96e93ae852f79346f71c1b94f704b7f8e986f251.tar.bz2 tanetane-96e93ae852f79346f71c1b94f704b7f8e986f251.zip |
Fixed issue with double counting collisions
Because of an issue with how collision checking with sprites worked, it was possible that you could collide with a boundary twice (once when moving up to it, and once when moving from it to past it, instead of just one or the other) when moving up or left as long as the colliding sprite had the ID zero. This was causing a fun issue where the map change script from hallucination_interior to hallucination_cliff was getting triggered twice, but only every other time. Because we're using integers and not real numbers, we can make the boundary exclusive by adding one. The issue was also technically possible in the down and right directions, but only if the sprite ID was INT_MAX, which is unlikely to occur. It was decided that the former collision is the real one (if you start away from the boundary and then move into it).
Diffstat (limited to 'res')
0 files changed, 0 insertions, 0 deletions