Merge remote-tracking branch 'origin/master' into develop

# Conflicts:
#	Moose Development/Moose/Wrapper/Positionable.lua
#	Moose Development/Moose/Wrapper/Unit.lua
This commit is contained in:
Applevangelist 2023-06-16 11:11:37 +02:00
commit bfe7bf1af5
2 changed files with 20 additions and 21 deletions

View File

@ -239,19 +239,18 @@ end
function POSITIONABLE:GetVec3() function POSITIONABLE:GetVec3()
local DCSPositionable = self:GetDCSObject() local DCSPositionable = self:GetDCSObject()
if DCSPositionable then if DCSPositionable then
-- local status, vec3 = pcall( --local status, vec3 = pcall(
-- function() -- function()
-- local vec3 = DCSPositionable:getPoint() -- local vec3 = DCSPositionable:getPoint()
-- return vec3 -- return vec3
-- end --end
-- ) --)
local vec3 = DCSPositionable:getPoint() local vec3 = DCSPositionable:getPoint()
return vec3 --if status then
-- if status then return vec3
-- return vec3 --else
-- else --self:E( { "Cannot get Vec3 from DCS Object", Positionable = self, Alive = self:IsAlive() } )
-- self:E( { "Cannot get Vec3 from DCS Object", Positionable = self, Alive = self:IsAlive() } ) --end
-- end
end end
-- ERROR! -- ERROR!
self:E( { "Cannot get the Positionable DCS Object for GetVec3", Positionable = self, Alive = self:IsAlive() } ) self:E( { "Cannot get the Positionable DCS Object for GetVec3", Positionable = self, Alive = self:IsAlive() } )

View File

@ -703,15 +703,15 @@ function UNIT:GetAmmo()
self:F2( self.UnitName ) self:F2( self.UnitName )
local DCSUnit = self:GetDCSObject() local DCSUnit = self:GetDCSObject()
if DCSUnit then if DCSUnit then
-- local status, unitammo = pcall( --local status, unitammo = pcall(
-- function() -- function()
-- local UnitAmmo = DCSUnit:getAmmo() -- local UnitAmmo = DCSUnit:getAmmo()
-- return UnitAmmo -- return UnitAmmo
-- end --end
-- ) --)
-- if status then --if status then
-- return unitammo --return unitammo
-- end --end
local UnitAmmo = DCSUnit:getAmmo() local UnitAmmo = DCSUnit:getAmmo()
return UnitAmmo return UnitAmmo
end end