Closed Tombez closed 4 years ago
To clarify, to trigger the bug, one would only need to hold one's cursor in the center of the screen while free roam spectating. That would make the difference between their cursor position and their camera position zero, which causes the division by zero.
Have you done any performance tests on this? To me it seems as though this bug was a result of some optimizations.
The bug is not the result of optimization, it is unrelated to the bitwise not operations. I'll do a perf test now.
MOII before pr:
MOII after pr:
Both tests were run with 499 bots, one spectator, for 5 minutes.
I added back the bitwise NOT operations, as it was unrelated to the bug. If you merge this PR first, I can rebase my other PR and solve the merge conflicts.
Thanks Tombez. :)
Division by zero causes camera coordinates to jump to infinity