mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Merge remote-tracking branch 'refs/remotes/origin/master' into Detection
# Conflicts: # Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua # Moose Mission Setup/Moose.lua # Moose Test Missions/Moose_Test_AIBALANCER/Moose_Test_AIBALANCER.miz # Moose Test Missions/Moose_Test_AIRBASEPOLICE/Moose_Test_AIRBASEPOLICE.miz # Moose Test Missions/Moose_Test_BASE/Moose_Test_AIRBLANCER_with_Moose.miz # Moose Test Missions/Moose_Test_BASE/Moose_Test_AIRBLANCER_without_Moose.miz # Moose Test Missions/Moose_Test_BASE/Moose_Test_BASE.miz # Moose Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz # Moose Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz # Moose Test Missions/Moose_Test_DETECTION/Moose_Test_DETECTION.miz # Moose Test Missions/Moose_Test_DETECTION/Moose_Test_DETECTION_Laser.miz # Moose Test Missions/Moose_Test_ESCORT/MOOSE_Test_ESCORT.miz # Moose Test Missions/Moose_Test_FAC/Moose_Test_FAC.miz # Moose Test Missions/Moose_Test_MISSILETRAINER/Moose_Test_MISSILETRAINER.miz # Moose Test Missions/Moose_Test_PATROLZONE/MOOSE_Test_PATROLZONE.miz # Moose Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz # Moose Test Missions/Moose_Test_SET_AIRBASE/Moose_Test_SET_AIRBASE.miz # Moose Test Missions/Moose_Test_SET_CLIENT/Moose_Test_SET_CLIENT.miz # Moose Test Missions/Moose_Test_SET_GROUP/Moose_Test_SET_GROUP.miz # Moose Test Missions/Moose_Test_SPAWN/MOOSE_Test_SPAWN.miz # Moose Test Missions/Moose_Test_SPAWN_Repeat/MOOSE_Test_SPAWN_Repeat.miz # Moose Test Missions/Moose_Test_TASK_Pickup_and_Deploy/MOOSE_Test_TASK_Pickup_and_Deploy.miz # Moose Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.miz # Moose Test Missions/Moose_Test_ZONE/Moose_Test_ZONE.miz # Moose Test Missions/Moose_Test_ZONE_POLYGON/Moose_Test_ZONE_POLYGON.miz # Moose Test Missions/Moose_Test_ZONE_RADIUS/Moose_Test_ZONE_RADIUS.miz # Moose Test Missions/Moose_Test_ZONE_UNIT/Moose_Test_ZONE_UNIT.miz
This commit is contained in:
commit
376b0d08a5
@ -416,7 +416,7 @@ function SPAWN:ReSpawn( SpawnIndex )
|
||||
-- TODO: This logic makes DCS crash and i don't know why (yet).
|
||||
local SpawnGroup = self:GetGroupFromIndex( SpawnIndex )
|
||||
if SpawnGroup then
|
||||
local SpawnDCSGroup = SpawnGroup:GetDCSGroup()
|
||||
local SpawnDCSGroup = SpawnGroup:GetDCSObject()
|
||||
if SpawnDCSGroup then
|
||||
SpawnGroup:Destroy()
|
||||
end
|
||||
|
||||
@ -414,6 +414,23 @@ function ZONE_UNIT:GetVec2()
|
||||
return ZoneVec2
|
||||
end
|
||||
|
||||
--- Returns a random location within the zone.
|
||||
-- @param #ZONE_UNIT self
|
||||
-- @return DCSTypes#Vec2 The random location within the zone.
|
||||
function ZONE_UNIT:GetRandomVec2()
|
||||
self:F( self.ZoneName )
|
||||
|
||||
local Point = {}
|
||||
local PointVec2 = self.ZoneUNIT:GetPointVec2()
|
||||
|
||||
local angle = math.random() * math.pi*2;
|
||||
Point.x = PointVec2.x + math.cos( angle ) * math.random() * self:GetRadius();
|
||||
Point.y = PointVec2.y + math.sin( angle ) * math.random() * self:GetRadius();
|
||||
|
||||
self:T( { Point } )
|
||||
|
||||
return Point
|
||||
end
|
||||
-- Polygons
|
||||
|
||||
--- The ZONE_POLYGON_BASE class defined by an array of @{DCSTypes#Vec2}, forming a polygon.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user