Skip to content

Commit d5fc919

Browse files
committed
fix mining
1 parent 4ba9255 commit d5fc919

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/java/bwapi/Game.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,7 @@ else if (!builder.getType().isFlyingBuilding() && type != Zerg_Nydus_Canal && !t
535535
// then lands at the new location before building the addon), so we need to do similar checks for the
536536
// location that the building will be when it builds the addon.
537537
if ( builder != null && !builder.getType().isAddon() && type.isAddon() ) {
538-
if (!canBuildHere(lt.subtract(new TilePosition(4, 1)), builder.getType(), builder, checkExplored)) {
539-
return false;
540-
}
538+
return canBuildHere(lt.subtract(new TilePosition(4, 1)), builder.getType(), builder, checkExplored);
541539
}
542540

543541
//if the build site passes all these tests, return true.

src/main/java/bwapi/Unit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2511,7 +2511,7 @@ public boolean canGather(Unit targetUnit, boolean checkCanTargetUnit, boolean ch
25112511
return false;
25122512
}
25132513

2514-
final UnitType uType = getType();
2514+
final UnitType uType = targetUnit.getType();
25152515
if ( !uType.isResourceContainer() || uType == Resource_Vespene_Geyser ){
25162516
return false;
25172517
}

0 commit comments

Comments
 (0)