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:
@@ -364,9 +364,11 @@ do -- CARGO_GROUP
|
|||||||
-- @param #string From
|
-- @param #string From
|
||||||
-- @param #string To
|
-- @param #string To
|
||||||
function CARGO_GROUP:onenterUnBoarding( From, Event, To, ToPointVec2, NearRadius, ... )
|
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
|
NearRadius = NearRadius or 25
|
||||||
|
|
||||||
|
env.info("FF onenterunboarding")
|
||||||
|
|
||||||
local Timer = 1
|
local Timer = 1
|
||||||
|
|
||||||
@@ -381,7 +383,14 @@ do -- CARGO_GROUP
|
|||||||
--- @param Cargo.Cargo#CARGO Cargo
|
--- @param Cargo.Cargo#CARGO Cargo
|
||||||
function( Cargo, NearRadius )
|
function( Cargo, NearRadius )
|
||||||
if not Cargo:IsDestroyed() then
|
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
|
Timer = Timer + 3
|
||||||
end
|
end
|
||||||
end, { NearRadius }
|
end, { NearRadius }
|
||||||
|
|||||||
Reference in New Issue
Block a user