diff --git a/core/assets/version.properties b/core/assets/version.properties index 993a9c1285..9940cfc1b4 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Sun Feb 11 16:16:21 EST 2018 +#Sun Feb 11 17:04:14 EST 2018 version=beta -androidBuildCode=168 +androidBuildCode=172 name=Mindustry code=3.3 build=custom build diff --git a/core/src/io/anuke/mindustry/core/NetClient.java b/core/src/io/anuke/mindustry/core/NetClient.java index a48984b34d..d5525aaf76 100644 --- a/core/src/io/anuke/mindustry/core/NetClient.java +++ b/core/src/io/anuke/mindustry/core/NetClient.java @@ -2,6 +2,7 @@ package io.anuke.mindustry.core; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.utils.IntMap; import com.badlogic.gdx.utils.IntSet; import com.badlogic.gdx.utils.TimeUtils; import io.anuke.mindustry.core.GameState.State; @@ -43,12 +44,15 @@ public class NetClient extends Module { private boolean gotData = false; private boolean kicked = false; private IntSet recieved = new IntSet(); + private IntMap recent = new IntMap<>(); public NetClient(){ Net.handleClient(Connect.class, packet -> { + Net.setClientLoaded(false); recieved.clear(); + recent.clear(); connecting = true; gotData = false; kicked = false; @@ -169,6 +173,7 @@ public class NetClient extends Module { recieved.contains(packet.entity.id)) return; recieved.add(packet.entity.id); + recent.put(packet.entity.id, packet.entity); packet.entity.add(); @@ -179,6 +184,8 @@ public class NetClient extends Module { Enemy enemy = enemyGroup.getByID(packet.id); if (enemy != null){ enemy.type.onDeath(enemy, true); + }else if(recent.get(packet.id) != null){ + recent.get(packet.id).remove(); }else{ Log.err("Got remove for null entity! {0}", packet.id); } diff --git a/core/src/io/anuke/mindustry/entities/Player.java b/core/src/io/anuke/mindustry/entities/Player.java index 0f4d718e18..c2af53b8b2 100644 --- a/core/src/io/anuke/mindustry/entities/Player.java +++ b/core/src/io/anuke/mindustry/entities/Player.java @@ -294,8 +294,8 @@ public class Player extends SyncEntity{ Interpolator i = interpolator; - float tx = x + Angles.trnsx(angle + 180f, 3f); - float ty = y + Angles.trnsy(angle + 180f, 3f); + float tx = x + Angles.trnsx(angle + 180f, 4f); + float ty = y + Angles.trnsy(angle + 180f, 4f); if(isAndroid && i.target.dst(i.last) > 2f && timer.get(timerDash, 1)){ Effects.effect(Fx.dashsmoke, tx, ty); diff --git a/core/src/io/anuke/mindustry/entities/SyncEntity.java b/core/src/io/anuke/mindustry/entities/SyncEntity.java index b61631c9f8..6867af15a5 100644 --- a/core/src/io/anuke/mindustry/entities/SyncEntity.java +++ b/core/src/io/anuke/mindustry/entities/SyncEntity.java @@ -120,7 +120,7 @@ public abstract class SyncEntity extends DestructibleEntity{ public void update(){ - time += 1f / spacing * Timers.delta(); + time += 1f / spacing * Math.min(Timers.delta(), 1f); Mathf.lerp2(pos.set(last), target, time);