mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 23:28:52 +07:00
Fixed drones repairing incorrect blocks
This commit is contained in:
parent
3746344cba
commit
8dbd0a6130
@ -329,6 +329,10 @@ public class Drone extends FlyingUnit implements BuilderTrait{
|
||||
public void update(){
|
||||
super.update();
|
||||
|
||||
if(target != null && target.getTeam() != team){
|
||||
target = null;
|
||||
}
|
||||
|
||||
if(Net.client() && state.is(repair) && target instanceof TileEntity){
|
||||
TileEntity entity = (TileEntity) target;
|
||||
entity.health += type.healSpeed * Timers.delta();
|
||||
|
Loading…
Reference in New Issue
Block a user