if (buildPosition == null) {
System.err.println("buildPosition is null (travelToConstruct " + buildingType + ")");
constructionOrder.cancel();
return;
}
<BUG>double maxDistanceToIssueBuildOrder = buildingType.isGasBuilding() ? 2.7 : 1;
</BUG>
double distance = builder.distanceTo(buildPosition);
if (distance > maxDistanceToIssueBuildOrder) {
builder.move(buildPosition, UnitActions.MOVE_TO_BUILD);

if (buildPosition == null) {
System.err.println("buildPosition is null (travelToConstruct " + buildingType + ")");
constructionOrder.cancel();
return;
}
double maxDistanceToIssueBuildOrder = buildingType.isGasBuilding() ? 3.2 : 1;
double distance = builder.distanceTo(buildPosition);
if (distance > maxDistanceToIssueBuildOrder) {
builder.move(buildPosition, UnitActions.MOVE_TO_BUILD);
