Closed main-gi closed 3 years ago
Also, no need to tag your name in comments. commit history will show who left the code in. Also, I tend to avoid comments in new code, as writing code with better variable names and function names tend to do more for code maintainability than comments. So unless something is very ambiguous, I usually don't like commenting. Just my 2Cents.
Good concept, execution was a little more complicated than necessary. I'm just committing a simpler equivalent version.
When respawning, instead of pointing at the nearest gem, this change will point it at the highest value nearest gem, which makes it faster to see and aim at blues/platinums.
The code is also rather verbose, putting an alt version of the function everywhere. I think "pointToNearestGem" is still used elsewhere, that's mostly why.
I also noticed this code occasionally doesn't work, but only on the first spawn of a level. May be related to how the game and radar sometimes doesn't show gems on the first spawn.