Heal bullet effect fix / Spawned ID sync / Crash fix

This commit is contained in:
Anuken
2019-03-11 14:54:15 -04:00
parent 4909c28ed9
commit b0c1aff783
6 changed files with 19 additions and 10 deletions
@@ -337,6 +337,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
public void write(DataOutput data) throws IOException{
super.writeSave(data);
data.writeByte(type.id);
data.writeInt(spawner);
}
@Override
@@ -344,6 +345,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
float lastx = x, lasty = y, lastrot = rotation;
super.readSave(data);
this.type = content.getByID(ContentType.unit, data.readByte());
this.spawner = data.readInt();
interpolator.read(lastx, lasty, x, y, rotation);
rotation = lastrot;