Skip to content

Commit

Permalink
Fix issues with release 3732 (FAForever#3774)
Browse files Browse the repository at this point in the history
  • Loading branch information
Garanas authored Apr 8, 2022
1 parent eb03734 commit 02d887e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

FAF Gametype | FAF Develop game type | FAF Beta balance gametype
FAF | FAF Develop| FAF Beta balance
------------ | ------------- | -----------
[![Build](https://github.com/FAForever/fa/actions/workflows/build.yaml/badge.svg?branch=deploy%2Ffaf)](https://github.com/FAForever/fa/actions/workflows/build.yaml) | [![Build](https://github.com/FAForever/fa/actions/workflows/build.yaml/badge.svg?branch=deploy%2Ffafdevelop)](https://github.com/FAForever/fa/actions/workflows/build.yaml) | [![Build](https://github.com/FAForever/fa/actions/workflows/build.yaml/badge.svg?branch=deploy%2Ffafbeta)](https://github.com/FAForever/fa/actions/workflows/build.yaml)

Expand Down
8 changes: 6 additions & 2 deletions lua/aibrain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,13 @@ AIBrain = Class(moho.aibrain_methods) {
for k, brain in brains do
local units = self:GetListOfUnits(categories.ALLUNITS - categories.WALL - categories.COMMAND, false)
if units and not table.empty(units) then
TransferUnitsOwnership(units, brain.index)
local givenUnitCount = table.getn(TransferUnitsOwnership(units, brain.index))

-- only show message when we actually gift that player some units
if givenUnitCount > 0 then
Sync.ArmyTransfer = { { from = selfIndex, to = brain.index, reason = "fullshare" } }
end

Sync.ArmyTransfer = { { from = selfIndex, to = brain.index, reason = "fullshare" } }
WaitSeconds(1)
end
end
Expand Down

0 comments on commit 02d887e

Please sign in to comment.