Skip to content

Commit

Permalink
Fix various issues with the recall mechanic (FAForever#6396)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hdt80bro authored Nov 16, 2024
1 parent 454dfc4 commit 8d5096b
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 110 deletions.
1 change: 1 addition & 0 deletions lua/aibrain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ AIBrain = Class(FactoryManagerBrainComponent, StatManagerBrainComponent, JammerM

import("/lua/simutils.lua").UpdateUnitCap(self:GetArmyIndex())
import("/lua/simping.lua").OnArmyDefeat(self:GetArmyIndex())
import("/lua/sim/Recall.lua").OnArmyDefeat(self:GetArmyIndex())

local function KillArmy()
local shareOption = ScenarioInfo.Options.Share
Expand Down
2 changes: 2 additions & 0 deletions lua/shared/RecallParams.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ TeamVoteCooldown = 1 * 60 * 10
--- ticks that the recall vote is open (30 seconds)
VoteTime = 30 * 10

---@param acceptanceVotes number
---@param totalVotes number
function RecallRequestAccepted(acceptanceVotes, totalVotes)
if totalVotes <= 3 then
return acceptanceVotes >= totalVotes
Expand Down
Loading

0 comments on commit 8d5096b

Please sign in to comment.