Skip to content
Snippets Groups Projects

Use R_PointToDist2 over FixedHypot, and FixedHypot over P_AproxDistance

Merged Sal requested to merge no-aprox-dist into next

Not convinced that the small speed benefit from P_AproxDistance is worth the "aproximate"[sic] results it gives. Additionally, FixedHypot has overflow issues where R_PointToDist2 doesn't. To consolidate these, I have made FixedHypot use R_PointToDist2's code, and made P_AproxDistance & R_PointToDist2 both simply use FixedHypot. In Lua, using P_AproxDistance will output a deprecated warning.

Inspired by the hyperwall fix for vanilla, except for everything. From little testing, actively improves waypoint checks, bumping, speed checks, wall collisions, Jawz targeting, Lightning Shield attacks, so on.

The only way I see this as a potential downgrade is A_Look (and related functions) getting slower, which are barely used in Kart.

Edited by Sal

Merge request reports

Merged by SalSal 4 years ago (Nov 10, 2020 7:50pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading