Fixed #709
This commit is contained in:
@@ -35,6 +35,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
||||
protected static final int timerShootLeft = timerIndex++;
|
||||
protected static final int timerShootRight = timerIndex++;
|
||||
|
||||
protected boolean loaded;
|
||||
protected UnitType type;
|
||||
protected Interval timer = new Interval(5);
|
||||
protected StateMachine state = new StateMachine();
|
||||
@@ -338,7 +339,9 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
||||
public void added(){
|
||||
state.set(getStartState());
|
||||
|
||||
health(maxHealth());
|
||||
if(!loaded){
|
||||
health(maxHealth());
|
||||
}
|
||||
|
||||
if(isCommanded()){
|
||||
onCommand(getCommand());
|
||||
@@ -375,6 +378,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
||||
@Override
|
||||
public void readSave(DataInput stream, byte version) throws IOException{
|
||||
super.readSave(stream, version);
|
||||
loaded = true;
|
||||
byte type = stream.readByte();
|
||||
this.spawner = stream.readInt();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user