Compare commits

...

8 Commits
2.4.5 ... 2.4.7

Author SHA1 Message Date
FlightControl
b0885ada00 Fixing resuming task after refuelling. 2018-10-21 14:36:31 +02:00
FlightControl
1c6c0c4d81 Fixing resuming task after refuelling. 2018-10-21 14:36:05 +02:00
FlightControl
3011b0ac8e Merge branch 'develop' 2018-10-21 13:18:29 +02:00
FlightControl
e4334cccb3 Fixing back to the inclusion of inactive units. 2018-10-21 13:12:20 +02:00
FlightControl
fd30da2f95 Merge branch 'develop' 2018-10-20 04:31:59 +02:00
FlightControl
b378ad2885 Fixing path calculation. Direct route when the length between the two coordinates is less than 2 km. 2018-10-20 04:26:45 +02:00
FlightControl
9c45031a33 Merge branch 'develop' 2018-10-19 17:01:11 +02:00
FlightControl
e4606b4d05 Fixing path calculation. Direct route when the length between the two coordinates is less than 1 km. 2018-10-19 17:00:43 +02:00
5 changed files with 11 additions and 13 deletions

View File

@@ -635,7 +635,7 @@ end
--- @param Wrapper.Group#GROUP AIGroup
function AI_A2A.Resume( AIGroup, Fsm )
AIGroup:F( { "AI_A2A.Resume:", AIGroup:GetName() } )
AIGroup:I( { "AI_A2A.Resume:", AIGroup:GetName() } )
if AIGroup:IsAlive() then
Fsm:__RTB( 0.5 )
end

View File

@@ -476,13 +476,12 @@ function AI_A2A_CAP:OnEventDead( EventData )
end
--- @param Wrapper.Group#GROUP AICap
function AI_A2A_CAP.Resume( AICap )
function AI_A2A_CAP.Resume( AICap, Fsm )
AICap:F( { "AI_A2A_CAP.Resume:", AICap:GetName() } )
AICap:I( { "AI_A2A_CAP.Resume:", AICap:GetName() } )
if AICap:IsAlive() then
local _AI_A2A = AICap:GetState( AICap, "AI_A2A" ) -- #AI_A2A
_AI_A2A:__Reset( 1 )
_AI_A2A:__Route( 5 )
Fsm:__Reset( 1 )
Fsm:__Route( 5 )
end
end

View File

@@ -351,13 +351,12 @@ function AI_A2A_PATROL:onafterRoute( AIPatrol, From, Event, To )
end
--- @param Wrapper.Group#GROUP AIPatrol
function AI_A2A_PATROL.Resume( AIPatrol )
function AI_A2A_PATROL.Resume( AIPatrol, Fsm )
AIPatrol:F( { "AI_A2A_PATROL.Resume:", AIPatrol:GetName() } )
AIPatrol:I( { "AI_A2A_PATROL.Resume:", AIPatrol:GetName() } )
if AIPatrol:IsAlive() then
local _AI_A2A = AIPatrol:GetState( AIPatrol, "AI_A2A" ) -- AI.AI_A2A#AI_A2A
_AI_A2A:__Reset( 1 )
_AI_A2A:__Route( 5 )
Fsm:__Reset( 1 )
Fsm:__Route( 5 )
end
end

View File

@@ -899,7 +899,7 @@ function AI_CARGO_DISPATCHER:onafterMonitor()
for CarrierGroupName, Carrier in pairs( self.SetCarrier:GetSet() ) do
local Carrier = Carrier -- Wrapper.Group#GROUP
if Carrier:IsAlive() == true then
if Carrier:IsAlive() ~= nil then
local AI_Cargo = self.AI_Cargo[Carrier]
if not AI_Cargo then

View File

@@ -2136,7 +2136,7 @@ do -- Route methods
local canroad=false
-- Check if a valid path on road could be found.
if PathOnRoad then
if PathOnRoad and LengthDirect > 2000 then -- if the length of the movement is less than 1 km, drive directly.
-- Check whether the road is very long compared to direct path.
if LongRoad and Shortcut then