More updates to fix the RemoveUnit problems for DATABASE and SETs.

This commit is contained in:
FlightControl 2018-09-11 15:26:23 +02:00
parent 9647a1a84e
commit d5e2365bb3
2 changed files with 3 additions and 3 deletions

View File

@ -885,7 +885,7 @@ function AI_CARGO_DISPATCHER:onafterMonitor()
-- The Pickup sequence ...
-- Check if this Carrier need to go and Pickup something...
-- So, if the cargo bay is not full yet with cargo to be loaded ...
self:I( { IsRelocating = AI_Cargo:IsRelocating(), IsTransporting = AI_Cargo:IsTransporting() } )
self:I( { Carrier = CarrierGroupName, IsRelocating = AI_Cargo:IsRelocating(), IsTransporting = AI_Cargo:IsTransporting() } )
if AI_Cargo:IsRelocating() == false and AI_Cargo:IsTransporting() == false then
-- ok, so there is a free Carrier
-- now find the first cargo that is Unloaded
@ -944,7 +944,7 @@ function AI_CARGO_DISPATCHER:onafterMonitor()
if self.HomeZone then
if not self.CarrierHome[Carrier] then
self.CarrierHome[Carrier] = true
AI_Cargo:__Home( 60, self.HomeZone:GetRandomPointVec2(), math.random( self.PickupMinSpeed, self.PickupMaxSpeed ), self.HomeZone )
AI_Cargo:Home( self.HomeZone:GetRandomPointVec2(), math.random( self.PickupMinSpeed, self.PickupMaxSpeed ), self.HomeZone )
end
end
end

View File

@ -269,7 +269,7 @@ function GROUP:Destroy( GenerateEvent )
self:CreateEventDead( timer.getTime(), UnitData )
end
else
self:CreateEventRemove( timer.getTime(), UnitData )
self:CreateEventRemoveUnit( timer.getTime(), UnitData )
end
end
USERFLAG:New( self:GetName() ):Set( 100 )