Skip to content

Commit

Permalink
Remove unused personality calls in default skirmish AI code
Browse files Browse the repository at this point in the history
  • Loading branch information
relent0r committed Dec 28, 2024
1 parent 2b1d276 commit 49646ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions lua/sim/FactoryBuilderManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,6 @@ FactoryBuilderManager = Class(BuilderManager) {
return false
end

local personality = self.Brain:GetPersonality()
local ptnSize = personality:GetPlatoonSize()

-- This function takes a table of factories to determine if it can build
return self.Brain:CanBuildPlatoon(template, params)
end,
Expand Down
4 changes: 2 additions & 2 deletions lua/sim/PlatoonFormManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ PlatoonFormManager = Class(BuilderManager) {
WARN('*Platoon Form: Could not find template named: ' .. builder:GetPlatoonTemplate())
return
end
local formIt = poolPlatoon:CanFormPlatoon(template, personality:GetPlatoonSize(), self.Location, radius)
local formIt = poolPlatoon:CanFormPlatoon(template, 1, self.Location, radius)
if formIt and builder:GetBuilderStatus() then
local hndl = poolPlatoon:FormPlatoon(template, personality:GetPlatoonSize(), self.Location, radius)
local hndl = poolPlatoon:FormPlatoon(template, 1, self.Location, radius)

--LOG('*AI DEBUG: ARMY ', repr(self.Brain:GetArmyIndex()),': Platoon Form Manager Forming - ',repr(builder.BuilderName),': Location = ',self.LocationType)
--LOG('*AI DEBUG: ARMY ', repr(self.Brain:GetArmyIndex()),': Platoon Form Manager - Platoon Size = ', table.getn(hndl:GetPlatoonUnits()))
Expand Down

0 comments on commit 49646ae

Please sign in to comment.