//Thothie SEP2009_15
//Shock burst with seal
#scope client
{
	//so we can adjust sprite by include
	const SOUND_BURST magic/lightning_strike2.wav
	const SEAL_MODEL weapons/magic/seals.mdl

	precache SEAL_MODEL
	precache SOUND_BURST
}

{ [client] client_activate //<center_point> <radius> <light:0|1> <light_color>

	setvard FX_CENTER PARAM1
	setvard FX_RADIUS PARAM2
	local DO_GLOW PARAM3
	local GLOW_COLOR PARAM4

	if ( DO_GLOW ) cleffect light new FX_CENTER FX_RADIUS GLOW_COLOR 1.0

	callevent 2.0 remove_me
	setvard CYCLE_ANGLE 0
	calleventloop 17 create_beams

	cleffect tempent model SEAL_MODEL FX_CENTER setup_seal

	sound.play3d SOUND_BURST 10 FX_CENTER
}

{ remove_me
	removescript
}

{ create_beams
	local CL_BEAM_START FX_CENTER
	local BEAM_RAD FX_RADIUS
	multiply BEAM_RAD 0.6
	vectoradd CL_BEAM_START $relpos($vec(0,CYCLE_ANGLE,0),$vec(0,BEAM_RAD,0))
	local CL_BEAM_END CL_BEAM_START
	vectoradd CL_BEAM_END z 128
	cleffect beam_points CL_BEAM_START CL_BEAM_END lgtning.spr 1.0 5.0 3.0 200 50 30 (1.0,1.0,0.0)
	add CYCLE_ANGLE 20
}

{ setup_seal


	local MODEL_BODY 28
	if ( FX_RADIUS > 128 ) local MODEL_BODY 29
	if ( FX_RADIUS <= 64 ) local MODEL_BODY 27

	cleffect tempent set_current_prop death_delay 1.0
	cleffect tempent set_current_prop rendermode add
	cleffect tempent set_current_prop framerate 1.0
	cleffect tempent set_current_prop frames 40
	cleffect tempent set_current_prop gravity 0
	cleffect tempent set_current_prop collide none
	cleffect tempent set_current_prop fadeout lifetime
	cleffect tempent set_current_prop body MODEL_BODY
	cleffect tempent set_current_prop sequence 0
}