Skip to content

Commit 8d5096b

Browse files
authored
Fix various issues with the recall mechanic (#6396)
1 parent 454dfc4 commit 8d5096b

File tree

4 files changed

+185
-110
lines changed

4 files changed

+185
-110
lines changed

lua/aibrain.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ AIBrain = Class(FactoryManagerBrainComponent, StatManagerBrainComponent, JammerM
436436

437437
import("/lua/simutils.lua").UpdateUnitCap(self:GetArmyIndex())
438438
import("/lua/simping.lua").OnArmyDefeat(self:GetArmyIndex())
439+
import("/lua/sim/Recall.lua").OnArmyDefeat(self:GetArmyIndex())
439440

440441
local function KillArmy()
441442
local shareOption = ScenarioInfo.Options.Share

lua/shared/RecallParams.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ TeamVoteCooldown = 1 * 60 * 10
1414
--- ticks that the recall vote is open (30 seconds)
1515
VoteTime = 30 * 10
1616

17+
---@param acceptanceVotes number
18+
---@param totalVotes number
1719
function RecallRequestAccepted(acceptanceVotes, totalVotes)
1820
if totalVotes <= 3 then
1921
return acceptanceVotes >= totalVotes

0 commit comments

Comments
 (0)