@name AlignGrid
@persist CurEnt Things:array
if (first()) {
    findByClass("prop_physics")
    Things=array()
    All=findToArray()
    for (I=1, All:count()) {
        local V=All[I,entity]
        if (V:owner()==owner()) {
            Things[Things:count()+1,entity]=V
        }
    }
    timer("Align",100)
} elseif (clk("Align")) {
    CurEnt++
    if (Things[CurEnt,entity]) {
        local V=Things[CurEnt,entity]
        local Pos=V:pos()
        local Align=vec(round(Pos:x()),round(Pos:y()),round(Pos:z()))
        V:setPos(Align)
        print(V,CurEnt,Things:count())
        timer("Align",100)
    }
}
