################
# > Beach: A relaxing holographic beach.
# > How to use: Spawn it.
################

@name Beach
@outputs SeaPos:vector A S

interval(10)

A+=2
#models/props_lab/warp_sheet.mdl

if (first()|duped()) {
    Darkness=3
    holoCreate(0)
    holoScale(0, vec(50,50,3))
    holoAng(0, ang(0,0,5))
    holoColor(0, vec(75,75,20)/Darkness)
    holoCreate(1)
    holoScale(1, vec(50,50,3))
    holoPos(1, entity():pos()-vec(0,250,3))
    holoColor(1, vec(100,100,255)/Darkness)
    holoMaterial(1, "models/shadertest/predator")
    SeaPos=holoEntity(1):pos()
    holoCreate(2)
    holoPos(2, entity():pos()+vec(-150,75,0))
    holoModel(2, "models/egypt/palm_tree/palm_tree_big.mdl")
    holoColor(2, vec(255,255,255)/Darkness)
    holoScale(2, vec(0.6,0.6,0.6))
    holoCreate(3)
    holoModel(3, "models/hunter/blocks/cube8x8x8.mdl")
    holoScale(3, vec(-1.6,-2.2,-2))
    holoPos(3, entity():pos()+vec(0,-135,600))
    holoColor(3, vec(255,255,255)/Darkness)
    holoMaterial(3, "models/props_lab/warp_sheet.mdl")
    for (S=0,3) {
        holoEntity(S):soundPlay(100+S,0,"ambient/water/lake_water.wav")
        holoEntity(S):soundPlay(200+S,0,"ambient/wind/wind_med1.wav")
        holoEntity(S):soundPlay(300+S,0,"ambient/water/wave1.wav ")
    }
}
holoPos(1, SeaPos+vec(0,0,sin(A)*3))
