Min Fuel Fixes

AI_A2A and AI_Patrol:
Changed average fuel for controllable to new min fuel function. Hopefully provides better RTB behavior.

CONTROLLABLE:
Added GetFuelMin and GetFuelAve functions to ensure polymorphic behavior.

UNIT:
Added GetFuelMin and GetFuelAve functions for completeness and potential polymorphism.
This commit is contained in:
funkyfranky
2018-06-18 23:13:21 +02:00
parent 99963c28e9
commit 19197bf234
4 changed files with 42 additions and 4 deletions

View File

@@ -824,7 +824,7 @@ function AI_PATROL_ZONE:onafterStatus()
local RTB = false
local Fuel = self.Controllable:GetUnit(1):GetFuel()
local Fuel = self.Controllable:GetFuelMin()
if Fuel < self.PatrolFuelThresholdPercentage then
self:E( self.Controllable:GetName() .. " is out of fuel:" .. Fuel .. ", RTB!" )
local OldAIControllable = self.Controllable