Skip to content

Commit

Permalink
System - Partial Large Target fix for rect and cone casts, may need adj
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteOne committed Sep 28, 2019
1 parent d6e2b03 commit aca4da5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions System/engines/EnemiesEngineFunctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ function getEnemiesInCone(angle,length,showLines,checkNoCombat)

for i = 1, #enemiesTable do
local thisUnit = enemiesTable[i]
local unitX, unitY, unitZ = GetObjectPosition(thisUnit)
local unitX, unitY, unitZ = GetPositionBetweenObjects(thisUnit, "player", UnitCombatReach(thisUnit))--GetObjectPosition(thisUnit)
if playerX and unitX then
local angleToUnit = getAngles(playerX,playerY,playerZ,unitX,unitY,unitZ)
local angleDifference = facing > angleToUnit and facing - angleToUnit or angleToUnit - facing
Expand Down Expand Up @@ -511,7 +511,7 @@ function getEnemiesInRect(width,length,showLines,checkNoCombat)
for i = 1, #enemiesTable do
local thisUnit = enemiesTable[i]
-- if thisUnit ~= "target" then
local tX, tY = GetObjectPosition(thisUnit)
local tX, tY = GetPositionBetweenObjects(thisUnit, "player", UnitCombatReach(thisUnit)) --GetObjectPosition(thisUnit)
-- end
if tX and tY then
if isInside(tX,tY,nlX,nlY,nrX,nrY,frX,frY) then
Expand Down

0 comments on commit aca4da5

Please sign in to comment.