Skip to content

Commit

Permalink
Fix patches 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Itorius committed Nov 10, 2020
1 parent f33571a commit 6776403
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions patches/tModLoader/Terraria/Main.cs.patch
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@
}

if (gameMenu || musicVolume == 0f) {
@@ -8812,23 +_,25 @@
@@ -8812,12 +_,14 @@
curMusic = 0;
}

Expand All @@ -861,8 +861,8 @@

bool isMainTrackAudible = musicFade[curMusic] > 0.25f;
- for (int i = 1; i < 90; i++) {
+ for (int k = 1; k < music.Length; k++) {
+ if (music[k] == null)
+ for (int i = 1; i < music.Length; i++) {
+ if (music[i] == null)
+ continue; // Race condition, Music is resized during load.
float num2 = musicFade[i] * musicVolume * num;
if (i >= 62 && i <= 88) {
Expand Down

0 comments on commit 6776403

Please sign in to comment.