- Add function 'setATC' for 'BAirboss.lua'.

- Move BAirboss:getWindBearingandVel to Utils.getWindBearingandVel.
- Add some "Draw" message on MIZ file.
- TODO "AARTanker.lua" for manage all AARTankers.
This commit is contained in:
2024-12-22 15:33:57 +08:00
parent d16e4acbb9
commit 5655f931ea
4 changed files with 185 additions and 21 deletions
+12
View File
@@ -171,6 +171,18 @@ do
end
function Utils.getWindBearingAndVel(point)
local tPoint = Utils.makeVec3(point)
local gLevel = land.getHeight({x = tPoint.x, y = tPoint.z})
if tPoint.y <= gLevel then
tPoint.y = gLevel + 10
end
local t = atmosphere.getWind(tPoint)
local bearing = math.atan2(t.z, t.x)
local vel = math.sqrt(t.x^2 + t.z^2)
return bearing, vel
end