mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Ready for another test session.
This commit is contained in:
@@ -73,6 +73,7 @@ end
|
||||
|
||||
--- Destroys the OBJECT.
|
||||
-- @param #OBJECT self
|
||||
-- @return #boolean true if the object is destroyed.
|
||||
-- @return #nil The DCS Unit is not existing or alive.
|
||||
function OBJECT:Destroy()
|
||||
|
||||
@@ -80,7 +81,8 @@ function OBJECT:Destroy()
|
||||
|
||||
if DCSObject then
|
||||
--BASE:CreateEventCrash( timer.getTime(), DCSObject )
|
||||
DCSObject:destroy()
|
||||
DCSObject:destroy( false )
|
||||
return true
|
||||
end
|
||||
|
||||
BASE:E( { "Cannot Destroy", Name = self.ObjectName, Class = self:GetClassName() } )
|
||||
|
||||
@@ -138,13 +138,24 @@ function STATIC:SpawnAt( Coordinate, Heading )
|
||||
end
|
||||
|
||||
|
||||
--- Respawn the @{Unit} using a (tweaked) template of the parent Group.
|
||||
--- Respawn the @{Unit} at the same location with the same properties.
|
||||
-- This is useful to respawn a cargo after it has been destroyed.
|
||||
-- @param #UNIT self
|
||||
-- @param Core.Point#COORDINATE Coordinate The coordinate where to spawn the new Static.
|
||||
-- @param #number Heading The heading of the unit respawn.
|
||||
function STATIC:ReSpawn()
|
||||
|
||||
local SpawnStatic = SPAWNSTATIC:NewFromStatic( self.StaticName )
|
||||
|
||||
SpawnStatic:ReSpawn()
|
||||
end
|
||||
|
||||
|
||||
--- Respawn the @{Unit} at a defined Coordinate with an optional heading.
|
||||
-- @param #UNIT self
|
||||
-- @param Core.Point#COORDINATE Coordinate The coordinate where to spawn the new Static.
|
||||
-- @param #number Heading The heading of the unit respawn.
|
||||
function STATIC:ReSpawnAt( Coordinate, Heading )
|
||||
|
||||
local SpawnStatic = SPAWNSTATIC:NewFromStatic( self.StaticName )
|
||||
|
||||
SpawnStatic:ReSpawnAt( Coordinate, Heading )
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user