Skip to content
Snippets Groups Projects

NiGHTS fix lap detection on inverted axis

Merged mazmazz requested to merge public-nights-invertloopfix into next

Backported from 2.2.

Prior, if drone is on inverted axis, player could break lap detection (which dictates hoop/ring respawn during bonus time) just by U-turning. player->anotherflyangle breaks in this case.

Example GIF

Fixed by using player->flyangle instead. No ill effects, works as expected in both regular and inverted axis types.

See here for discussion.

Note about > < vs >= <= comparison

Due to using flyangle, this also changes the angle comparison slightly (> 90 && < 270 instead of >= 90 && <= 270) to account for the edge case where flying directly up (flyangle 90) or directly down (flyangle 270) is registered as a BACKWARDS loop, not a FORWARDS loop. So if you JUMPTOAXIS out of drone while flyangle 90 or 270, you could only trigger a loop by flying the track BACKWARDS. This edge case, though impossible without JUMPTOAXIS, should default to a FORWARDS loop.

anotherflyangle worked differently so this bug did not exist with the >= comparison.

Example of the above (doesn't demonstrate the bug, just the action to trigger bug with flyangle and >= comparison)

Edited by mazmazz

Merge request reports

Loading
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
Please register or sign in to reply
Loading