diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index cb1bda5be..3c967a15e 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -5579,7 +5579,13 @@ function AUFTRAG:GetMissionWaypointCoord(group, randomradius, surfacetypes) end -- 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 -- Add some randomization. diff --git a/Moose Development/Moose/Ops/Chief.lua b/Moose Development/Moose/Ops/Chief.lua index 91e32af71..0272ec659 100644 --- a/Moose Development/Moose/Ops/Chief.lua +++ b/Moose Development/Moose/Ops/Chief.lua @@ -2579,7 +2579,9 @@ function CHIEF:CheckOpsZoneQueue() local zoneName=stratzone.opszone.zone:GetName() -- 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. self:T(self.lid..string.format("Zone %s [%s] is owned by coalition %d", zoneName, stratzone.opszone:GetState(), ownercoalition)) diff --git a/Moose Development/Moose/Wrapper/Positionable.lua b/Moose Development/Moose/Wrapper/Positionable.lua index 571e0d48c..a1e47f766 100644 --- a/Moose Development/Moose/Wrapper/Positionable.lua +++ b/Moose Development/Moose/Wrapper/Positionable.lua @@ -239,18 +239,19 @@ end function POSITIONABLE:GetVec3() local DCSPositionable = self:GetDCSObject() if DCSPositionable then - --local status, vec3 = pcall( - -- function() - -- local vec3 = DCSPositionable:getPoint() - -- return vec3 - --end - --) +-- local status, vec3 = pcall( +-- function() +-- local vec3 = DCSPositionable:getPoint() +-- return vec3 +-- end +-- ) local vec3 = DCSPositionable:getPoint() - --if status then - return vec3 - --else - --self:E( { "Cannot get Vec3 from DCS Object", Positionable = self, Alive = self:IsAlive() } ) - --end + return vec3 +-- if status then +-- return vec3 +-- else +-- self:E( { "Cannot get Vec3 from DCS Object", Positionable = self, Alive = self:IsAlive() } ) +-- end end -- ERROR! self:E( { "Cannot get the Positionable DCS Object for GetVec3", Positionable = self, Alive = self:IsAlive() } ) diff --git a/Moose Development/Moose/Wrapper/Unit.lua b/Moose Development/Moose/Wrapper/Unit.lua index cd6769fc2..cdc5d63d6 100644 --- a/Moose Development/Moose/Wrapper/Unit.lua +++ b/Moose Development/Moose/Wrapper/Unit.lua @@ -703,15 +703,15 @@ 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 status, unitammo = pcall( +-- function() +-- local UnitAmmo = DCSUnit:getAmmo() +-- return UnitAmmo +-- end +-- ) +-- if status then +-- return unitammo +-- end local UnitAmmo = DCSUnit:getAmmo() return UnitAmmo end