gamevar WEAPON9_TOTALTIME 18 1
gamevar WEAPON9_FIREDELAY 18 1
gamevar WEAPON9_SHOOTS -1 1
gamevar WEAPON9_INITIALSOUND 0 1

state qav_initfr9_1
setvarvar WEAPON9_TOTALTIME qav_maxframes
mulvarvar WEAPON9_TOTALTIME qav_tpf
divvarvar WEAPON9_TOTALTIME 4
setvarvar qav_frame voodoocount1
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ends

state qav_initfr9_2
setvarvar WEAPON9_TOTALTIME qav_maxframes
mulvarvar WEAPON9_TOTALTIME qav_tpf
divvarvar WEAPON9_TOTALTIME 4
setvarvar qav_frame voodoocount2
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ends

state qav_initfr9_3
setvarvar WEAPON9_TOTALTIME qav_maxframes
mulvarvar WEAPON9_TOTALTIME qav_tpf
divvarvar WEAPON9_TOTALTIME 4
setvarvar qav_frame voodoocount3
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ends

state qav_initfr9_4
setvarvar WEAPON9_TOTALTIME qav_maxframes
mulvarvar WEAPON9_TOTALTIME qav_tpf
divvarvar WEAPON9_TOTALTIME 4
setvarvar qav_frame voodoocount4
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ends

state qav_initfr9_5
setvarvar WEAPON9_TOTALTIME qav_maxframes
mulvarvar WEAPON9_TOTALTIME qav_tpf
divvarvar WEAPON9_TOTALTIME 4
setvarvar qav_frame voodoocount5
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ends

state qav_initfr9_alt
setvarvar WEAPON9_TOTALTIME qav_maxframes
mulvarvar WEAPON9_TOTALTIME qav_tpf
divvarvar WEAPON9_TOTALTIME 4
setvarvar qav_frame voodooalt
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ends

state qav_initfr9_mov
setvarvar WEAPON9_TOTALTIME qav_maxframes
mulvarvar WEAPON9_TOTALTIME qav_tpf
divvarvar WEAPON9_TOTALTIME 4
setvarvar qav_frame voodoomovincs
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ends

