Merge pull request #2194 from shaji-Dev/Heartbreaker

[Fixed] FlightGroup do not RTB because of incorrect `destbase` assignment.
This commit is contained in:
Thomas 2024-12-10 19:08:42 +01:00 committed by GitHub
commit 34e248b1c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11444,10 +11444,10 @@ function OPSGROUP:_InitWaypoints(WpIndexMin, WpIndexMax)
if self:IsFlightgroup() then
-- Get home and destination airbases from waypoints.
self.homebase=self.homebase or self:GetHomebaseFromWaypoints()
self.homebase=self.homebase or self:GetHomebaseFromWaypoints() -- GetHomebaseFromWaypoints() returns carriers or destroyers if no airbase is found.
local destbase=self:GetDestinationFromWaypoints()
self.destbase=self.destbase or destbase
self.currbase=self:GetHomebaseFromWaypoints()
--self.currbase=self:GetHomebaseFromWaypoints() -- Skipped To fix RTB issue
--env.info("FF home base "..(self.homebase and self.homebase:GetName() or "unknown"))
--env.info("FF dest base "..(self.destbase and self.destbase:GetName() or "unknown"))
@ -11458,9 +11458,9 @@ function OPSGROUP:_InitWaypoints(WpIndexMin, WpIndexMax)
end
-- Set destination to homebase.
if self.destbase==nil then
self.destbase=self.homebase
end
--if self.destbase==nil then -- Skipped To fix RTB issue
-- self.destbase=self.homebase
--end
end