Fixed markup crash / setsector command fixed / Drone crash fixed

This commit is contained in:
Anuken
2018-08-15 21:00:40 -04:00
parent c569232e74
commit 4f72011cf7
4 changed files with 19 additions and 6 deletions

View File

@@ -190,7 +190,7 @@ public class Drone extends FlyingUnit implements BuilderTrait{
public void update(){
ItemDrop item = (ItemDrop) target;
if(inventory.isFull() || !inventory.canAcceptItem(item.getItem(), 1)){
if(item == null || inventory.isFull() || !inventory.canAcceptItem(item.getItem(), 1)){
setState(drop);
return;
}
@@ -329,7 +329,7 @@ public class Drone extends FlyingUnit implements BuilderTrait{
public void update(){
super.update();
if(target != null && target.getTeam() != team){
if(state.is(repair) && target != null && target.getTeam() != team){
target = null;
}