diff --git a/build.gradle b/build.gradle index 5956dae08c..755f62b572 100644 --- a/build.gradle +++ b/build.gradle @@ -364,7 +364,7 @@ project(":core"){ dependencies{ compileJava.dependsOn(preGen) - api "org.lz4:lz4-java:1.7.1" + api "org.lz4:lz4-java:1.8.0" api arcModule("arc-core") api arcModule("extensions:flabel") api arcModule("extensions:freetype") diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index 1faf262640..13de72631f 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -253,7 +253,7 @@ public class Weapon implements Cloneable{ float lastReload = mount.reload; mount.reload = Math.max(mount.reload - Time.delta * unit.reloadMultiplier, 0); mount.recoil = Mathf.approachDelta(mount.recoil, 0, unit.reloadMultiplier / recoilTime); - mount.warmup = Mathf.lerpDelta(mount.warmup, can && mount.shoot ? 1f : 0f, shootWarmupSpeed); + mount.warmup = Mathf.lerpDelta(mount.warmup, (can && mount.shoot) || (continuous && mount.bullet != null) ? 1f : 0f, shootWarmupSpeed); mount.smoothReload = Mathf.lerpDelta(mount.smoothReload, mount.reload / reload, smoothReloadSpeed); //rotate if applicable @@ -328,6 +328,12 @@ public class Weapon implements Cloneable{ if(mount.sound == null) mount.sound = new SoundLoop(shootSound, 1f); mount.sound.update(bulletX, bulletY, true); } + + //TODO: how do continuous flame bullets work here? a new system is needed + if(mount.bullet.type.optimalLifeFract > 0){ + // mount.bullet.time = mount.bullet.lifetime * mount.bullet.type.optimalLifeFract * mount.warmup; + // mount.bullet.keepAlive = true; + } } }else{ //heat decreases when not firing diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index fcc95612df..1cfea37017 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -538,7 +538,7 @@ public class Block extends UnlockableContent implements Senseable{ } public void addLiquidBar(Liquid liq){ - addBar("liquid-" + liq.name, entity -> !liq.unlocked() ? null : new Bar( + addBar("liquid-" + liq.name, entity -> !liq.unlockedNow() ? null : new Bar( () -> liq.localizedName, liq::barColor, () -> entity.liquids.get(liq) / liquidCapacity diff --git a/desktop/src/mindustry/desktop/steam/SNet.java b/desktop/src/mindustry/desktop/steam/SNet.java index 0dfbf6df31..d42c542265 100644 --- a/desktop/src/mindustry/desktop/steam/SNet.java +++ b/desktop/src/mindustry/desktop/steam/SNet.java @@ -144,7 +144,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback, int length = writeBuffer.position(); writeBuffer.flip(); - snet.sendP2PPacket(currentServer, writeBuffer, reliable || length >= 1200 ? P2PSend.Reliable : P2PSend.UnreliableNoDelay, 0); + snet.sendP2PPacket(currentServer, writeBuffer, reliable || length >= 1000 ? P2PSend.Reliable : P2PSend.UnreliableNoDelay, 0); }catch(Exception e){ net.showError(e); } @@ -419,7 +419,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback, int length = writeBuffer.position(); writeBuffer.flip(); - snet.sendP2PPacket(sid, writeBuffer, reliable || length >= 1200 ? object instanceof StreamChunk ? P2PSend.ReliableWithBuffering : P2PSend.Reliable : P2PSend.UnreliableNoDelay, 0); + snet.sendP2PPacket(sid, writeBuffer, reliable || length >= 1000 ? object instanceof StreamChunk ? P2PSend.ReliableWithBuffering : P2PSend.Reliable : P2PSend.UnreliableNoDelay, 0); }catch(Exception e){ Log.err(e); Log.info("Error sending packet. Disconnecting invalid client!");