diff --git a/0x40.js b/0x40.js index a1bfe02..435bdda 100644 --- a/0x40.js +++ b/0x40.js @@ -1400,6 +1400,8 @@ var rgSongs = [ var nCurrentColor = 63; // start white var nCurrentWaifu = 0; +// initially hold megumi +var lastWaifus = [0]; var nColorX, nColorY, nColorZ; @@ -1407,9 +1409,13 @@ var nColorX, nColorY, nColorZ; function GetRandomWaifu() { var tmp = Math.round((Math.random() * (waifus.length - 1))); - if(tmp == nCurrentWaifu) { + if(lastWaifus.indexOf(tmp) != -1) { return GetRandomWaifu(); } + lastWaifus.push(tmp); + while(lastWaifus.length > waifus.length / 2) { + lastWaifus.shift(); + } nCurrentWaifu = tmp; return waifus[tmp]; } diff --git a/index_canvas.html b/index_canvas.html index 945a5eb..94043d3 100644 --- a/index_canvas.html +++ b/index_canvas.html @@ -9,8 +9,7 @@ Volume controls Prettier ui Song shuffle - Image pause - Keyboard shortcuts + Image pause / manual advance Different colour palettes External respacks Change short blackout to beat length / 1.7 @@ -24,10 +23,9 @@ -