@name SPERMDAR
@inputs X:wirelink
@persist A:array C I
interval(1)
timer("A",1000)
timer("B",100)
V = vec()

if( clk("A") )
{
    findIncludeClass("player")
    findIncludeClass("npc*")
    findInSphere(V,15000)
    findSortByDistance(V)
    A = findToArray()
    C = A:count()+1
}

I=1
K=4
X:egpCircle(1,vec2(),vec2(512,512),vec4(0,255,0,255))
X:egpCircle(2,vec2(6,6),vec2(500,500),vec4(0,0,0,255))
while(I<C)
{
    P = A[I,entity]
    Pos = (P:pos() - V) / 30
    Pos2 = vec2( Pos:x() , Pos:y() ) / 2
    Pos2 = Pos2 + vec2( 253 , 253 )
    X:egpCircle(K,Pos2,vec2(6,6),teamColor(P:team()),50)
    
    Pos3 = -vec2( P:eye():x() , P:eye():y() ) * 10
    Pos3 = Pos3 + Pos2
    X:egpLine(K+1,Pos2 + vec2(3,3) , Pos3 + vec2(3,3),teamColor(P:team()),10)
    I++
    K+=2
}

X:egpDraw()
X:egpClear()