@@ -453,7 +453,7 @@ function getEnemiesInCone(angle,length,showLines,checkNoCombat)
453
453
454
454
for i = 1 , # enemiesTable do
455
455
local thisUnit = enemiesTable [i ]
456
- local unitX , unitY , unitZ = GetObjectPosition (thisUnit )
456
+ local unitX , unitY , unitZ = GetPositionBetweenObjects ( thisUnit , " player " , UnitCombatReach ( thisUnit )) -- GetObjectPosition(thisUnit)
457
457
if playerX and unitX then
458
458
local angleToUnit = getAngles (playerX ,playerY ,playerZ ,unitX ,unitY ,unitZ )
459
459
local angleDifference = facing > angleToUnit and facing - angleToUnit or angleToUnit - facing
@@ -511,7 +511,7 @@ function getEnemiesInRect(width,length,showLines,checkNoCombat)
511
511
for i = 1 , # enemiesTable do
512
512
local thisUnit = enemiesTable [i ]
513
513
-- if thisUnit ~= "target" then
514
- local tX , tY = GetObjectPosition (thisUnit )
514
+ local tX , tY = GetPositionBetweenObjects ( thisUnit , " player " , UnitCombatReach ( thisUnit )) -- GetObjectPosition(thisUnit)
515
515
-- end
516
516
if tX and tY then
517
517
if isInside (tX ,tY ,nlX ,nlY ,nrX ,nrY ,frX ,frY ) then
0 commit comments