mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Fixes
ARTY: * Rearming group will not always use 20 km/h = 11 mph. SET_GROUP(+DESIGNATE): * Fixed bug in SET_GROUP:FindNearestGroupFromPointVec2( PointVec2 ) function. This caused DESIGNATE class to crash!
This commit is contained in:
parent
b669ce6d98
commit
c7aa799378
@ -859,15 +859,16 @@ end
|
||||
function SET_GROUP:FindNearestGroupFromPointVec2( PointVec2 )
|
||||
self:F2( PointVec2 )
|
||||
|
||||
local NearestGroup = nil
|
||||
local NearestGroup = nil --Wrapper.Group#GROUP
|
||||
local ClosestDistance = nil
|
||||
|
||||
for ObjectID, ObjectData in pairs( self.Set ) do
|
||||
if NearestGroup == nil then
|
||||
NearestGroup = ObjectData
|
||||
ClosestDistance = PointVec2:DistanceFromVec2( ObjectData:GetVec2() )
|
||||
NearestGroup = ObjectData
|
||||
NearestGroup:GetVec2()
|
||||
ClosestDistance = PointVec2:DistanceFromPointVec2( ObjectData:GetCoordinate() )
|
||||
else
|
||||
local Distance = PointVec2:DistanceFromVec2( ObjectData:GetVec2() )
|
||||
local Distance = PointVec2:DistanceFromPointVec2( ObjectData:GetCoordinate() )
|
||||
if Distance < ClosestDistance then
|
||||
NearestGroup = ObjectData
|
||||
ClosestDistance = Distance
|
||||
|
||||
@ -1632,7 +1632,7 @@ function ARTY:onafterStart(Controllable, From, Event, To)
|
||||
self.RearmingPlaceCoord=nil
|
||||
self.relocateafterfire=false
|
||||
self.autorelocate=false
|
||||
self.RearmingGroupSpeed=20
|
||||
--self.RearmingGroupSpeed=20
|
||||
end
|
||||
|
||||
-- Check that default speed is below max speed.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user