mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#CTLD_HERCULES
* Fix for `CTLD_HERCULES:Cargo_Track(cargo, initiator)` when flying very low
This commit is contained in:
commit
dd32d2e53c
@ -4895,7 +4895,7 @@ CTLD_HERCULES = {
|
|||||||
ClassName = "CTLD_HERCULES",
|
ClassName = "CTLD_HERCULES",
|
||||||
lid = "",
|
lid = "",
|
||||||
Name = "",
|
Name = "",
|
||||||
Version = "0.0.1",
|
Version = "0.0.2",
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Define cargo types.
|
--- Define cargo types.
|
||||||
@ -5306,7 +5306,7 @@ function CTLD_HERCULES:Cargo_Track(cargo, initiator)
|
|||||||
if self:Check_SurfaceType(cargo.Cargo_Contents) == 2 or self:Check_SurfaceType(cargo.Cargo_Contents) == 3 then
|
if self:Check_SurfaceType(cargo.Cargo_Contents) == 2 or self:Check_SurfaceType(cargo.Cargo_Contents) == 3 then
|
||||||
cargo.Cargo_over_water = true--pallets gets destroyed in water
|
cargo.Cargo_over_water = true--pallets gets destroyed in water
|
||||||
end
|
end
|
||||||
local dcsvec3 = self.ObjectTracker[cargo.Cargo_Contents.id_] -- last known position
|
local dcsvec3 = self.ObjectTracker[cargo.Cargo_Contents.id_] or initiator:GetVec3() -- last known position
|
||||||
self:T("SPAWNPOSITION: ")
|
self:T("SPAWNPOSITION: ")
|
||||||
self:T({dcsvec3})
|
self:T({dcsvec3})
|
||||||
local Vec2 = {
|
local Vec2 = {
|
||||||
@ -5409,7 +5409,7 @@ function CTLD_HERCULES:Cargo_Initialize(Initiator, Cargo_Contents, Cargo_Type_na
|
|||||||
|
|
||||||
local timer = TIMER:New(self.Cargo_Track,self,self.Cargo[self.j],Initiator)
|
local timer = TIMER:New(self.Cargo_Track,self,self.Cargo[self.j],Initiator)
|
||||||
self.Cargo[self.j].scheduleFunctionID = timer
|
self.Cargo[self.j].scheduleFunctionID = timer
|
||||||
timer:Start(5,2,600)
|
timer:Start(1,1,600)
|
||||||
|
|
||||||
else
|
else
|
||||||
-- no paras
|
-- no paras
|
||||||
@ -5434,7 +5434,7 @@ function CTLD_HERCULES:Cargo_Initialize(Initiator, Cargo_Contents, Cargo_Type_na
|
|||||||
|
|
||||||
local timer = TIMER:New(self.Cargo_Track,self,self.Cargo[self.j],Initiator)
|
local timer = TIMER:New(self.Cargo_Track,self,self.Cargo[self.j],Initiator)
|
||||||
self.Cargo[self.j].scheduleFunctionID = timer
|
self.Cargo[self.j].scheduleFunctionID = timer
|
||||||
timer:Start(5,2,600)
|
timer:Start(1,1,600)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user