Misc minor fixes
This commit is contained in:
+1
-1
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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!");
|
||||
|
||||
Reference in New Issue
Block a user