Up-in-the-Air – commitdiff

You can use Git to clone the repository via the web URL. Download snapshot (zip)
If invalid feather selection is stored, default to blue
authorJulian Fietkau <git@fietkau.software>
Tue, 24 Sep 2024 17:04:04 +0000 (19:04 +0200)
committerJulian Fietkau <git@fietkau.software>
Tue, 24 Sep 2024 17:04:04 +0000 (19:04 +0200)
main.js

diff --git a/main.js b/main.js
index 8c94649a2c8941b9e746087443e83dd8fc615229..4421d313cc786c52456e9a3c255e00ff6ba193ca 100644 (file)
--- a/main.js
+++ b/main.js
@@ -427,7 +427,7 @@ function animate(game, renderer, scene) {
     game.ui.moveToPage('endingcutscene', true);
   }
 
-  if(game.settings.audio.music > 0.0 && game.view.music && !game.view.music.isPlaying) {
+  if(game.settings['audio']['music'] > 0.0 && game.view.music && !game.view.music.isPlaying) {
     const remainingRealTime = (game.timeTotal - game.timeProgress) / (game.settings['difficulty']['speed'] / 100);
     if(remainingRealTime >= game.assets.audio.music.duration - 2) {
       game.view.music.offset = 0;
@@ -635,6 +635,9 @@ function loadSettings(game) {
     label.appendChild(img);
     ui.querySelector('.feather').appendChild(label);
   }
+  if(!ui.querySelector('.feather input[value="' + settings['feather'] + '"]')) {
+    settings['feather'] = 'blue';
+  }
   ui.querySelector('.feather input[value=' + settings['feather'] + ']').checked = true;
   ui.querySelector('input[value="highcontrast"]').checked = !!settings['highcontrast'];
   ui.querySelector('.font input[value=' + settings['font'] + ']').checked = true;