From 6723479c3284d510d98ea04134cdcd93c3d07520 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 12 Dec 2018 20:13:21 -0500 Subject: [PATCH] Removed sound config --- core/src/io/anuke/mindustry/core/Control.java | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/core/src/io/anuke/mindustry/core/Control.java b/core/src/io/anuke/mindustry/core/Control.java index 415f58b87c..ae61933103 100644 --- a/core/src/io/anuke/mindustry/core/Control.java +++ b/core/src/io/anuke/mindustry/core/Control.java @@ -1,10 +1,7 @@ package io.anuke.mindustry.core; import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.audio.Sound; import com.badlogic.gdx.graphics.Color; -import com.badlogic.gdx.utils.ObjectMap; -import com.badlogic.gdx.utils.TimeUtils; import io.anuke.mindustry.content.Mechs; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.Player; @@ -42,17 +39,13 @@ import static io.anuke.mindustry.Vars.*; * This class is not created in the headless server. */ public class Control extends Module{ - /** Minimum period of time between the same sound being played.*/ - private static final long minSoundPeriod = 100; - public final Saves saves; public final Unlocks unlocks; - private Timer timerRPC= new Timer(), timerUnlock = new Timer(); + private Timer timerRPC = new Timer(), timerUnlock = new Timer(); private boolean hiscore = false; private boolean wasPaused = false; private InputHandler[] inputs = {}; - private ObjectMap soundMap = new ObjectMap<>(); private Throwable error; public Control(){ @@ -72,17 +65,6 @@ public class Control extends Module{ unlocks.load(); - Sounds.setFalloff(9000f); - Sounds.setPlayer((sound, volume) -> { - long time = TimeUtils.millis(); - long value = soundMap.get(sound, 0L); - - if(TimeUtils.timeSinceMillis(value) >= minSoundPeriod){ - threads.runGraphics(() -> sound.play(volume)); - soundMap.put(sound, time); - } - }); - DefaultKeybinds.load(); Settings.defaultList(