mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-26 06:45:29 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -1812,7 +1812,7 @@ function OPSGROUP:GetVec3(UnitName)
|
||||
local carrier=self:_GetMyCarrierElement()
|
||||
if carrier and carrier.status~=OPSGROUP.ElementStatus.DEAD and self:IsLoaded() then
|
||||
local unit=carrier.unit
|
||||
if unit and unit:IsAlive()~=nil then
|
||||
if unit and unit:IsExist() then
|
||||
vec3=unit:GetVec3()
|
||||
return vec3
|
||||
end
|
||||
@@ -12813,7 +12813,7 @@ function OPSGROUP:GetAmmoTot()
|
||||
for _,_unit in pairs(units or {}) do
|
||||
local unit=_unit --Wrapper.Unit#UNIT
|
||||
|
||||
if unit and unit:IsAlive()~=nil then
|
||||
if unit and unit:IsExist() then
|
||||
|
||||
-- Get ammo of the unit.
|
||||
local ammo=self:GetAmmoUnit(unit)
|
||||
@@ -12850,8 +12850,6 @@ function OPSGROUP:GetAmmoUnit(unit, display)
|
||||
display=false
|
||||
end
|
||||
|
||||
unit=unit or self.group:GetUnit(1)
|
||||
|
||||
-- Init counter.
|
||||
local nammo=0
|
||||
local nshells=0
|
||||
@@ -12866,6 +12864,10 @@ function OPSGROUP:GetAmmoUnit(unit, display)
|
||||
local ntorps=0
|
||||
local nbombs=0
|
||||
|
||||
unit=unit or self.group:GetUnit(1)
|
||||
|
||||
if unit and unit:IsExist() then
|
||||
|
||||
-- Output.
|
||||
local text=string.format("OPSGROUP group %s - unit %s:\n", self.groupname, unit:GetName())
|
||||
|
||||
@@ -12979,6 +12981,8 @@ function OPSGROUP:GetAmmoUnit(unit, display)
|
||||
self:T3(self.lid..text)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- Total amount of ammunition.
|
||||
nammo=nshells+nrockets+nmissiles+nbombs+ntorps
|
||||
|
||||
|
||||
@@ -646,7 +646,7 @@ AIRBASE.SouthAtlantic={
|
||||
-- * AIRBASE.Sinai.Tel_Nof
|
||||
-- * AIRBASE.Sinai.Abu_Rudeis
|
||||
-- * AIRBASE.Sinai.Inshas_Airbase
|
||||
-- * AIRBASE.Sinai.Ben-Gurion
|
||||
-- * AIRBASE.Sinai.Ben_Gurion
|
||||
-- * AIRBASE.Sinai.Bir_Hasanah
|
||||
-- * AIRBASE.Sinai.Cairo_West
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user