Skip to content

Commit

Permalink
Don't cancel double expansion #247
Browse files Browse the repository at this point in the history
As can cancel training, instead just increased the chance to detect double expansion when peon is close.
  • Loading branch information
SMUnlimited committed Feb 25, 2024
1 parent 11e7c36 commit 7042da4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Jobs/BUILD_EXPANSION.eai
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function BuildExpansionJob takes unit u returns nothing
if current_expansion == null then
return
endif
if DistanceBetweenUnits(u, current_expansion) > race_max_expa_mine_distance then
if DistanceBetweenUnits(u, current_expansion) > 250 then
if CheckDoubleExpansionsClaimedInArea(GetUnitX(current_expansion), GetUnitY(current_expansion)) then
if double_expansion_ally_present then
call Trace("Cancelling Expansion - Enemy ally expansion detected")
Expand All @@ -37,7 +37,7 @@ function BuildExpansionJob takes unit u returns nothing
endif
endif
endif
call TQAddUnitJob(2 * sleep_multiplier, BUILD_EXPANSION, 0, u)
call TQAddUnitJob(2, BUILD_EXPANSION, 0, u)
endif

endfunction
Expand Down
1 change: 0 additions & 1 deletion Jobs/DETECT_DOUBLE_EXP.eai
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ function CheckDoubleExpansion takes nothing returns nothing
exitwhen u == null
if CheckDoubleExpansionsClaimedInArea(GetUnitX(u), GetUnitY(u)) then
if double_expansion_ally_present then
call IssueImmediateOrderById(u, order_cancel)
call Trace("Ally double expansion detected")
endif
endif
Expand Down

0 comments on commit 7042da4

Please sign in to comment.