Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
qaqFei committed Oct 20, 2024
1 parent e802f30 commit 786504e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions PhiCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,15 @@ def _KeyDown(key: str):
can_judge_notes = [(i, offset) for i in notes if (
not i.player_clicked and
i.type in (Const.Note.TAP, Const.Note.HOLD) and
(offset := (i.time * i.master.T - PlayChart_NowTime)) <= (0.2 if i.type == Const.Note.TAP else 0.16)
abs((offset := (i.time * i.master.T - PlayChart_NowTime))) <= (0.2 if i.type == Const.Note.TAP else 0.16)
)]
can_use_safedrag = [(i, offset) for i in notes if (
i.type == Const.Note.DRAG and
not i.player_drag_judge_safe_used and
(offset := (i.time * i.master.T - PlayChart_NowTime)) <= 0.16
abs((offset := (i.time * i.master.T - PlayChart_NowTime))) <= 0.16
)]

can_judge_notes.sort(key = lambda x: x[1])
can_judge_notes.sort(key = lambda x: abs(x[1]))
can_use_safedrag.sort(key = lambda x: x[1])

if can_judge_notes:
Expand Down Expand Up @@ -405,15 +405,15 @@ def _KeyDown(key: str):
can_judge_notes = [(i, offset) for i in notes if (
not i.player_clicked and
i.phitype in (Const.Note.TAP, Const.Note.HOLD) and
(offset := (i.secst - PlayChart_NowTime)) <= (0.2 if i.phitype == Const.Note.TAP else 0.16)
abs((offset := (i.secst - PlayChart_NowTime))) <= (0.2 if i.phitype == Const.Note.TAP else 0.16)
)]
can_use_safedrag = [(i, offset) for i in notes if (
i.phitype == Const.Note.DRAG and
not i.player_drag_judge_safe_used and
(offset := (i.secst - PlayChart_NowTime)) <= 0.16
abs((offset := (i.secst - PlayChart_NowTime))) <= 0.16
)]

can_judge_notes.sort(key = lambda x: x[1])
can_judge_notes.sort(key = lambda x: abs(x[1]))
can_use_safedrag.sort(key = lambda x: x[1])

if can_judge_notes:
Expand Down

0 comments on commit 786504e

Please sign in to comment.