Reduced multithreaded conveyor corruption, improved interpolation
This commit is contained in:
@@ -25,7 +25,7 @@ import java.io.IOException;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class Net{
|
||||
public static final int version = 19;
|
||||
public static final int version = 20;
|
||||
|
||||
private static boolean server;
|
||||
private static boolean active;
|
||||
|
||||
@@ -508,15 +508,15 @@ public class Packets {
|
||||
|
||||
@Override
|
||||
public void write(ByteBuffer buffer) {
|
||||
buffer.putInt(position);
|
||||
buffer.put(rotation);
|
||||
buffer.putInt((rotation) | (position << 2));
|
||||
buffer.put(itemid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(ByteBuffer buffer) {
|
||||
position = buffer.getInt();
|
||||
rotation = buffer.get();
|
||||
int i = buffer.getInt();
|
||||
rotation = (byte)(i & 0x3);
|
||||
position = i >> 2;
|
||||
itemid = buffer.get();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user