diff --git a/build.gradle b/build.gradle index 95f1e4da10..7fe10efa58 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ allprojects { gdxVersion = '1.9.8' roboVMVersion = '2.3.0' aiVersion = '1.8.1' - uCoreVersion = ' b6d22d5' + uCoreVersion = 'b6d22d5' getVersionString = { String buildVersion = getBuildVersion() diff --git a/core/src/io/anuke/mindustry/core/NetServer.java b/core/src/io/anuke/mindustry/core/NetServer.java index 1f0598ea90..e3fb7bd309 100644 --- a/core/src/io/anuke/mindustry/core/NetServer.java +++ b/core/src/io/anuke/mindustry/core/NetServer.java @@ -359,12 +359,12 @@ public class NetServer extends Module{ } } - //write group ID + group sizeif(((SyncTrait)entity).isSyncing()) + //write group ID + group size dataStream.writeByte(group.getID()); dataStream.writeShort(amount); for(Entity entity : group.all()){ - if(!((SyncTrait)entity).isSyncing()) continue;; + if(!((SyncTrait)entity).isSyncing()) continue; int position = syncStream.position(); //write all entities now diff --git a/core/src/io/anuke/mindustry/entities/Player.java b/core/src/io/anuke/mindustry/entities/Player.java index 918a350795..7b35b08e8c 100644 --- a/core/src/io/anuke/mindustry/entities/Player.java +++ b/core/src/io/anuke/mindustry/entities/Player.java @@ -650,7 +650,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait { @Override public void write(DataOutput buffer) throws IOException { super.writeSave(buffer, !isLocal); - buffer.writeUTF(name); + buffer.writeUTF(name); //TODO writing strings is very inefficient buffer.writeBoolean(isAdmin); buffer.writeInt(Color.rgba8888(color)); buffer.writeBoolean(dead); diff --git a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java index 0121d0b38a..6d4df2f08e 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java +++ b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java @@ -74,7 +74,7 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT public Bullet(){} public boolean collidesTiles(){ - return true; //TODO make artillery and such not do this + return type.collidesTiles; //TODO make artillery and such not do this } @Override diff --git a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java index ecc0d97bb4..c505108d33 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java @@ -25,6 +25,8 @@ public abstract class BulletType extends BaseBulletType implements Conte public float armorPierce = 0f; /**Whether to sync this bullet to clients.*/ public boolean syncable; + /**Whether this bullet type collides with tiles.*/ + public boolean collidesTiles; public BulletType(float speed, float damage){ this.id = lastid ++; diff --git a/core/src/io/anuke/mindustry/entities/traits/SyncTrait.java b/core/src/io/anuke/mindustry/entities/traits/SyncTrait.java index 91f74c8640..9df5cd248d 100644 --- a/core/src/io/anuke/mindustry/entities/traits/SyncTrait.java +++ b/core/src/io/anuke/mindustry/entities/traits/SyncTrait.java @@ -12,7 +12,7 @@ import static io.anuke.mindustry.Vars.threads; public interface SyncTrait extends Entity, TypeTrait { - /**Whether smoothing of entities is enabled; not yet implemented.*/ + /**Whether smoothing of entities is enabled when using multithreading; not yet implemented.*/ static boolean isSmoothing(){ return threads.isEnabled() && threads.getFPS() <= Gdx.graphics.getFramesPerSecond() / 2f; }