mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Minor fixes.
Positionalble: Added isExist because of problems with getting coords from scenery objects. Suppresson: Fixes. Added new transitions. PseudoATC: Removed eject. Artillery: Optimized debug output.
This commit is contained in:
@@ -391,7 +391,7 @@ function POSITIONABLE:GetVelocityVec3()
|
||||
|
||||
local DCSPositionable = self:GetDCSObject()
|
||||
|
||||
if DCSPositionable then
|
||||
if DCSPositionable and DCSPositionable:isExist() then
|
||||
local PositionableVelocityVec3 = DCSPositionable:getVelocity()
|
||||
self:T3( PositionableVelocityVec3 )
|
||||
return PositionableVelocityVec3
|
||||
@@ -433,7 +433,7 @@ function POSITIONABLE:GetVelocityKMH()
|
||||
|
||||
local DCSPositionable = self:GetDCSObject()
|
||||
|
||||
if DCSPositionable then
|
||||
if DCSPositionable and DCSPositionable:isExist() then
|
||||
local VelocityVec3 = self:GetVelocityVec3()
|
||||
local Velocity = ( VelocityVec3.x ^ 2 + VelocityVec3.y ^ 2 + VelocityVec3.z ^ 2 ) ^ 0.5 -- in meters / sec
|
||||
local Velocity = Velocity * 3.6 -- now it is in km/h.
|
||||
@@ -452,7 +452,7 @@ function POSITIONABLE:GetVelocityMPS()
|
||||
|
||||
local DCSPositionable = self:GetDCSObject()
|
||||
|
||||
if DCSPositionable then
|
||||
if DCSPositionable and DCSPositionable:isExist() then
|
||||
local VelocityVec3 = self:GetVelocityVec3()
|
||||
local Velocity = ( VelocityVec3.x ^ 2 + VelocityVec3.y ^ 2 + VelocityVec3.z ^ 2 ) ^ 0.5 -- in meters / sec
|
||||
self:T3( Velocity )
|
||||
|
||||
Reference in New Issue
Block a user