#PLAYERTASK

* Add a height of 2m on laser coordinates to ensure LOS test works
This commit is contained in:
Applevangelist 2024-01-16 15:09:51 +01:00
parent 32dbb520d6
commit 298c569f93

View File

@ -98,7 +98,7 @@ PLAYERTASK = {
--- PLAYERTASK class version.
-- @field #string version
PLAYERTASK.version="0.1.22"
PLAYERTASK.version="0.1.23"
--- Generic task condition.
-- @type PLAYERTASK.Condition
@ -2609,6 +2609,7 @@ function PLAYERTASKCONTROLLER:_CheckPrecisionTasks()
-- not done yet
local dcoord = self.LasingDrone:GetCoordinate()
local tcoord = task.Target:GetCoordinate()
tcoord.y = tcoord.y + 2
local dist = dcoord:Get2DDistance(tcoord)
-- close enough?
if dist < 3000 and not self.LasingDrone:IsLasing() then
@ -3192,7 +3193,7 @@ function PLAYERTASKCONTROLLER:_ActiveTaskInfo(Task, Group, Client)
local islasing = self.LasingDrone:IsLasing() == true and yes or no
local prectext = self.gettext:GetEntry("POINTERTARGETREPORT",self.locale)
prectext = string.format(prectext,inreach,islasing)
text = text .. prectext
text = text .. prectext.."("..self.LaserCode..")"
end
end
-- Buddylasing