Merge remote-tracking branch 'origin/develop' 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:08:54 +02:00
4 changed files with 31 additions and 22 deletions
+7 -1
View File
@@ -5579,7 +5579,13 @@ function AUFTRAG:GetMissionWaypointCoord(group, randomradius, surfacetypes)
end end
-- Create waypoint coordinate half way between us and the target. -- Create waypoint coordinate half way between us and the target.
local waypointcoord=group:GetCoordinate():GetIntermediateCoordinate(self:GetTargetCoordinate(), self.missionFraction) local waypointcoord=COORDINATE:New(0,0,0)
local coord=group:GetCoordinate()
if coord then
waypointcoord=coord:GetIntermediateCoordinate(self:GetTargetCoordinate(), self.missionFraction)
else
self:E(self.lid..string.format("ERROR: Cannot get coordinate of group %s (alive=%s)!", tostring(group:GetName()), tostring(group:IsAlive())))
end
local alt=waypointcoord.y local alt=waypointcoord.y
-- Add some randomization. -- Add some randomization.
+3 -1
View File
@@ -2579,7 +2579,9 @@ function CHIEF:CheckOpsZoneQueue()
local zoneName=stratzone.opszone.zone:GetName() local zoneName=stratzone.opszone.zone:GetName()
-- Check coalition and importance. -- Check coalition and importance.
if ownercoalition~=self.coalition and (stratzone.importance==nil or stratzone.importance<=vip) and (not stratzone.opszone:IsStopped()) then if (ownercoalition~=self.coalition or (ownercoalition==self.coalition and stratzone.opszone:IsEmpty()))
and (stratzone.importance==nil or stratzone.importance<=vip)
and (not stratzone.opszone:IsStopped()) then
-- Debug info. -- Debug info.
self:T(self.lid..string.format("Zone %s [%s] is owned by coalition %d", zoneName, stratzone.opszone:GetState(), ownercoalition)) self:T(self.lid..string.format("Zone %s [%s] is owned by coalition %d", zoneName, stratzone.opszone:GetState(), ownercoalition))
@@ -239,18 +239,19 @@ 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()
--if status then return vec3
return vec3 -- if status then
--else -- return vec3
--self:E( { "Cannot get Vec3 from DCS Object", Positionable = self, Alive = self:IsAlive() } ) -- else
--end -- self:E( { "Cannot get Vec3 from DCS Object", Positionable = self, Alive = self:IsAlive() } )
-- 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() } )
+9 -9
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