mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
CARGO_GROUP
- Fixed issue that units are spawned on top of each other on unboarding.
This commit is contained in:
parent
fda061d8c8
commit
258e3d2921
@ -364,9 +364,11 @@ do -- CARGO_GROUP
|
||||
-- @param #string From
|
||||
-- @param #string To
|
||||
function CARGO_GROUP:onenterUnBoarding( From, Event, To, ToPointVec2, NearRadius, ... )
|
||||
--self:F( {From, Event, To, ToPointVec2, NearRadius } )
|
||||
self:F( {From, Event, To, ToPointVec2, NearRadius } )
|
||||
|
||||
NearRadius = NearRadius or 25
|
||||
|
||||
env.info("FF onenterunboarding")
|
||||
|
||||
local Timer = 1
|
||||
|
||||
@ -381,7 +383,14 @@ do -- CARGO_GROUP
|
||||
--- @param Cargo.Cargo#CARGO Cargo
|
||||
function( Cargo, NearRadius )
|
||||
if not Cargo:IsDestroyed() then
|
||||
Cargo:__UnBoard( Timer, ToPointVec2, NearRadius )
|
||||
env.info("FF blubblub")
|
||||
local ToVec=nil
|
||||
if ToPointVec2==nil then
|
||||
ToVec=self.CargoCarrier:GetPointVec2():GetRandomPointVec2InRadius(2*NearRadius, NearRadius)
|
||||
else
|
||||
ToVec=ToPointVec2
|
||||
end
|
||||
Cargo:__UnBoard( Timer, ToVec, NearRadius )
|
||||
Timer = Timer + 3
|
||||
end
|
||||
end, { NearRadius }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user