mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/develop' into branch
This commit is contained in:
commit
2d49745215
@ -3814,15 +3814,20 @@ function RAT:Status(message, forID)
|
|||||||
local N0units=group:GetInitialSize()
|
local N0units=group:GetInitialSize()
|
||||||
|
|
||||||
-- Monitor travelled distance since last check.
|
-- Monitor travelled distance since last check.
|
||||||
local Pnow=coords
|
local Dtravel=0
|
||||||
local Dtravel=Pnow:Get2DDistance(ratcraft.Pnow)
|
if coords and ratcraft.Pnow then
|
||||||
ratcraft.Pnow=Pnow
|
local Dtravel=coords:Get2DDistance(ratcraft.Pnow)
|
||||||
|
ratcraft.Pnow=coords
|
||||||
|
end
|
||||||
|
|
||||||
-- Add up the travelled distance.
|
-- Add up the travelled distance.
|
||||||
ratcraft.Distance=ratcraft.Distance+Dtravel
|
ratcraft.Distance=ratcraft.Distance+Dtravel
|
||||||
|
|
||||||
-- Distance remaining to destination.
|
-- Distance remaining to destination.
|
||||||
local Ddestination=Pnow:Get2DDistance(ratcraft.destination:GetCoordinate())
|
local Ddestination=-1
|
||||||
|
if ratcraft.Pnow then
|
||||||
|
Ddestination=ratcraft.Pnow:Get2DDistance(ratcraft.destination:GetCoordinate())
|
||||||
|
end
|
||||||
|
|
||||||
-- Status report.
|
-- Status report.
|
||||||
if (forID and spawnindex==forID) or (not forID) then
|
if (forID and spawnindex==forID) or (not forID) then
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
-- ===
|
-- ===
|
||||||
-- @module Ops.PlayerTask
|
-- @module Ops.PlayerTask
|
||||||
-- @image OPS_PlayerTask.jpg
|
-- @image OPS_PlayerTask.jpg
|
||||||
-- @date Last Update Nov 2024
|
-- @date Last Update Jan 2025
|
||||||
|
|
||||||
|
|
||||||
do
|
do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user