Guichaguri / BetterFps

Performance Improvements
GNU Lesser General Public License v2.1
99 stars 22 forks source link

Fix Beacon AABB #120

Closed Shad0wlife closed 6 years ago

Shad0wlife commented 6 years ago

This issue was described in #97 and should be fixed hereby.

Explanation: The old Fastbeacon AABB expansion was wrong. Expand only expands in 1 direction, to higher values with a positive value or to lower values with a negative value (so expand(1,1,1) makes the AABB Grow 1 towards the higher coordinates but stay the same towards the smaller coordinates).

Now it uses grow like in vanilla which increases the size in all directions. Just that vanilla uses grow(double) which calls grow(double, douoble, double) but this calls the second instantly so there's 1 function call less (not that it REALLY matters, the grow(double) would look cleaner).

Guichaguri commented 6 years ago

Thanks