- 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:
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user