@name Miner Holo Map
@persist M:array V:vector
interval(500)
E=entity()
C=gGetVec("Miner")
if(first()){
    findByModel("models/props_phx/life_support/crylaser_small.mdl")
    M=findToArray()
    V=E:toWorld(vec(0,0,50))
    for(I=1,M:count()){
        holoCreate(I,E:toLocalAxis(((M[I,entity]):pos()-C)/100)+V,vec(0.5,0.5,1),ang(180,0,0))
        holoModel(I,"tetra")
        holoParent(I,E)
        if((M[I,entity]):owner()==owner()){
            holoColor(I,vec(0,0,255))   
        }

    }
    I++
    for(J=I,30){
        holoCreate(J,vec(0,0,0),vec(0.5,0.5,0.5))
        holoMaterial(J,"ce_ls3additional/asteroids/asteroid_large")
        holoModel(J,"sphere")
        holoParent(J,E)   
    }
}
findByClass("sa_roid")
findSortByDistance(C)
A=findToArray()
for(I=1,M:count()){
    holoPos(I,E:toLocalAxis(((M[I,entity]):pos()-C)/100)+V)
}
I++
for(J=I,A:count()+I-1){
    holoPos(J,E:toLocalAxis(((A[J-I+1,entity]):pos()-C)/100)+V)
}
