mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-10 12:49:37 +07:00
Fixed alpha drones dying on load
This commit is contained in:
parent
8b0bbffe27
commit
c64459dbf4
@ -30,7 +30,7 @@ public class UnitTypes implements ContentList{
|
||||
speed = 0.5f;
|
||||
maxVelocity = 1.6f;
|
||||
range = 40f;
|
||||
health = 15;
|
||||
health = 20;
|
||||
weapon = Weapons.droneBlaster;
|
||||
trailColor = Color.valueOf("ffd37f");
|
||||
}
|
||||
|
@ -1,12 +1,14 @@
|
||||
package io.anuke.mindustry.entities.units.types;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.entities.Predict;
|
||||
import io.anuke.mindustry.entities.Unit;
|
||||
import io.anuke.mindustry.entities.traits.TargetTrait;
|
||||
import io.anuke.mindustry.entities.units.FlyingUnit;
|
||||
import io.anuke.mindustry.entities.units.UnitCommand;
|
||||
import io.anuke.mindustry.entities.units.UnitState;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.mindustry.type.AmmoType;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
@ -72,5 +74,9 @@ public class AlphaDrone extends FlyingUnit {
|
||||
@Override
|
||||
public void readSave(DataInput stream) throws IOException {
|
||||
super.readSave(stream);
|
||||
|
||||
if(!Net.active()){
|
||||
leader = Vars.players[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user