@name Path
@model models/hunter/blocks/cube05x05x025.mdl
@outputs [EP Tar TP]:vector RXp RXn RYp RYn RZp RZn 
@outputs DistX DistY DistZ WalkX WalkY WalkZ Ops
@persist [E O ]:entity Find Walk Dir
@persist

interval(100)
if(first()){
    E=entity() EP=E:pos() E:setAng(ang(0,0,0))
    O=owner()
    Walk=50
}########
if(O:keyReload()){
    AP=E:toLocal(O:aimPos())
    Tar=AP+EP
    TP=EP
    DistX=AP:x() WalkX=floor(DistX/Walk)
    DistY=AP:y() WalkY=floor(DistY/Walk)
    DistZ=AP:z() WalkZ=floor(DistZ/Walk)
    holoCreate(100,EP+vec(DistX,0,0)) holoColor(100,vec(0,0,255))
    holoCreate(200,EP+vec(DistX,DistY,0)) holoColor(200,vec(0,255,0))
    holoCreate(300,EP+vec(DistX,DistY,DistZ)) holoColor(300,vec(255,0,0))
    Dir=1
    Find=1
    
        for(X=1,abs(WalkX)){
        holoCreate(100+X,EP+E:forward()*Walk*X*(WalkX>0?1 :-1))
        holoColor(100+X,vec(0,0,255))
        }
        for(Y=1,abs(WalkY)){
        holoCreate(200+Y,EP+DistX*E:forward()+E:right()*Walk*Y*(WalkY>0?-1 :1))
        holoColor(200+Y,vec(0,255,0))
        }
        for(Z=1,abs(WalkZ)){
        holoCreate(300+Z,EP+E:forward()*DistX-E:right()*DistY+E:up()*Walk*Z*(WalkZ>0?1 :-1))
        holoColor(300+Z,vec(255,0,0))
        }
}########
    
if(Find){
    RXp=rangerOffset(Walk,TP,E:forward()):hit()
    RXn=rangerOffset(Walk,TP,-E:forward()):hit()
    RYp=rangerOffset(Walk,TP,E:right()):hit()
    RYn=rangerOffset(Walk,TP,-E:right()):hit()
    RZp=rangerOffset(Walk,TP,E:up()):hit()
    RZn=rangerOffset(Walk,TP,-E:up()):hit()
    

###
    


    
}########

Ops=ops()
    
    
    
    
    
    
    
    
    
