every 20 bytes is 20 bytes saved 
however, thats more like 176 bytes lol
however, thats more like 176 bytes lol
function IsUnitBehindUnit takes unit A, unit B returns boolean
local real a = GetUnitFacing(A)
local real b = GetUnitFacing(B)
return -45<(a-b) and (a-b)<45
endfunction
function IsUnitInFrontOfUnit takes unit A, unit B returns boolean
local real a = GetUnitFacing(A)
local real b = GetUnitFacing(B)
if a > b then
return (a-b-135)<90
endif
return (b-a-135)<90
endfunctionoh, and im sure alot of noobs will be happy
(if they can find the Custom Script tag, that is )
function GetFacingDifferenceOfUnits takes unit A, unit B returns real
local real a = GetUnitFacing(A)
local real b = GetUnitFacing(B)
if a > b then
return a - b
endif
return b - a
endfunction
function IsUnitBehindUnit takes unit A, unit B returns boolean
return GetFacingDifferenceOfUnits(A,B)<45
endfunctionfunction IsUnitBehindUnit takes unit A, unit B returns boolean
local real a = GetUnitFacing(A)
local real b = GetUnitFacing(B)
if a > b then
return (a - b)<45
endif
return (b - a)<45
endfunction