diff --git a/core/src/mindustry/core/NetClient.java b/core/src/mindustry/core/NetClient.java index 38946a8331..38e87b32ae 100644 --- a/core/src/mindustry/core/NetClient.java +++ b/core/src/mindustry/core/NetClient.java @@ -164,14 +164,14 @@ public class NetClient implements ApplicationListener{ public static void sound(Sound sound, float volume, float pitch, float pan){ if(sound == null) return; - sound.play(Mathf.clamp(volume, 0, 2f) * Core.settings.getInt("sfxvol") / 100f, pitch, pan); + sound.play(Mathf.clamp(volume, 0, 4f) * Core.settings.getInt("sfxvol") / 100f, pitch, pan); } @Remote(variants = Variant.both, unreliable = true) public static void soundAt(Sound sound, float x, float y, float volume, float pitch){ if(sound == null) return; - sound.at(x, y, pitch, Mathf.clamp(volume, 0, 2f)); + sound.at(x, y, pitch, Mathf.clamp(volume, 0, 4f)); } @Remote(variants = Variant.both, unreliable = true) diff --git a/core/src/mindustry/entities/Damage.java b/core/src/mindustry/entities/Damage.java index 1d04148a84..cc11cf29fa 100644 --- a/core/src/mindustry/entities/Damage.java +++ b/core/src/mindustry/entities/Damage.java @@ -48,7 +48,7 @@ public class Damage{ public static void dynamicExplosion(float x, float y, float flammability, float explosiveness, float power, float radius, boolean damage, boolean fire, @Nullable Team ignoreTeam, Effect explosionFx){ if(damage){ for(int i = 0; i < Mathf.clamp(power / 700, 0, 8); i++){ - int length = 5 + Mathf.clamp((int)(power / 500), 1, 20); + int length = 5 + Mathf.clamp((int)(Mathf.pow(power, 0.98f) / 500), 1, 18); Time.run(i * 0.8f + Mathf.random(4f), () -> Lightning.create(Team.derelict, Pal.power, 3 + Mathf.pow(power, 0.35f), x, y, Mathf.random(360f), length + Mathf.range(2))); } diff --git a/core/src/mindustry/ui/fragments/ChatFragment.java b/core/src/mindustry/ui/fragments/ChatFragment.java index c39233a8e5..9a1159350c 100644 --- a/core/src/mindustry/ui/fragments/ChatFragment.java +++ b/core/src/mindustry/ui/fragments/ChatFragment.java @@ -176,7 +176,8 @@ public class ChatFragment extends Table{ String message = chatfield.getText().trim(); clearChatInput(); - if(message.isEmpty()) return; + //avoid sending prefix-empty messages + if(message.isEmpty() || (message.startsWith(mode.prefix) && message.substring(mode.prefix.length()).isEmpty())) return; history.insert(1, message);