Skip to content

Commit

Permalink
fix(DmPerformance): don't play patterns with the 'groove'-embellishme…
Browse files Browse the repository at this point in the history
…nt if their length is 1 measure

This fixes an issue in Gothic II where some styles contain empty patterns covering the groove range from 0-100 which would get incorrectly selected for playback.
  • Loading branch information
lmichaelis committed Apr 29, 2024
1 parent 77515bb commit 0ae8dd1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Performance.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ static DmPattern* DmPerformance_choosePattern(DmPerformance* slf, DmCommandType
continue;
}

// Fix for Gothic 2 in which some patterns are empty but have a groove range of 1-100 with no embellishment set.
if (pttn->embellishment == DmCommand_GROOVE && pttn->length_measures == 1) {
continue;
}

suitable_pattern_index = i;
suitable_pattern_count += 1;
}
Expand Down

0 comments on commit 0ae8dd1

Please sign in to comment.