This commit is contained in:
Anuken
2020-10-21 11:37:44 -04:00
parent ee8f18796e
commit 1cbcb742e9
2 changed files with 3 additions and 2 deletions

View File

@@ -207,7 +207,8 @@ abstract class BuilderComp implements Unitc{
BuildPlan plan = buildPlan(); BuildPlan plan = buildPlan();
Tile tile = world.tile(plan.x, plan.y); Tile tile = world.tile(plan.x, plan.y);
if((!within(tile, buildingRange) && !state.isEditor()) || tile == null){
if(tile == null || (!within(tile, buildingRange) && !state.isEditor())){
return; return;
} }

View File

@@ -30,7 +30,7 @@ abstract class CommanderComp implements Entityc, Posc{
public void update(){ public void update(){
if(formation != null){ if(formation != null){
formation.anchor.set(x, y, /*rotation*/ 0); //TODO rotation set to 0 because rotating is pointless formation.anchor.set(x, y, 0);
formation.updateSlots(); formation.updateSlots();
} }
} }