mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Minor fixes
Task_A2G: fixt GetAlt() AI_Formation: fixed comma in equation
This commit is contained in:
@@ -968,7 +968,7 @@ function AI_FORMATION:onenterFollowing( FollowGroupSet ) --R2.1
|
|||||||
local Alpha_R = ( Alpha_T < 0 ) and Alpha_T + 2 * math.pi or Alpha_T
|
local Alpha_R = ( Alpha_T < 0 ) and Alpha_T + 2 * math.pi or Alpha_T
|
||||||
local Position = math.cos( Alpha_R )
|
local Position = math.cos( Alpha_R )
|
||||||
local GD = ( ( GDv.x )^2 + ( GDv.z )^2 ) ^ 0.5
|
local GD = ( ( GDv.x )^2 + ( GDv.z )^2 ) ^ 0.5
|
||||||
local Distance = GD * Position + - CS * 0,5
|
local Distance = GD * Position + - CS * 0.5
|
||||||
|
|
||||||
-- Calculate the group direction vector
|
-- Calculate the group direction vector
|
||||||
local GV = { x = GV2.x - CV2.x, y = GV2.y - CV2.y, z = GV2.z - CV2.z }
|
local GV = { x = GV2.x - CV2.x, y = GV2.y - CV2.y, z = GV2.z - CV2.z }
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ do -- TASK_A2G
|
|||||||
local TargetUnit = Task.TargetSetUnit:GetFirst() -- Wrapper.Unit#UNIT
|
local TargetUnit = Task.TargetSetUnit:GetFirst() -- Wrapper.Unit#UNIT
|
||||||
if TargetUnit then
|
if TargetUnit then
|
||||||
local Coordinate = TargetUnit:GetPointVec3()
|
local Coordinate = TargetUnit:GetPointVec3()
|
||||||
self:T( { TargetCoordinate = Coordinate, Coordinate:GetX(), Coordinate:GetAlt(), Coordinate:GetZ() } )
|
self:T( { TargetCoordinate = Coordinate, Coordinate:GetX(), Coordinate:GetY(), Coordinate:GetZ() } )
|
||||||
Task:SetTargetCoordinate( Coordinate, TaskUnit )
|
Task:SetTargetCoordinate( Coordinate, TaskUnit )
|
||||||
end
|
end
|
||||||
self:__RouteToTargetPoint( 0.1 )
|
self:__RouteToTargetPoint( 0.1 )
|
||||||
|
|||||||
Reference in New Issue
Block a user