Fixed pad shader/disconnect bugs
This commit is contained in:
@@ -52,7 +52,7 @@ import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class NetServer implements ApplicationListener{
|
||||
public final static int maxSnapshotSize = 430;
|
||||
private final static float serverSyncTime = 40, kickDuration = 30 * 1000;
|
||||
private final static float serverSyncTime = 4, kickDuration = 30 * 1000;
|
||||
private final static Vector2 vector = new Vector2();
|
||||
private final static Rectangle viewport = new Rectangle();
|
||||
private final static Array<Entity> returnArray = new Array<>();
|
||||
|
||||
@@ -264,6 +264,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
||||
}
|
||||
|
||||
if(isFlying()){
|
||||
drownTime = 0f;
|
||||
move(velocity.x * Time.delta(), velocity.y * Time.delta());
|
||||
}else{
|
||||
boolean onLiquid = floor.isLiquid;
|
||||
|
||||
@@ -57,7 +57,7 @@ public class MechPad extends Block{
|
||||
|
||||
@Remote(targets = Loc.both, called = Loc.server)
|
||||
public static void onMechFactoryTap(Player player, Tile tile){
|
||||
if(player == null || !checkValidTap(tile, player) || !(tile.block() instanceof MechPad)) return;
|
||||
if(player == null || !(tile.block() instanceof MechPad) || !checkValidTap(tile, player)) return;
|
||||
|
||||
MechFactoryEntity entity = tile.entity();
|
||||
MechPad pad = (MechPad)tile.block();
|
||||
@@ -153,11 +153,10 @@ public class MechPad extends Block{
|
||||
|
||||
Shaders.build.region = region;
|
||||
Shaders.build.progress = entity.progress;
|
||||
Shaders.build.time = -entity.time / 4f;
|
||||
Shaders.build.time = -entity.time / 5f;
|
||||
Shaders.build.color.set(Pal.accent);
|
||||
|
||||
Draw.shader(Shaders.build, false);
|
||||
Shaders.build.apply();
|
||||
Draw.shader(Shaders.build);
|
||||
Draw.rect(region, tile.drawx(), tile.drawy());
|
||||
Draw.shader();
|
||||
|
||||
|
||||
@@ -120,8 +120,7 @@ public class UnitFactory extends Block{
|
||||
Shaders.build.color.a = entity.speedScl;
|
||||
Shaders.build.time = -entity.time / 10f;
|
||||
|
||||
Draw.shader(Shaders.build, false);
|
||||
Shaders.build.apply();
|
||||
Draw.shader(Shaders.build);
|
||||
Draw.rect(region, tile.drawx(), tile.drawy());
|
||||
Draw.shader();
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ public class PowerModule extends BlockModule{
|
||||
for(int i = 0; i < links.size; i++){
|
||||
stream.writeInt(links.get(i));
|
||||
}
|
||||
stream.writeFloat(satisfaction);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -32,5 +33,6 @@ public class PowerModule extends BlockModule{
|
||||
for(int i = 0; i < amount; i++){
|
||||
links.add(stream.readInt());
|
||||
}
|
||||
satisfaction = stream.readFloat();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user