Fixed #11585
This commit is contained in:
@@ -312,31 +312,32 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fileDropped(Fi file){
|
public void fileDropped(Fi file){
|
||||||
if(!OS.isIos){
|
if(OS.isIos) return;
|
||||||
if(file.extension().equalsIgnoreCase(saveExtension)){ //open save
|
|
||||||
try{
|
|
||||||
if(SaveIO.isSaveValid(file)){
|
|
||||||
SaveMeta meta = SaveIO.getMeta(new DataInputStream(new InflaterInputStream(file.read(Streams.defaultBufferSize))));
|
|
||||||
if(meta.tags.containsKey("name")){
|
|
||||||
//is map
|
|
||||||
if(!ui.editor.isShown()){
|
|
||||||
ui.editor.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
ui.editor.beginEditMap(file);
|
if(file.extension().equalsIgnoreCase(saveExtension)){ //open save
|
||||||
}else if(meta.rules.sector == null){ //don't allow importing campaign saves, they are broken
|
try{
|
||||||
SaveSlot slot = control.saves.importSave(file);
|
if(SaveIO.isSaveValid(file)){
|
||||||
ui.load.runLoadSave(slot);
|
SaveMeta meta = SaveIO.getMeta(new DataInputStream(new InflaterInputStream(file.read(Streams.defaultBufferSize))));
|
||||||
}else{
|
if(meta.tags.containsKey("name")){
|
||||||
ui.showErrorMessage("@save.nocampaign");
|
//is map
|
||||||
|
if(!ui.editor.isShown()){
|
||||||
|
ui.editor.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui.editor.beginEditMap(file);
|
||||||
|
}else if(meta.rules.sector == null){ //don't allow importing campaign saves, they are broken
|
||||||
|
SaveSlot slot = control.saves.importSave(file);
|
||||||
|
ui.load.runLoadSave(slot);
|
||||||
}else{
|
}else{
|
||||||
ui.showErrorMessage("@save.import.invalid");
|
ui.showErrorMessage("@save.nocampaign");
|
||||||
}
|
}
|
||||||
}catch(Throwable e){
|
}else{
|
||||||
ui.showException("@save.import.fail", e);
|
ui.showErrorMessage("@save.import.invalid");
|
||||||
}
|
}
|
||||||
|
}catch(Throwable e){
|
||||||
|
ui.showException("@save.import.fail", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
public static void sound(Sound sound, float volume, float pitch, float pan){
|
public static void sound(Sound sound, float volume, float pitch, float pan){
|
||||||
if(sound == null || headless) return;
|
if(sound == null || headless) return;
|
||||||
|
|
||||||
sound.play(Mathf.clamp(volume, 0, 8f) * Core.settings.getInt("sfxvol") / 100f, Mathf.clamp(pitch, 0f, 20f), pan, false, false);
|
sound.play(Mathf.clamp(volume, 0, 8f) * Core.audio.sfxVolume, Mathf.clamp(pitch, 0f, 20f), pan, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Remote(variants = Variant.both, unreliable = true, called = Loc.server)
|
@Remote(variants = Variant.both, unreliable = true, called = Loc.server)
|
||||||
|
|||||||
@@ -2033,7 +2033,7 @@ public class LExecutor{
|
|||||||
if(positional){
|
if(positional){
|
||||||
sound.at(World.unconv(x.numf()), World.unconv(y.numf()), pitch.numf(), Math.min(volume.numf(), 2f), limit.bool());
|
sound.at(World.unconv(x.numf()), World.unconv(y.numf()), pitch.numf(), Math.min(volume.numf(), 2f), limit.bool());
|
||||||
}else{
|
}else{
|
||||||
sound.play(Math.min(volume.numf() * (Core.settings.getInt("sfxvol") / 100f), 2f), pitch.numf(), pan.numf(), false, limit.bool());
|
sound.play(Math.min(volume.numf() * Core.audio.sfxVolume, 2f), pitch.numf(), pan.numf(), false, limit.bool());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -658,7 +658,7 @@ public class CoreBlock extends StorageBlock{
|
|||||||
public void playDestroySound(){
|
public void playDestroySound(){
|
||||||
if(team.data().cores.size <= 1 && player != null && player.team() == team && state.rules.canGameOver){
|
if(team.data().cores.size <= 1 && player != null && player.team() == team && state.rules.canGameOver){
|
||||||
//play at full volume when doing a game over
|
//play at full volume when doing a game over
|
||||||
block.destroySound.play(block.destroySoundVolume, Mathf.random(block.destroyPitchMin, block.destroyPitchMax), 0f);
|
block.destroySound.play(block.destroySoundVolume * Core.audio.sfxVolume, Mathf.random(block.destroyPitchMin, block.destroyPitchMax), 0f);
|
||||||
}else{
|
}else{
|
||||||
super.playDestroySound();
|
super.playDestroySound();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=3e5d2eb442
|
archash=039b13f434
|
||||||
|
|||||||
Reference in New Issue
Block a user