Skip to content

Commit

Permalink
call it a hunch
Browse files Browse the repository at this point in the history
  • Loading branch information
jnackmclain committed Nov 27, 2024
1 parent 3de1adc commit 6674e74
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions _ark/dx/track/callbacks/dx_track_callbacks.dta
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,20 @@
(slot none)
(curr_ms 0)
(diff none)
(gem_id 0)
(hit ;when a note is hit
($gem_id)
;store gem_id as fast as possible
{set [gem_id] $gem_id}
{if {&& $dx_perfects_indicator {{[player] get_user} is_local} {== [diff] expert} {gamemode in_mode qp_coop}}
;calculate this as early as possible for accuracy
{set [curr_ms] {'-' {beatmatch get_song_ms} {int {floor {'+' 0.5 {profile_mgr get_excess_audio_lag}}}}}}
{set [offset] FALSE}
{set [accuracy] -8675309}
;failsafe, ensure the size of our tracker is the same as the reported total note count
{if {== {eval {var {sprint [track_instrument] "_note_tracker_2_size"}}} {[player] get_gem_count}}
{if {>= $gem_id 0}
{set [accuracy] {'-' [curr_ms] {elem {eval {var {sprint [track_instrument] "_note_tracker_2"}}} $gem_id}}}
{if {>= [gem_id] 0}
{set [accuracy] {'-' [curr_ms] {elem {eval {var {sprint [track_instrument] "_note_tracker_2"}}} [gem_id]}}}
}
}
{$this perfects_indicator [accuracy]}
Expand Down

0 comments on commit 6674e74

Please sign in to comment.