Fixed some multithreading bugs and crashes

This commit is contained in:
Anuken
2018-02-10 12:38:02 -05:00
parent 2ff4a1ee0d
commit e5365d5572
8 changed files with 44 additions and 14 deletions

View File

@@ -255,10 +255,13 @@ public class Player extends SyncEntity{
@Override
public void write(ByteBuffer data) {
//TODO written angle is always 0
data.putFloat(x);
data.putFloat(y);
if(Net.client()) {
data.putFloat(x);
data.putFloat(y);
}else{
data.putFloat(interpolator.target.x);
data.putFloat(interpolator.target.y);
}
data.putFloat(angle);
data.putShort((short)health);
data.put((byte)(dashing ? 1 : 0));