Skip to content

Commit

Permalink
Fix background video not playing at all
Browse files Browse the repository at this point in the history
  • Loading branch information
Rian8337 committed Oct 16, 2024
1 parent 40df998 commit 795e160
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/com/reco1l/osu/data/Beatmaps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -205,19 +205,25 @@ data class BeatmapInfo(
* The `.osu` file path.
*/
val path
get() = "${Config.getBeatmapPath()}$setDirectory/$filename"
get() = "${absoluteSetDirectory}/$filename"

/**
* The audio file path.
*/
val audioPath
get() = "${Config.getBeatmapPath()}$setDirectory/$audioFilename"
get() = "${absoluteSetDirectory}/$audioFilename"

/**
* The background file path.
*/
val backgroundPath
get() = "${Config.getBeatmapPath()}$setDirectory/$backgroundFilename"
get() = "${absoluteSetDirectory}/$backgroundFilename"

/**
* The beatmap set path ([setDirectory]) with [Config.getBeatmapPath] prepended.
*/
val absoluteSetDirectory
get() = "${Config.getBeatmapPath()}$setDirectory"

/**
* The total hit object count.
Expand Down
2 changes: 1 addition & 1 deletion src/ru/nsu/ccfit/zuev/osu/game/GameScene.java
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ private void setBackground() {
videoStarted = false;
videoOffset = playableBeatmap.getEvents().videoStartTime / 1000f;

video = new VideoSprite(lastBeatmapInfo.getSetDirectory() + "/" + playableBeatmap.getEvents().videoFilename, engine);
video = new VideoSprite(lastBeatmapInfo.getAbsoluteSetDirectory() + "/" + playableBeatmap.getEvents().videoFilename, engine);
video.setAlpha(0f);

bgSprite = video;
Expand Down

0 comments on commit 795e160

Please sign in to comment.