mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
OPS
UNIT and POSITIONABLE - Removed pcall for GetVec3 and GetAmmo CHIEF - Deploy resources if zone is empty and owned by itself
This commit is contained in:
@@ -703,17 +703,17 @@ function UNIT:GetAmmo()
|
||||
self:F2( self.UnitName )
|
||||
local DCSUnit = self:GetDCSObject()
|
||||
if DCSUnit then
|
||||
local status, unitammo = pcall(
|
||||
function()
|
||||
local UnitAmmo = DCSUnit:getAmmo()
|
||||
return UnitAmmo
|
||||
end
|
||||
)
|
||||
if status then
|
||||
return unitammo
|
||||
end
|
||||
--local UnitAmmo = DCSUnit:getAmmo()
|
||||
--return UnitAmmo
|
||||
-- local status, unitammo = pcall(
|
||||
-- function()
|
||||
-- local UnitAmmo = DCSUnit:getAmmo()
|
||||
-- return UnitAmmo
|
||||
-- end
|
||||
-- )
|
||||
-- if status then
|
||||
-- return unitammo
|
||||
-- end
|
||||
local UnitAmmo = DCSUnit:getAmmo()
|
||||
return UnitAmmo
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user