delay hotfixes

This commit is contained in:
Anthony Samms
2025-11-28 22:37:18 -05:00
parent ff4cda1696
commit 6ac2db1b9a
3 changed files with 11 additions and 15 deletions

View File

@@ -64,7 +64,6 @@ BGOFFSET,Unsupported,Unknown
#LEVELHOLD,Unsupported,TaikoJiro v1.63 #LEVELHOLD,Unsupported,TaikoJiro v1.63
#DIRECTION,Unsupported,TJAPlayer2 for.PC #DIRECTION,Unsupported,TJAPlayer2 for.PC
#HIDDEN,Unsupported,TJAPlayer2 for.PC
#SENOTECHANGE,Unsupported,TJAPlayer3 v1.4.0 #SENOTECHANGE,Unsupported,TJAPlayer3 v1.4.0
#NEXTSONG,Unsupported,TJAPlayer3 v1.5.0 #NEXTSONG,Unsupported,TJAPlayer3 v1.5.0
#PAPAMAMA,Unsupported,TJAPlayer3-f v1.7.2.0 #PAPAMAMA,Unsupported,TJAPlayer3-f v1.7.2.0
1 Command/Header Support Status Initial Sim Release
64 #HIDDEN #SENOTECHANGE Unsupported TJAPlayer2 for.PC TJAPlayer3 v1.4.0
65 #SENOTECHANGE #NEXTSONG Unsupported TJAPlayer3 v1.4.0 TJAPlayer3 v1.5.0
66 #NEXTSONG #PAPAMAMA Unsupported TJAPlayer3 v1.5.0 TJAPlayer3-f v1.7.2.0
#PAPAMAMA Unsupported TJAPlayer3-f v1.7.2.0
67 #ENABLEDORON / #DISABLEDORON Unsupported TJAPlayer3-Extended
68 #CHANGETEXTURE / #RESETTEXTURE Unsupported TJAPlayer3-Extended
69 #SETCONFIG Unsupported TJAPlayer3-Extended

View File

@@ -1256,7 +1256,7 @@ class TJAParser:
# Do not modify bpm, it needs to be changed live by bpmchange # Do not modify bpm, it needs to be changed live by bpmchange
bpmchange = parsed_bpm / bpmchange_last_bpm bpmchange = parsed_bpm / bpmchange_last_bpm
bpmchange_last_bpm = parsed_bpm bpmchange_last_bpm = parsed_bpm
bpmchange_timeline = TimelineObject() bpmchange_timeline = TimelineObject()
bpmchange_timeline.hit_ms = self.current_ms bpmchange_timeline.hit_ms = self.current_ms
bpmchange_timeline.bpmchange = bpmchange bpmchange_timeline.bpmchange = bpmchange
@@ -1281,17 +1281,14 @@ 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 delay_ms <= 0:
if delay_ms <= 0: # No changes if not positive
# No changes if not positive pass
pass
else:
# Do not modify current_ms, it will be modified live
delay_current += delay_ms
# Delays will be combined between notes, and attached to previous note
else: else:
self.current_ms += delay_ms # Do not modify current_ms, it will be modified live
delay_current += delay_ms
# Delays will be combined between notes, and attached to previous note
continue continue
elif part.startswith("#SUDDEN"): elif part.startswith("#SUDDEN"):
parts = part.split() parts = part.split()

View File

@@ -415,7 +415,7 @@ class Player:
self.bpm = 120 self.bpm = 120
if self.timeline and hasattr(self.timeline[self.timeline_index], 'bpm'): if self.timeline and hasattr(self.timeline[self.timeline_index], 'bpm'):
self.bpm = self.timeline[self.timeline_index].bpm self.bpm = self.timeline[self.timeline_index].bpm
# Handle HBSCROLL, BMSCROLL (pre-modify hit_ms, so that notes can't be literally hit, but are still visually different) - basically it applies the transformations of #BPMCHANGE and #DELAY to hit_ms, so that notes can't be hit even if its visaulyl # Handle HBSCROLL, BMSCROLL (pre-modify hit_ms, so that notes can't be literally hit, but are still visually different) - basically it applies the transformations of #BPMCHANGE and #DELAY to hit_ms, so that notes can't be hit even if its visaulyl
for i, o in enumerate(self.timeline): for i, o in enumerate(self.timeline):
if hasattr(o, 'bpmchange'): if hasattr(o, 'bpmchange'):
hit_ms = o.hit_ms hit_ms = o.hit_ms
@@ -435,7 +435,7 @@ class Player:
for i2 in range(i + 1, len(self.timeline)): for i2 in range(i + 1, len(self.timeline)):
o2 = self.timeline[i2] o2 = self.timeline[i2]
o2.hit_ms += delay o2.hit_ms += delay
# Decide end_time after all transforms have been applied # Decide end_time after all transforms have been applied
self.end_time = 0 self.end_time = 0
if self.play_notes: if self.play_notes:
@@ -1067,7 +1067,7 @@ class Player:
# Check if it ended # Check if it ended
if ms_from_start >= self.delay_end: if ms_from_start >= self.delay_end:
delay = self.delay_end - self.delay_start delay = self.delay_end - self.delay_start
for note in chain(self.play_notes, self.current_bars, self.draw_bar_list): for note in chain(self.don_notes, self.kat_notes, self.other_notes, self.current_bars, self.draw_bar_list):
note.load_ms += delay note.load_ms += delay
self.delay_start = None self.delay_start = None
self.delay_end = None self.delay_end = None