minor fixes

This commit is contained in:
Anthony Samms
2025-11-29 21:56:02 -05:00
parent b56b5dbff6
commit 6be65285bd
2 changed files with 8 additions and 5 deletions

View File

@@ -1316,7 +1316,7 @@ class TJAParser:
bar_line.pixels_per_frame_x = get_pixels_per_frame(bpm * time_signature * x_scroll_modifier, time_signature*4, self.distance) bar_line.pixels_per_frame_x = get_pixels_per_frame(bpm * time_signature * x_scroll_modifier, time_signature*4, self.distance)
bar_line.pixels_per_frame_y = get_pixels_per_frame(bpm * time_signature * y_scroll_modifier, time_signature*4, self.distance) bar_line.pixels_per_frame_y = get_pixels_per_frame(bpm * time_signature * y_scroll_modifier, time_signature*4, self.distance)
pixels_per_ms = get_pixels_per_ms(bar_line.pixels_per_frame_x) pixels_per_ms = get_pixels_per_ms(max(bar_line.pixels_per_frame_x, bar_line.pixels_per_frame_y))
bar_line.hit_ms = self.current_ms bar_line.hit_ms = self.current_ms
if pixels_per_ms == 0: if pixels_per_ms == 0:
@@ -1374,7 +1374,7 @@ class TJAParser:
note.display = True note.display = True
note.pixels_per_frame_x = bar_line.pixels_per_frame_x note.pixels_per_frame_x = bar_line.pixels_per_frame_x
note.pixels_per_frame_y = bar_line.pixels_per_frame_y note.pixels_per_frame_y = bar_line.pixels_per_frame_y
pixels_per_ms = get_pixels_per_ms(note.pixels_per_frame_x) pixels_per_ms = get_pixels_per_ms(max(note.pixels_per_frame_x, note.pixels_per_frame_y))
note.load_ms = (note.hit_ms if pixels_per_ms == 0 note.load_ms = (note.hit_ms if pixels_per_ms == 0
else note.hit_ms - (self.distance / pixels_per_ms)) else note.hit_ms - (self.distance / pixels_per_ms))
note.type = int(item) note.type = int(item)
@@ -1402,7 +1402,7 @@ class TJAParser:
elif item == '8': elif item == '8':
if prev_note is None: if prev_note is None:
raise ValueError("No previous note found") raise ValueError("No previous note found")
new_pixels_per_ms = prev_note.pixels_per_frame_x / (1000 / 60) new_pixels_per_ms = max(prev_note.pixels_per_frame_x, prev_note.pixels_per_frame_y) / (1000 / 60)
if new_pixels_per_ms == 0: if new_pixels_per_ms == 0:
note.load_ms = note.hit_ms note.load_ms = note.hit_ms
else: else:

View File

@@ -766,8 +766,9 @@ class Player:
note = self.current_notes_draw[0] note = self.current_notes_draw[0]
if note.type in {NoteType.ROLL_HEAD, NoteType.ROLL_HEAD_L, NoteType.BALLOON_HEAD, NoteType.KUSUDAMA} and len(self.current_notes_draw) > 1: if note.type in {NoteType.ROLL_HEAD, NoteType.ROLL_HEAD_L, NoteType.BALLOON_HEAD, NoteType.KUSUDAMA} and len(self.current_notes_draw) > 1:
note = self.current_notes_draw[1] note = self.current_notes_draw[1]
position = self.get_position_x(tex.screen_width, current_ms, note.hit_ms, note.pixels_per_frame_x) if current_ms > note.hit_ms + 200:
if position < GameScreen.JUDGE_X + (650 * tex.screen_scale): if note.type == NoteType.TAIL:
self.current_notes_draw.pop(0)
self.current_notes_draw.pop(0) self.current_notes_draw.pop(0)
def note_manager(self, current_ms: float, background: Optional[Background]): def note_manager(self, current_ms: float, background: Optional[Background]):
@@ -819,6 +820,8 @@ class Player:
background.add_renda() background.add_renda()
self.score += 100 self.score += 100
self.base_score_list.append(ScoreCounterAnimation(self.player_num, 100, self.is_2p)) self.base_score_list.append(ScoreCounterAnimation(self.player_num, 100, self.is_2p))
if not self.current_notes_draw:
return
if not isinstance(self.current_notes_draw[0], Drumroll): if not isinstance(self.current_notes_draw[0], Drumroll):
return return
self.current_notes_draw[0].color = max(0, 255 - (self.curr_drumroll_count * 10)) self.current_notes_draw[0].color = max(0, 255 - (self.curr_drumroll_count * 10))