mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
bpmchange hotfix
This commit is contained in:
@@ -1259,6 +1259,7 @@ class TJAParser:
|
|||||||
timeline_obj = TimelineObject()
|
timeline_obj = TimelineObject()
|
||||||
timeline_obj.hit_ms = self.current_ms
|
timeline_obj.hit_ms = self.current_ms
|
||||||
timeline_obj.bpm = parsed_bpm
|
timeline_obj.bpm = parsed_bpm
|
||||||
|
bpm = parsed_bpm
|
||||||
bisect.insort(curr_timeline, timeline_obj, key=lambda x: x.hit_ms)
|
bisect.insort(curr_timeline, timeline_obj, key=lambda x: x.hit_ms)
|
||||||
continue
|
continue
|
||||||
elif '#BARLINEOFF' in part:
|
elif '#BARLINEOFF' in part:
|
||||||
@@ -1275,7 +1276,7 @@ class TJAParser:
|
|||||||
continue
|
continue
|
||||||
elif part.startswith("#DELAY"):
|
elif part.startswith("#DELAY"):
|
||||||
delay_ms = float(part[6:]) * 1000
|
delay_ms = float(part[6:]) * 1000
|
||||||
if scroll_type == ScrollType.BMSCROLL or scroll_type == ScrollType.HBSCROLL:
|
if scroll_type == ScrollType.BMSCROLL or scroll_type == ScrollType.HBSCROLL:
|
||||||
if delay_ms <= 0:
|
if delay_ms <= 0:
|
||||||
# No changes if not positive
|
# No changes if not positive
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -1138,7 +1138,7 @@ class Player:
|
|||||||
end_position += self.judge_x
|
end_position += self.judge_x
|
||||||
length = end_position - start_position
|
length = end_position - start_position
|
||||||
color = ray.Color(255, head.color, head.color, 255)
|
color = ray.Color(255, head.color, head.color, 255)
|
||||||
y = tex.skin_config["notes"].y
|
y = tex.skin_config["notes"].y + self.get_position_y(current_ms, head.load_ms, head.pixels_per_frame_y, head.pixels_per_frame_x)
|
||||||
moji_y = tex.skin_config["moji"].y
|
moji_y = tex.skin_config["moji"].y
|
||||||
moji_x = -(tex.textures["notes"]["moji"].width//2) + (tex.textures["notes"]["1"].width//2)
|
moji_x = -(tex.textures["notes"]["moji"].width//2) + (tex.textures["notes"]["1"].width//2)
|
||||||
if head.display:
|
if head.display:
|
||||||
@@ -1163,6 +1163,7 @@ class Player:
|
|||||||
end_position = self.get_position_x(tex.screen_width, current_ms, tail.load_ms, tail.pixels_per_frame_x)
|
end_position = self.get_position_x(tex.screen_width, current_ms, tail.load_ms, tail.pixels_per_frame_x)
|
||||||
end_position += self.judge_x
|
end_position += self.judge_x
|
||||||
pause_position = tex.skin_config["balloon_pause_position"].x + self.judge_x
|
pause_position = tex.skin_config["balloon_pause_position"].x + self.judge_x
|
||||||
|
y = tex.skin_config["notes"].y + self.get_position_y(current_ms, head.load_ms, head.pixels_per_frame_y, head.pixels_per_frame_x)
|
||||||
if current_ms >= tail.hit_ms:
|
if current_ms >= tail.hit_ms:
|
||||||
position = end_position
|
position = end_position
|
||||||
elif current_ms >= head.hit_ms:
|
elif current_ms >= head.hit_ms:
|
||||||
@@ -1170,8 +1171,8 @@ class Player:
|
|||||||
else:
|
else:
|
||||||
position = start_position
|
position = start_position
|
||||||
if head.display:
|
if head.display:
|
||||||
tex.draw_texture('notes', str(head.type), frame=current_eighth % 2, x=position-offset, y=tex.skin_config["notes"].y+(self.is_2p*tex.skin_config["2p_offset"].y)+self.judge_y)
|
tex.draw_texture('notes', str(head.type), frame=current_eighth % 2, x=position-offset, y=y+(self.is_2p*tex.skin_config["2p_offset"].y)+self.judge_y)
|
||||||
tex.draw_texture('notes', '10', frame=current_eighth % 2, x=position-offset+tex.textures["notes"]["10"].width, y=tex.skin_config["notes"].y+(self.is_2p*tex.skin_config["2p_offset"].y)+self.judge_y)
|
tex.draw_texture('notes', '10', frame=current_eighth % 2, x=position-offset+tex.textures["notes"]["10"].width, y=y+(self.is_2p*tex.skin_config["2p_offset"].y)+self.judge_y)
|
||||||
|
|
||||||
def draw_bars(self, current_ms: float):
|
def draw_bars(self, current_ms: float):
|
||||||
"""Draw bars in the player's lane"""
|
"""Draw bars in the player's lane"""
|
||||||
|
|||||||
Reference in New Issue
Block a user