TeamRizu / OutFox

The Bug Reporting Repository for OutFox LTS 0.4, Alpha V and Steam Early Access Builds
https://projectoutfox.com
Apache License 2.0
178 stars 3 forks source link

[BUG] Cache generating wrong #LASTSECONDHINT and #MUSICLENGTH for some simfiles #705

Open thedaryen opened 9 months ago

thedaryen commented 9 months ago

Is there an existing issue for this?

Operating System

Windows 11

CPU

i5 12600k

GPU

RTX 3070

Storage

1TB GAMMIX NVME SSD

Game Version

5.0.0-041

Game Mode

pump

Theme

Infinitesimal and Soundwaves

Describe the problem

It seems that when caching simfiles, the game is adding a #MUSICLENGTH to the cached simfile header, as well as a #FIRSTSECOND and #LASTSECOND, but they don't match the length of the actual mp3 file provided. Also, the cache creates an individual #LASTSECONDHINT to each chart entry that is different from the #LASTSECONDHINT provided at the header of the original simfile.

This makes it so that the song duration of some songs is incorrectly inflated on soundwaves and infinitesimal, while also making some regular length songs display as marathons.

This, however, as far as I can tell has no effect on the charts themselves while playing them, only on their engine provided length metrics for display purposes.

Manually copying and pasting the #lastsecondhint from the header to each chart entry on the simfile fixes the issue, as it prevents the engine from calculating the correct lastsecondhint dynamically for each chart entry which seems to be what causes the error on the cached files.

Describe what should happen

Songs should display their correct length at the song selection screen and be correctly categorized as regular or marathon based on that.

As a suggestion, maybe the simfile should determine length based on the audio file file provided instead of trying to determine it by parsing all the charts? At least for Pump, I believe that should be the case for every song, not sure how other modes use their audio files and if they only play a portion of it at times.

Relevant Log output

To help with debugging, here's a song that's affected by the bug:

https://drive.google.com/file/d/18YuuMR6pD27pVOlhEkgyc9NphKrj2CJ4/view?usp=drive_link

The song only has 1m43s of duration, but after caching it always displays as 3m23s.