state voodoohitstate
soundonce VOOSTAB
getactor[minid].extra extra
ifvarg extra 0
{ 
	ifvarg voodoocount2 0
	{
		ifvare sprite[minid].picnum TCHERNOBOG {
			subvar extra 10 ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
			setactor[minid].extra extra
			setactorvar[minid].voodootouchenemy 1
		} else {
			getplayer[THISACTOR].ammo_amount 9 temp
			ifvarg temp 8
			{
				subvar extra 17 ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
				setactor[minid].extra extra
				setactorvar[minid].voodootouchenemy 1
				ifvare sprite[minid].picnum BEAST subvar temp 1 else subvar temp 8
				setplayer[THISACTOR].ammo_amount 9 temp
			} else 
			ifvarl temp 8
			{
				setvar diffammo 17 // sub health
				divvar diffammo 8 // sub ammo
				mulvarvar temp diffammo // health per 1 ammo
				subvarvar extra temp ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
				setactor[minid].extra extra
				setactorvar[minid].voodootouchenemy 1
				setvar changeweappos 5 setplayer[THISACTOR].weapon_pos -1
				ifvare sprite[minid].picnum BEAST { 
					subvar temp 1
					ifvarg temp 0
						setplayer[THISACTOR].ammo_amount 9 temp
					else setplayer[THISACTOR].ammo_amount 9 0
				}
				else
				setplayer[THISACTOR].ammo_amount 9 0
			}
		}
	} else 
	ifvarg voodoocount3 0
	{
		ifvare sprite[minid].picnum TCHERNOBOG {
				subvar extra 10 ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
				setactor[minid].extra extra
				setactorvar[minid].voodootouchenemy 1
			} else {
			getplayer[THISACTOR].ammo_amount 9 temp
			ifvarg temp 4
			{
				subvar extra 9 ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
				setactor[minid].extra extra
				setactorvar[minid].voodootouchenemy 1
				ifvare sprite[minid].picnum BEAST subvar temp 1 else subvar temp 4
				setplayer[THISACTOR].ammo_amount 9 temp
			} else 
			ifvarl temp 4
			{
				setvar diffammo 9 // sub health
				divvar diffammo 4 // sub ammo
				mulvarvar temp diffammo // health per 1 ammo
				subvarvar extra temp ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
				setactor[minid].extra extra
				setactorvar[minid].voodootouchenemy 1
				setvar changeweappos 5 setplayer[THISACTOR].weapon_pos -1
				ifvare sprite[minid].picnum BEAST { 
					subvar temp 1
					ifvarg temp 0
						setplayer[THISACTOR].ammo_amount 9 temp
					else setplayer[THISACTOR].ammo_amount 9 0
				}
				else
				setplayer[THISACTOR].ammo_amount 9 0
			}
		}
	} else
	ifvarg voodoocount4 0
	{
		ifvare sprite[minid].picnum TCHERNOBOG {
				subvar extra 10 ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
				setactor[minid].extra extra
				setactorvar[minid].voodootouchenemy 1
			} else {
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 5
		{
			subvar extra 11 ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
			setactor[minid].extra extra
			setactorvar[minid].voodootouchenemy 1
			ifvare sprite[minid].picnum BEAST subvar temp 1 else subvar temp 5
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 5
		{
			setvar diffammo 11 // sub health
			divvar diffammo 5 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar extra temp ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
			setactor[minid].extra extra
			setactorvar[minid].voodootouchenemy 1
			setvar changeweappos 5 setplayer[THISACTOR].weapon_pos -1
			ifvare sprite[minid].picnum BEAST { 
					subvar temp 1
					ifvarg temp 0
						setplayer[THISACTOR].ammo_amount 9 temp
					else setplayer[THISACTOR].ammo_amount 9 0
				}
				else
				setplayer[THISACTOR].ammo_amount 9 0
		}
		}
	} else
	ifvarg voodoocount5 0
	{
		ifvare sprite[minid].picnum TCHERNOBOG {
				subvar extra 10 ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
				setactor[minid].extra extra
				setactorvar[minid].voodootouchenemy 1
			} else {
			getplayer[THISACTOR].ammo_amount 9 temp
			ifvarg temp 24
			{
				subvar extra 49 ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
				setactor[minid].extra extra
				setactorvar[minid].voodootouchenemy 1
				ifvare sprite[minid].picnum BEAST subvar temp 1
				else
					subvar temp 24
				setplayer[THISACTOR].ammo_amount 9 temp
			} else 
			ifvarl temp 24
			{
				setvar diffammo 49 // sub health
				divvar diffammo 24 // sub ammo
				mulvarvar temp diffammo // health per 1 ammo
				subvarvar extra temp ifvarl extra 1 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
				setactor[minid].extra extra
				setactorvar[minid].voodootouchenemy 1
				setvar changeweappos 5 setplayer[THISACTOR].weapon_pos -1
				ifvare sprite[minid].picnum BEAST { 
					subvar temp 1
					ifvarg temp 0
						setplayer[THISACTOR].ammo_amount 9 temp
					else setplayer[THISACTOR].ammo_amount 9 0
				}
				else
				setplayer[THISACTOR].ammo_amount 9 0
			}
		}
	}
}
ends

state pvoodoohitstate
getactor[pminid].extra HEALTHAMOUNT
getplayer[THISACTOR].i PLAYERID

ifvarg HEALTHAMOUNT 0
{ 
	ifvarg voodoocount2 0
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 4
		{
			subvar HEALTHAMOUNT 17 ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			subvar temp 4
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 4
		{
			setvar diffammo 17 // sub health
			divvar diffammo 4 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar HEALTHAMOUNT temp ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			setvar changeweappos 5 setplayer[THISACTOR].weapon_pos -1
			setplayer[THISACTOR].ammo_amount 9 0
		}
	} else
	ifvarg voodoocount3 0
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 2
		{
			subvar HEALTHAMOUNT 9 ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			subvar temp 2
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 2
		{
			setvar diffammo 9 // sub health
			divvar diffammo 2 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar HEALTHAMOUNT temp ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			setvar changeweappos 5 setplayer[THISACTOR].weapon_pos -1
			setplayer[THISACTOR].ammo_amount 9 0
		}
	} else
	ifvarg voodoocount4 0 //EYE
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 2
		{
			setactorvar[pminid].voodoohitenemy 2
			subvar HEALTHAMOUNT 11 ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			subvar temp 2
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 2
		{
			setactorvar[pminid].voodoohitenemy 2
			setvar diffammo 11 // sub health
			divvar diffammo 2 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar HEALTHAMOUNT temp ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			setvar changeweappos 5 setplayer[THISACTOR].weapon_pos -1
			setplayer[THISACTOR].ammo_amount 9 0
		}
	} else
	ifvarg voodoocount5 0
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 12
		{
			subvar HEALTHAMOUNT 49 ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			subvar temp 12
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 12
		{
			setvar diffammo 49 // sub health
			divvar diffammo 12 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar HEALTHAMOUNT temp ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			setvar changeweappos 5 setplayer[THISACTOR].weapon_pos -1
			setplayer[THISACTOR].ammo_amount 9 0
		}
	}
}
ends

state voodooaltstate
ifvare CURRWEAP 9
{
	ifvare voodooalt 0
	ifvare player[THISACTOR].weapon_pos 0
	ifp palive
	{
		getplayer[THISACTOR].kickback_pic temp
		ifvare temp 0
		{
			getplayer[THISACTOR].ammo_amount 9 tmp
			ifvarg tmp 0 { setvar voodooalt 1 }
		}
	}
}
ends

state voodoohitdisplay

setvarvar qav_maxframes 13
setvar qav_tpf 5
state qav_initfr9_1

switch qav_frame
case 1
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 2
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -15
setvar yweapon -28
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 125
setvar yweapon -45
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 3
case 4
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -7
setvar yweapon -38
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 70
setvar yweapon -25
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 725
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 1
setvar yweapon -39
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 5
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -7
setvar yweapon -38
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 70
setvar yweapon -25
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 726
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 1
setvar yweapon -36
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 6
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -9
setvar yweapon -34
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 68
setvar yweapon -21
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 726
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 2
setvar yweapon -36
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 7
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -12
setvar yweapon -32
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 71
setvar yweapon -23
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 727
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 2
setvar yweapon -32
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 8
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -18
setvar yweapon -33
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 80
setvar yweapon -31
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 727
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 2
setvar yweapon -33
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 9
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -31
setvar yweapon -29
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 113
setvar yweapon -40
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 728
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 3
setvar yweapon -33
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 10
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -37
setvar yweapon -27
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 143
setvar yweapon -40
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 729
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 2
setvar yweapon -35
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 11
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -36
setvar yweapon -16
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 155
setvar yweapon -42
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 12
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
endswitch
ends

state voodoohit2display
setvarvar qav_maxframes 13
setvar qav_tpf 5
state qav_initfr9_2

switch qav_frame
case 1
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 2
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -15
setvar yweapon -26
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 125
setvar yweapon -47
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 3
case 4
case 5
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -7
setvar yweapon -34
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2441
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 5
setvar yweapon -58
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 70
setvar yweapon -33
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 6
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -9
setvar yweapon -32
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2441
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 3
setvar yweapon -56
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 68
setvar yweapon -31
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 7
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -10
setvar yweapon -31
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2441
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 2
setvar yweapon -55
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 67
setvar yweapon -30
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 8
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -11
setvar yweapon -30
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 76
setvar yweapon -35
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2441
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 1
setvar yweapon -54
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 9
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -16
setvar yweapon -21
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 113
setvar yweapon -40
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 10
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -23
setvar yweapon -15
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 143
setvar yweapon -40
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 11
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -27
setvar yweapon -13
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 155
setvar yweapon -42
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 12
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
endswitch
ends

state voodoohit3display
setvarvar qav_maxframes 13
setvar qav_tpf 5
state qav_initfr9_3

switch qav_frame
case 1
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 2
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -15
setvar yweapon -26
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 125
setvar yweapon -52
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 3
case 4
case 5
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -7
setvar yweapon -34
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2441
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 10
setvar yweapon -67
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 76
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 6
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -9
setvar yweapon -32
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2441
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 8
setvar yweapon -65
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 74
setvar yweapon -41
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 7
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -10
setvar yweapon -31
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2441
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 7
setvar yweapon -64
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 73
setvar yweapon -40
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 8
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -11
setvar yweapon -30
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 77
setvar yweapon -42
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2441
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 6
setvar yweapon -63
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 9
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -16
setvar yweapon -21
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 113
setvar yweapon -40
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 10
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -23
setvar yweapon -15
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 143
setvar yweapon -40
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 11
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -27
setvar yweapon -13
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 155
setvar yweapon -42
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 12
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
endswitch
ends

state voodoohit4display
setvarvar qav_maxframes 18
setvar qav_tpf 5
state qav_initfr9_4

switch qav_frame
case 1
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 158
setvar yweapon -49
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 2
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -15
setvar yweapon -15
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 125
setvar yweapon -54
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 3
case 4
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 7
setvar yweapon -10
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 64
setvar yweapon -36
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 5
case 6
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 3
setvar yweapon -9
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 58
setvar yweapon -34
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 7
case 8
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 2
setvar yweapon -7
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 54
setvar yweapon -31
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 9
case 10
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 1
setvar yweapon -5
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 53
setvar yweapon -29
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 11
case 12
case 13
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 0
setvar yweapon -4
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 52
setvar yweapon -28
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 14
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -4
setvar yweapon -2
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 83
setvar yweapon -46
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 15
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -6
setvar yweapon 0
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 132
setvar yweapon -52
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 16
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -16
setvar yweapon -2
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 155
setvar yweapon -46
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 17
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
endswitch
ends

state voodoohit5display
setvarvar qav_maxframes 27
setvar qav_tpf 5
state qav_initfr9_5

switch qav_frame
case 1
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 2
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -15
setvar yweapon -28
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 125
setvar yweapon -38
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 3
case 4
case 5
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -12
setvar yweapon -38
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 74
setvar yweapon -8
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 6
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -16
setvar yweapon -35
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 70
setvar yweapon -5
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 7
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -18
setvar yweapon -33
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 68
setvar yweapon -3
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 8
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -19
setvar yweapon -30
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 67
setvar yweapon 0
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 9
case 10
case 11
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -17
setvar yweapon -30
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 71
setvar yweapon -1
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 12
case 13
case 14
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -19
setvar yweapon -30
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 67
setvar yweapon 0
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 15
case 16
case 17
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -17
setvar yweapon -30
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 71
setvar yweapon -1
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 18
case 19
case 20
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -19
setvar yweapon -30
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 67
setvar yweapon 0
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 21
case 22
case 23
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -15
setvar yweapon -30
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 73
setvar yweapon -1
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 24
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -22
setvar yweapon -28
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 113
setvar yweapon -20
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 25
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -24
setvar yweapon -19
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 143
setvar yweapon -31
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 26
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -26
setvar yweapon -16
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 155
setvar yweapon -37
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 27
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
endswitch
ends

state voodooaltdisplay 
setvarvar qav_maxframes 13
setvar qav_tpf 10
state qav_initfr9_alt

switch qav_frame
case 0
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 1
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -15
setvar yweapon -26
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 149
setvar yweapon -13
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 2
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -7
setvar yweapon -34
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 114
setvar yweapon 15
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 3
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -7
setvar yweapon -34
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3165
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 55
setvar yweapon 12
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1844
state qav2tc_state
break
case 4
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -7
setvar yweapon -34
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3165
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -13
setvar yweapon 4
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1920
state qav2tc_state
break
case 5
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -9
setvar yweapon -32
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3165
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -25
setvar yweapon -12
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1920
state qav2tc_state
break
case 6
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -10
setvar yweapon -31
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3149
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -3
setvar yweapon -34
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 2000
state qav2tc_state
break
case 7
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -11
setvar yweapon -30
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3149
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 43
setvar yweapon -55
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 2004
state qav2tc_state
break
case 8
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -16
setvar yweapon -21
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3149
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 88
setvar yweapon -64
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 9
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -23
setvar yweapon -15
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3149
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 137
setvar yweapon -57
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 48
state qav2tc_state
break
case 10
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -27
setvar yweapon -13
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3149
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 191
setvar yweapon -31
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 24
state qav2tc_state
break
case 11
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 197
setvar yweapon -8
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 12
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 178
setvar yweapon -21
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 13
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
endswitch
ends

state voodoomovedisplay
setvarvar qav_maxframes 12
setvar qav_tpf 5
state qav_initfr9_mov

switch qav_frame
case 0
case 1
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 2
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -28
setvar yweapon -13
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 158
setvar yweapon -47
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 3
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -26
setvar yweapon -14
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 158
setvar yweapon -47
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 4
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -28
setvar yweapon -13
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 154
setvar yweapon -45
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 5
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -26
setvar yweapon -12
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 154
setvar yweapon -45
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 6
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -24
setvar yweapon -10
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 151
setvar yweapon -39
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 7
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -26
setvar yweapon -12
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 151
setvar yweapon -39
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 8
setvar tilenumweapon 2439
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -13
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 154
setvar yweapon -42
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 9
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -34
setvar yweapon -15
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 159
setvar yweapon -44
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 10
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -35
setvar yweapon -14
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 159
setvar yweapon -44
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 11
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -33
setvar yweapon -13
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 160
setvar yweapon -44
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 12
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -31
setvar yweapon -12
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
endswitch
ends

state voodoodisplay
ifvarn voodoocount1 0 { state voodoohitdisplay break }
ifvarn voodoocount2 0 { state voodoohit2display break }
ifvarn voodoocount3 0 { state voodoohit3display break }
ifvarn voodoocount4 0 { state voodoohit4display break }
ifvarn voodoocount5 0 { state voodoohit5display break }
ifvarn voodooalt 0 { state voodooaltdisplay break }
ifvarn voodoomovincs 0 { state voodoomovedisplay break }

setvarvar qav_maxframes 12
setvar qav_tpf 5
state qav_initfr9_1
switch qav_frame
case 0
setvar tilenumweapon 2438
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -30
setvar yweapon -11
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2440
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon 163
setvar yweapon -43
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
endswitch
ends

state voodoofirestate
ifvare CURRWEAP 9
{
	getplayer[THISACTOR].ammo_amount 9 tmp
	setvar RETURN -1
	ifvarg tmp 0
	{
		ifvare voodoohit 0 ifvare voodooalt 0 ifvare voodoocount1 0 ifvare voodoocount2 0 ifvare voodoocount3 0 ifvare voodoocount4 0 ifvare voodoocount5 0 { setvar voodoocount1 1 }
		ifvare voodoohit 1 ifvare voodooalt 0 ifvare voodoocount1 0 ifvare voodoocount2 0 ifvare voodoocount3 0 ifvare voodoocount4 0 ifvare voodoocount5 0 { ifrnd 80 setvar voodoocount2 1 else ifrnd 80 setvar voodoocount3 1 else ifrnd 48 setvar voodoocount4 1 else ifrnd 47 setvar voodoocount5 1 } 
	} else ifvare voodooalt 0 ifvare voodoocount1 0 ifvare voodoocount2 0 ifvare voodoocount3 0 ifvare voodoocount4 0 ifvare voodoocount5 0 { setvar changeweappos 5	setplayer[THISACTOR].weapon_pos 10 setvar voodooalt 0 }
}
ends

state voodooplayerstate
	randvar voodooprobability 40
	getuserdef[THISACTOR].multimode m_playernumber

	setvar sectorid 0
	setvar minimum 16777216
	setvar minid -1
	whilevarvarn sectorid NUMSECTORS 
	{
		headspritesect spriteid sectorid
		whilevarn spriteid -1 
		{
			getactor[spriteid].picnum picnum
			switch picnum
			case ZOMBIE
			case HERETIC
			case SPIDER
			case BOSSSPIDER
			case BUTCHER
			case GILLBEAST
			case FATRAT
			case EVILHAND
			case FISH
			case HELLDOG
			case BAT
			case BATSLEEP
			case GARGOYLE
			case CIVILIAN
			case TCHERNOBOG
			case BEAST
			case TENTACLE
			case POD
			{
				getactor[spriteid].x mx
				getactor[spriteid].y my
				getactor[spriteid].z mz
				getactor[spriteid].extra extra
				getactor[THISACTOR].x x
				getactor[THISACTOR].y y
				getactor[THISACTOR].z z
				subvarvar mx x
				subvarvar my y
				getangle mang mx my
				getactor[THISACTOR].ang ang
				getincangle mang mang ang
				ifvarg extra 0
				ifvarg mang -256 ifvarl mang 256
				{
					dist temp THISACTOR spriteid
					ifvarvarl temp minimum { setvarvar minimum temp }
					ifvarvare temp minimum ifvarvarn spriteid THISACTOR 
					{ setvarvar minid spriteid }
				}
			}
			break
			endswitch
			nextspritesect spriteid spriteid
		}
		addvar sectorid 1
	}

	setvar temp 0
	setvar pminimum 16777216
	setvar pminid -1
	getplayer[THISACTOR].i r0
	whilevarvarn temp m_playernumber
	{
		getplayer[temp].i pid
		ifvarvarn pid r0 { setvarvar peractor2 temp }
		getplayer[peractor2].i pid
		getactor[pid].x px
		getactor[pid].y py
		getactor[pid].z pz
		getactor[pid].extra HEALTHAMOUNT
		getactor[THISACTOR].x x
		getactor[THISACTOR].y y
		getactor[THISACTOR].z z
		subvarvar px x
		subvarvar py y
		getangle pang px py
		getactor[THISACTOR].ang ang
		getincangle pang pang ang
		ifvarg HEALTHAMOUNT 0
		ifvarg pang -256 ifvarl pang 256
		{
			dist xydist THISACTOR pid
			ifvarvarl xydist minimum { setvarvar minimum xydist }
			ifvarvare xydist minimum ifvarvarn pid r0 { setvarvar pminid pid }
		}
		addvar temp 1
	}
	
	ifvarn pminid -1
	{
		getactor[pminid].x px
		getactor[pminid].y py
		getactor[pminid].z pz
		getactor[pminid].sectnum sect2
		getactor[THISACTOR].x x
		getactor[THISACTOR].y y
		getactor[THISACTOR].z z
		getactor[THISACTOR].sectnum sect1
		subvar pz 8192

		ifvarn sect2 -1 ifvarn sect2 4096 { cansee x y z sect1 px py pz sect2 psee } else setvar psee 0
		ifvare psee 1
		{
			getactor[pminid].extra HEALTHAMOUNT
			ifvarg HEALTHAMOUNT 0 { setvar voodoohit 1 }
			
			ifvare voodoocount2 3 { ifvarg HEALTHAMOUNT 0 { state pvoodoohitstate } else setvar voodoohit 0 }
			ifvare voodoocount3 3 { ifvarg HEALTHAMOUNT 0 { state pvoodoohitstate } else setvar voodoohit 0 }
			ifvare voodoocount4 3 { ifvarg HEALTHAMOUNT 0 { state pvoodoohitstate } else setvar voodoohit 0 }
			ifvare voodoocount5 3 { ifvarg HEALTHAMOUNT 0 { state pvoodoohitstate } else setvar voodoohit 0 }
		} else setvar voodoohit 0
	} else
	ifvarn minid -1
	{	
		getactor[minid].x mx
		getactor[minid].y my
		getactor[minid].z mz
		getactor[minid].sectnum sect2
		getplayer[THISACTOR].posx px
		getplayer[THISACTOR].posy py
		getplayer[THISACTOR].posz pz
		getplayer[THISACTOR].cursectnum sect1
		subvar mz 8192

		ifvarn sect1 -1 ifvarn sect1 4096 ifvarn sect2 -1 ifvarn sect2 4096 { cansee px py pz sect1 mx my mz sect2 see } else setvar see 0
		ifvare sprite[minid].picnum ZOMBIE ifvare actorvar[minid].zombie_lay 1 setvar see 0
		
		ifvare see 1
		{
			getactor[minid].extra extra
			ifvarg extra 0 { setvar voodoohit 1 }
			ifvare voodoocount2 3 { ifvarg extra 0 { state voodoohitstate } else setvar voodoohit 0 }
			ifvare voodoocount3 3 { ifvarg extra 0 { state voodoohitstate } else setvar voodoohit 0 }
			ifvare voodoocount4 3 { ifvarg extra 0 { state voodoohitstate } else setvar voodoohit 0 }
			ifvare voodoocount5 3 { ifvarg extra 0 { state voodoohitstate } else setvar voodoohit 0 }
		} else setvar voodoohit 0

	} else setvar voodoohit 0

	ifvare voodoohit 0
	ifvare voodoocount1 3
	{
			getactor[THISACTOR].extra temp
			subvar temp 1
			setactor[THISACTOR].extra temp
			ifrnd 96 sound PLAY1106 else ifrnd 96 sound PLAY1107 else sound PLAY1108
			soundonce VOOSTAB
	} 

ifvarn voodoocount1 0
{
	addvar voodoocount1 1
	ifvarvarg voodoocount1 WEAPON9_TOTALTIME setvar voodoocount1 0
}	
ifvarn voodoocount2 0
{
	addvar voodoocount2 1
	ifvarvarg voodoocount2 WEAPON9_TOTALTIME setvar voodoocount2 0
}	
ifvarn voodoocount3 0
{
	addvar voodoocount3 1
	ifvarvarg voodoocount3 WEAPON9_TOTALTIME setvar voodoocount3 0
}	
ifvarn voodoocount4 0
{
	addvar voodoocount4 1
	ifvarvarg voodoocount4 WEAPON9_TOTALTIME setvar voodoocount4 0
}
ifvarn voodoocount5 0
{
	addvar voodoocount5 1
	ifvarvarg voodoocount5 WEAPON9_TOTALTIME setvar voodoocount5 0
}	
ifvarn voodoomovincs 0
{
	addvar voodoomovincs 1
	ifvarvarg voodoomovincs WEAPON9_TOTALTIME setvar voodoomovincs 0
}

ifvarn voodooalt 0
ifvare voodoocount1 0 
ifvare voodoocount2 0 
ifvare voodoocount3 0 
ifvare voodoocount4 0 
ifvare voodoocount5 0
{
	setplayer[THISACTOR].curr_weapon 9
	setplayer[THISACTOR].weapon_pos 0

	ifvare voodooalt 20 
	{
		ifvarn pminid -1
		{
			getactor[pminid].extra HEALTHAMOUNT
			ifvarg HEALTHAMOUNT 0
			{ 
				getplayer[THISACTOR].ammo_amount 9 temp
				ifvare psee 1
				{
					mulvar temp 2
					subvarvar HEALTHAMOUNT temp ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].playerdrunk 150 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
				}
			}
		} else
		ifvarn minid -1
		{
			getactor[minid].extra extra
			ifvarg extra 0
			{ 
				ifvare see 1
				{
					getplayer[THISACTOR].ammo_amount 9 temp
					mulvar temp 2
					subvarvar extra temp 
					setactor[minid].extra extra
					ifvarl extra 0 { setvar extra 0 setactorvar[minid].voodoohitenemy 1 }
				}
			}
		}
		soundonce VOOCHANT 
		setplayer[THISACTOR].ammo_amount 9 0
	}
	
	addvar voodooalt 1
	ifvarvarg voodooalt WEAPON9_TOTALTIME { setvar changeweappos 5
	setplayer[THISACTOR].weapon_pos -1 setvar voodooalt 0 }
}	

getactorvar[THISACTOR].voodoohitenemy temp
ifvare temp 1 
{ 
	setactor[THISACTOR].extra -1 
	action PTHROWNBACK 
	setactorvar[THISACTOR].voodoohitenemy 0 
}
getactorvar[THISACTOR].voodoohitenemy temp
ifvare temp 2
{
	palfrom 64 0 0 0
	setactorvar[THISACTOR].voodoohitenemy 0 
}
ends