Fix buildups being off by 1

master
William Toohey 10 years ago
parent 91d9e3f74b
commit 475dda2575
  1. 5
      js/HuesCore.js

@ -356,7 +356,10 @@ HuesCore.prototype.setSong = function(index) {
HuesCore.prototype.fillBuildup = function() {
this.beatLength = this.soundManager.loopLength / this.currentSong.rhythm.length;
var buildBeats = Math.floor(this.soundManager.loopStart / this.beatLength) + 1;
var buildBeats = Math.floor(this.soundManager.loopStart / this.beatLength);
if(buildBeats < 1) {
buildBeats = 1;
}
if (this.currentSong.buildupRhythm === null) {
this.currentSong.buildupRhythm = "";
}

Loading…
Cancel
Save