Improved boarding process

Fixed boarding process when a carrier would ascend while boarding, the
boarding process would be cancelled by the cargo. the carrier is
notified of that event. When the carrier lands again, he can again board
the cargo using the cargo menu options.
This commit is contained in:
FlightControl
2017-05-08 14:57:16 +02:00
parent 2fadd949a6
commit 3329465fd3
2 changed files with 291 additions and 263 deletions

View File

@@ -277,6 +277,8 @@ do -- TASK_CARGO
)
self:__SelectAction( -15 )
Task:GetMission():GetCommandCenter():MessageToGroup("Cargo menu is ready ...", TaskUnit:GetGroup() )
end
---
@@ -429,14 +431,10 @@ do -- TASK_CARGO
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
function self.Cargo:OnEnterLoaded( From, Event, To, TaskUnit, TaskProcess )
self:E({From, Event, To, TaskUnit, TaskProcess })
TaskProcess:__Boarded( 0.1 )
end
if self.Cargo:IsInRadius( TaskUnit:GetPointVec2() ) then
if TaskUnit:InAir() then
--- ABORT the boarding. Split group if any and go back to select action.