diff --git a/src/Settings.hx b/src/Settings.hx index 14dfd5be..77b645e9 100644 --- a/src/Settings.hx +++ b/src/Settings.hx @@ -367,10 +367,10 @@ class Settings { optionsSettings.reflectionDetail = 2; if (controlsSettings.controllerVerticalCenter == null) controlsSettings.controllerVerticalCenter = true; - if (controlsSettings.huntRandom == null) - controlsSettings.huntRandom = false; - if (controlsSettings.fastLoad == null) - controlsSettings.fastLoad = false; + if (optionsSettings.huntRandom == null) + optionsSettings.huntRandom = false; + if (optionsSettings.fastLoad == null) + optionsSettings.fastLoad = false; #end if (optionsSettings.maxPixelRatio == 0 #if js || optionsSettings.maxPixelRatio == null #end) optionsSettings.maxPixelRatio = 1; diff --git a/src/fs/TorqueFileSystem.hx b/src/fs/TorqueFileSystem.hx index 497d0bd0..ea129977 100644 --- a/src/fs/TorqueFileSystem.hx +++ b/src/fs/TorqueFileSystem.hx @@ -3,6 +3,7 @@ package fs; import hxd.fs.LocalFileSystem; import src.Settings; +#if hl class TorqueFileEntry extends LocalEntry { override function load(?onReady:Void->Void):Void { #if macro @@ -17,6 +18,7 @@ class TorqueFileEntry extends LocalEntry { #end } } +#end class TorqueFileSystem extends LocalFileSystem { #if hl diff --git a/src/gui/MarblePickerGui.hx b/src/gui/MarblePickerGui.hx index 9cbafda6..14060940 100644 --- a/src/gui/MarblePickerGui.hx +++ b/src/gui/MarblePickerGui.hx @@ -302,6 +302,7 @@ class MarblePickerGui extends GuiImage { mbOpt.position = new Vector(380, yPos); mbOpt.extent = new Vector(815, 94); mbOpt.setCurrentOption(Settings.optionsSettings.marbleIndex); + var curToken = 0; mbOpt.onChangeFunc = (idx) -> { var selectedMarble = marbleData[idx]; Settings.optionsSettings.marbleIndex = idx; @@ -309,9 +310,12 @@ class MarblePickerGui extends GuiImage { Settings.optionsSettings.marbleSkin = selectedMarble.skin; Settings.optionsSettings.marbleModel = selectedMarble.dts; Settings.optionsSettings.marbleShader = selectedMarble.shader; + var changeToken = curToken++; ResourceLoader.load(Settings.optionsSettings.marbleModel).entry.load(() -> { @:privateAccess MarbleGame.instance.previewWorld.removeMarble(myMarb); @:privateAccess MarbleGame.instance.previewWorld.spawnMarble(marb -> { + if (changeToken + 1 != curToken) + return; var spawnPos = @:privateAccess MarbleGame.instance.scene.camera.pos.add(new Vector(0, 1, 1)); var velAdd = new Vector((1 - 2 * Math.random()) * 2, (1 - 2 * Math.random()) * 1.5, (1 - 2 * Math.random()) * 1); velAdd = velAdd.add(new Vector(0, 3, 0));