
spritenoshade FLAME
defineprojectile FLAME PROJ_WORKSLIKE 32770
defineprojectile FLAME PROJ_HITRADIUS 0
defineprojectile FLAME PROJ_EXTRA 0
defineprojectile FLAME PROJ_SPAWNS -1
defineprojectile FLAME PROJ_VEL 600
defineprojectile FLAME PROJ_CLIPDIST 32
defineprojectile FLAME PROJ_XREPEAT 32
defineprojectile FLAME PROJ_YREPEAT 32
defineprojectile FLAME PROJ_CSTAT 128


actor FLAME 0 FRAME_FRAME1 enda

spritenoshade FLAME2
defineprojectile FLAME2 PROJ_WORKSLIKE 32770
defineprojectile FLAME2 PROJ_HITRADIUS 0
defineprojectile FLAME2 PROJ_EXTRA 0
defineprojectile FLAME2 PROJ_VEL 600
defineprojectile FLAME2 PROJ_SPAWNS -1
defineprojectile FLAME2 PROJ_CLIPDIST 32
defineprojectile FLAME2 PROJ_XREPEAT 32
defineprojectile FLAME2 PROJ_YREPEAT 32
defineprojectile FLAME2 PROJ_CSTAT 128

actor FLAME2 0 FLAME2_FRAME1 enda

gamevar WEAPON6_FIREDELAY 3 1
gamevar WEAPON6_SHOOTS FLAME 1
gamevar WEAPON6_INITIALSOUND 0 1
gamevar WEAPON6_FLAGS 65536 1

state qav_initframes6
setvarvar WEAPON6_TOTALTIME qav_maxframes //26
mulvarvar WEAPON6_TOTALTIME qav_tpf //5
divvarvar WEAPON6_TOTALTIME 4
ifvare sprayalt 0 ifvarl player[THISACTOR].kickback_pic 6 setvar WEAPON6_TOTALTIME 4
setvarvar qav_frame player[THISACTOR].kickback_pic
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ifvare player[THISACTOR].kickback_pic 1 ifvare qav_frame 0 setvar qav_frame 1
ends

state qav_initfr2_6
setvarvar WEAPON6_TOTALTIME qav_maxframes
mulvarvar WEAPON6_TOTALTIME qav_tpf
divvarvar WEAPON6_TOTALTIME 4
setvarvar tmp qav_tpf
divvarvar tmp 5
addvarvar WEAPON6_TOTALTIME tmp
setvarvar qav_frame sprayalt
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ends

spritenoshade SPRAYBUNDLE
defineprojectile SPRAYBUNDLE PROJ_WORKSLIKE 6146
defineprojectile SPRAYBUNDLE PROJ_VEL 256
defineprojectile SPRAYBUNDLE PROJ_CSTAT 0
defineprojectile SPRAYBUNDLE PROJ_DROP -368
defineprojectile SPRAYBUNDLE PROJ_XREPEAT 24
defineprojectile SPRAYBUNDLE PROJ_YREPEAT 24
defineprojectile SPRAYBUNDLE PROJ_HITRADIUS 0
defineprojectile SPRAYBUNDLE PROJ_EXTRA 0
defineprojectile SPRAYBUNDLE PROJ_SPAWNS -1
actor SPRAYBUNDLE 0 NO enda

state weaponspraycangame
ifactor SPRAYFLOOR { addvar detonatecount 1 }
ifactor FLAME
{
	getactor[THISACTOR].mdflags  tmp
	orvar  tmp 16
	setactor[THISACTOR].mdflags  tmp
	addvar COUNTER 1
	ifvare COUNTER 2
	{
		setvar COUNTER 0
		ifaction FRAME_FRAME1 action FRAME_FRAME2 else
		ifaction FRAME_FRAME2 action FRAME_FRAME3 else
		ifaction FRAME_FRAME3 action FRAME_FRAME4 else
		ifaction FRAME_FRAME4 action FRAME_FRAME5 else
		ifaction FRAME_FRAME5 action FRAME_FRAME6 else
		ifaction FRAME_FRAME6 action FRAME_FRAME7 else
		ifaction FRAME_FRAME7 action FRAME_FRAME8 else
		ifaction FRAME_FRAME8 killit
	}
	ifinwater killit
}
ifactor FLAME2
{
	getactor[THISACTOR].mdflags  tmp
	orvar  tmp 16
	setactor[THISACTOR].mdflags  tmp
	addvar COUNTER 1
	ifvare COUNTER 2
	{
		setvar COUNTER 0
		ifaction FLAME2_FRAME1 action FLAME2_FRAME2 else
		ifaction FLAME2_FRAME2 action FLAME2_FRAME3 else
		ifaction FLAME2_FRAME3 action FLAME2_FRAME4 else
		ifaction FLAME2_FRAME4 action FLAME2_FRAME5 else
		ifaction FLAME2_FRAME5 action FLAME2_FRAME6 else
		ifaction FLAME2_FRAME6 action FLAME2_FRAME7 else
		ifaction FLAME2_FRAME7 action FLAME2_FRAME8 else
		ifaction FLAME2_FRAME8 action FLAME2_FRAME9 else
		ifaction FLAME2_FRAME9 action FLAME2_FRAME10 else
		ifaction FLAME2_FRAME10 action FLAME2_FRAME11 else
		ifaction FLAME2_FRAME11 killit
	}
	ifinwater killit
}
ifactor SPRAYBUNDLE
{
espawn NAPALMSMOKE
getactor[RETURN].x x
getactor[RETURN].y y
getactor[RETURN].ang ang
setvarvar y2 y
addvar y2 -128
rotatepoint x y x y2 ang x3 y3
setactor[RETURN].x x3
setactor[RETURN].y y3

setactor[RETURN].xrepeat 5
setactor[RETURN].yrepeat 5
}
ends

state weaponspraycankillit
ifactor SPRAYBUNDLE
{
	getactorvar[THISACTOR].detonatetime tmp
	espawn SPRAYFLOOR
	setactorvar[RETURN].detonatetime tmp
	setvar RETURN 0
}
ifactor FLAME
{
	getactor[THISACTOR].htmovflag spriteid
	addvar spriteid 16384
	ifvarl spriteid 16384 ifvarg spriteid -1
	{ 	
			getactor[spriteid].picnum picnum
			switch picnum
				case ZOMBIE
				case POD
				case TENTACLE
				case TCHERNOBOG
				case HERETIC
				case EVILHAND
				case FATRAT
				case BATSLEEP
				case GARGOYLE
				case BAT
				case BUTCHER
				case PHANTASM
				case GILLBEAST
				case HELLDOG
				case SPIDER
				case APLAYER
				case CIVILIAN
				case TNTBARREL
				case BEAST
				case BOSSSPIDER
				getactor[spriteid].extra extra ifvarg extra 0
				{
					getactorvar[spriteid].flamedamage tmp
					addvar tmp 12
					setactorvar[spriteid].flamedamage tmp
				}
				break
				case SPIDERNET
				getactorvar[spriteid].spidernet_damage spidernet_damage ifvare spidernet_damage 0 setactorvar[spriteid].flamedamage 1
				break
			endswitch 
	}
	setvar RETURN 1
	getplayer[THISACTOR].horiz temp
	subvar temp 100
	mulvar temp -6
	getactor[THISACTOR].z z
	
	getactor[THISACTOR].sectnum sect2
	getsector[sect2].floorz z2
	getsector[sect2].ceilingz z3
	ifvarvarg z z2  { setvarvar z z2 subvarvar z 3072 } else addvarvar z temp
	ifvarvarl z z3  { setvarvar z z3 addvarvar z 3072 } else addvarvar z temp
	setactor[THISACTOR].z z
	ifaction FRAME_FRAME8 setvar RETURN 0
}
ifactor FLAME2
{
	getactor[THISACTOR].htmovflag spriteid
	addvar spriteid 16384
	ifvarl spriteid 16384 ifvarg spriteid -1
	{ 	
			getactor[spriteid].picnum picnum
			switch picnum
				case ZOMBIE
				case TCHERNOBOG
				case POD
				case TENTACLE
				case HERETIC
				case EVILHAND
				case FATRAT
				case BATSLEEP
				case BAT
				case BUTCHER
				case PHANTASM
				case GILLBEAST
				case GARGOYLE
				case HELLDOG
				case SPIDER
				case APLAYER
				case CIVILIAN
				case TNTBARREL
				case BEAST
				case BOSSSPIDER
				getactor[spriteid].extra extra ifvarg extra 0
				{
					getactorvar[spriteid].flamedamage tmp
					addvar tmp 12
					setactorvar[spriteid].flamedamage tmp
				}
				break
				case SPIDERNET
				getactorvar[spriteid].spidernet_damage spidernet_damage ifvare spidernet_damage 0 setactorvar[spriteid].flamedamage 1
				break
			endswitch 
	}
	setvar RETURN 1
	getplayer[THISACTOR].horiz temp
	subvar temp 100
	mulvar temp -6
	getactor[THISACTOR].z z
	
	getactor[THISACTOR].sectnum sect2
	getsector[sect2].floorz z2
	getsector[sect2].ceilingz z3
	ifvarvarg z z2  { setvarvar z z2 subvarvar z 3072 } else addvarvar z temp
	ifvarvarl z z3  { setvarvar z z3 addvarvar z 3072 } else addvarvar z temp
	setactor[THISACTOR].z z
	ifaction FLAME2_FRAME11 setvar RETURN 0
}
ends

state spraycanprocessinput
ifvare CURRWEAP 6 
{ 
	ifvare player[THISACTOR].kickback_pic 11 { soundonce TNTTOSS setvar SHOOTSPRAY 1 }
	ifvarg qav_frame 11 ifvare sprayfire 1 ifvarn sprayalt 0 { ifvarand num 4 setvar pressfire 1 else setvar pressfire 0 } 
	ifvare player[THISACTOR].kickback_pic 0 stopsound SPRAYFIR
}
ifvare pressfire 0 ifvarn sprayalt 0 { stopsound SPRAYFIR setplayer[THISACTOR].curr_weapon 6 setplayer[THISACTOR].kickback_pic 6 setvar pressfire -1 setvar sprayalt 0 setvar sprayfire 0 }
ends

state spraystate
ifvarn sprayalt 0
{
	setplayer[THISACTOR].kickback_pic 1
	setplayer[THISACTOR].curr_weapon 6
	setplayer[THISACTOR].weapon_pos 0
	ifvarg qav_frame 5 soundonce SPRAYFIR
	addvar sprayalt 1
	ifvarvarg sprayalt WEAPON6_TOTALTIME setvarvar sprayalt WEAPON6_TOTALTIME
	ifvarg qav_frame 11
	{
		addvar dtime 1
		ifvarvare qav_frame 99
		{
			setplayer[THISACTOR].weapon_pos 20
			palfrom 32 32
			setvar detonateplayer 1
			globalsound EXPLODCM
			stopsound SPRAYFIR
			espawn EXPLOSION3
			getactor[THISACTOR].x x
			getactor[THISACTOR].y y
			getplayer[THISACTOR].ang tmp
			setvarvar x2 x
			addvar x2 512
			rotatepoint x y x2 y tmp x3 y3
			setactor[RETURN].x x3
			setactor[RETURN].y y3
			hitradius 2048 60 100 160 300
			getplayer[THISACTOR].ang ang
			addvar ang 1024
			setactor[THISACTOR].htang ang
			setactor[THISACTOR].htextra 150
			setvarvar k_damage 25
			getplayer[THISACTOR].ammo_amount 6 tmp
			subvar tmp 48
			ifvarl tmp 0 setvar tmp 0
			setplayer[THISACTOR].ammo_amount 6 tmp
			setvar qav_frame 0
			setvar dtime 0
			setvar sprayalt 0
		}
	}
}
ifvare SHOOTSPRAY 1 
{ 
	getprojectile[SPRAYBUNDLE].vel tmp
	mulvar TNTCOUNT 8
	addvarvar tmp TNTCOUNT
	setprojectile[SPRAYBUNDLE].vel tmp

	eshoot SPRAYBUNDLE
	getactor[RETURN].zvel zvel
	mulvar TNTCOUNT -12
	addvarvar zvel TNTCOUNT
	setactor[RETURN].zvel zvel
	getplayer[THISACTOR].ammo_amount 6 tmp
	subvar tmp 48
	ifvarl tmp 0 setvar tmp 0
	setplayer[THISACTOR].ammo_amount 6 tmp
	setvar SHOOTSPRAY 0 
	setvar qav_frame 0
	setvar TNTCOUNT 0
	setvar dtime 0
	setprojectile[SPRAYBUNDLE].vel 256
}

ifvare CURRWEAP 6 ifinwater { setvar dtime 0 setvar TNTCOUNT 0 setplayer[THISACTOR].weapon_pos 20 setvar lighteron 0 setvar LIGHTERENABLE 0 setvar sprayalt 0 setvar sprayfire 0 }
ends

state spraycanaltstate
ifvare CURRWEAP 6
{
	ifvare pressfire -1
	ifvare player[THISACTOR].weapon_pos 0
	ifp palive
	{
		ifvare sprayalt 0
		{
			ifvare player[THISACTOR].kickback_pic 0
			{
				setvar sprayalt 1
			}
		} else
		ifvarg qav_frame 11
		ifvare player[THISACTOR].kickback_pic 1
		{
		setplayer[THISACTOR].kickback_pic 18
		setprojectile[SPRAYBUNDLE].vel 0
		setvar SPRAYFLOORALT 1
		eshoot SPRAYBUNDLE
		setactorvar[RETURN].detonatetime dtime
		getplayer[THISACTOR].ammo_amount 6 tmp
		subvar tmp 48
		ifvarl tmp 0 setvar tmp 0
		setplayer[THISACTOR].ammo_amount 6 tmp
		setvar sprayalt 0
		setvar qav_frame 0
		setvar dtime 0
		setvar pressfire -1
		setprojectile[SPRAYBUNDLE].vel 256
		}
	}
}
ends

state sprayaltfire

setvarvar qav_maxframes 99
setvar qav_tpf 7
state qav_initfr2_6

switch qav_frame
case 0
setvar tilenumweapon 3212
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -50
setvar yweapon -22
setvarvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3207
setvar xweapon 11
setvar yweapon -28
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3220
setvar xweapon -17
setvar yweapon -70
setvarvar qav_sh -48
setvar weapon_zoom 10000
state qav2tc_state
break
case 1
setvar displayfire 1
setvar tilenumweapon 3212
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -50
setvar yweapon -22
setvarvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3182
setvar xweapon 25
setvar yweapon -33
setvarvar qav_sh -24
setvar weapon_zoom 10000
setvar qav_ang 128
state qav2tc_state
setvar tilenumweapon 3221
setvar xweapon -16
setvar yweapon -71
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 2
setvar tilenumweapon 3212
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -50
setvar yweapon -22
setvarvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3219
setvar xweapon -17
setvar yweapon -72
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3182
setvar xweapon 22
setvar yweapon -29
setvarvar qav_sh -20
setvar weapon_zoom 10000
setvar qav_ang 56
state qav2tc_state
case 3
setvar tilenumweapon 3212
ifvare invisible 1 setvar orientationweapon 33 else setvar orientationweapon 0
setvar xweapon -50
setvar yweapon -22
setvarvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3220
setvar xweapon -17
setvar yweapon -71
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3182
setvar xweapon 25
setvar yweapon -28
setvarvar qav_sh -24
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break

case 4
setvar tilenumweapon 3212
setvar orientationweapon 0
setvar xweapon -50
setvar yweapon -22
setvarvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3220
setvar xweapon -17
setvar yweapon -71
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3182
setvar xweapon 25
setvar yweapon -28
setvarvar qav_sh -32
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvarvar tilenumweapon 908
setvar orientationweapon 0
setvar xweapon -17
setvar yweapon -78
setvarvar qav_sh -128
setvar weapon_zoom 3125 //5000
setvar qav_ang 2012
state qav2tc_state
break

case 5
setvar tilenumweapon 3212
setvar orientationweapon 0
setvar xweapon -50
setvar yweapon -22
setvarvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3220
setvar xweapon -17
setvar yweapon -71
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3182
setvar xweapon 25
setvar yweapon -28
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvarvar tilenumweapon 909
setvar orientationweapon 0
setvar xweapon -16
setvar yweapon -82
setvarvar qav_sh -128
setvar weapon_zoom 4375 //7000
setvar qav_ang 1988
state qav2tc_state
break

case 6
setvar tilenumweapon 3212
setvar orientationweapon 0
setvar xweapon -55
setvar yweapon -17
setvarvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3221
setvar xweapon -21
setvar yweapon -67
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3182
setvar xweapon 32
setvar yweapon -24
setvarvar qav_sh -40
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvarvar tilenumweapon 910
setvar orientationweapon 0
setvar xweapon -10
setvar yweapon -81
setvarvar qav_sh -128
setvar weapon_zoom 5000 //8000
setvar qav_ang 1988
state qav2tc_state
break

case 7
setvar tilenumweapon 3212
setvar orientationweapon 0
setvar xweapon -65
setvar yweapon -7
setvarvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3219
setvar xweapon -32
setvar yweapon -57
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3182
setvar xweapon 47
setvar yweapon -14
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvarvar tilenumweapon 911
setvar orientationweapon 0
setvar xweapon 4
setvar yweapon -71
setvarvar qav_sh -128
setvar weapon_zoom 5000 //8000
setvar qav_ang 2008
state qav2tc_state
break

case 8
setvar tilenumweapon 3212
setvar orientationweapon 0
setvar xweapon -76
setvar yweapon 4
setvarvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3220
setvar xweapon -43
setvar yweapon -44
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3182
setvar xweapon 64
setvar yweapon -1
setvarvar qav_sh -40
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvarvar tilenumweapon 912
setvar xweapon 18
setvar yweapon -60
setvarvar qav_sh -128
setvar weapon_zoom 5000 //8000
setvar qav_ang 1944
state qav2tc_state
break

case 9
setvar tilenumweapon 3212
setvar orientationweapon 0
setvar xweapon -88
setvar yweapon 16
setvarvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3221
setvar xweapon -54
setvar yweapon -33
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3182
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvarvar tilenumweapon 913
setvar xweapon 27
setvar yweapon -50
setvarvar qav_sh -128
setvar weapon_zoom 5000 //8000
setvar qav_ang 1988
state qav2tc_state
break

case 10
setvar tilenumweapon 3212
setvar orientationweapon 0
setvar xweapon -103
setvar yweapon 37
setvarvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3219
setvar xweapon -70
setvar yweapon -13
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3182
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -40
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvarvar tilenumweapon 914
setvar xweapon 26
setvar yweapon -50
setvarvar qav_sh -128
setvar weapon_zoom 5000 //8000
setvar qav_ang 1960
state qav2tc_state
break

case 11
setvar tilenumweapon 3182
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 908
setvar xweapon 29
setvar yweapon -54
setvarvar qav_sh -128
setvar weapon_zoom 5625 //9000
setvar qav_ang 1968
state qav2tc_state
break

case 12
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -40
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 909
setvar orientationweapon 16
setvar xweapon 9
setvar yweapon -69
setvarvar qav_sh -128
setvar weapon_zoom 5625 //9000
setvar qav_ang 1880
state qav2tc_state
break

case 13
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon 2
setvar yweapon -71
setvarvar qav_sh -128
setvar weapon_zoom 6250 //A000
setvar qav_ang 1880
state qav2tc_state
break

case 14
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -40
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon 1
setvar yweapon -70
setvarvar qav_sh -128
setvar weapon_zoom 6250 //A000
setvar qav_ang 1880
state qav2tc_state
break
case 15
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon 1
setvar yweapon -68
setvarvar qav_sh -128
setvar weapon_zoom 6250 //A000
setvar qav_ang 1880
state qav2tc_state
break

case 16
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -40
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -4
setvar yweapon -70
setvarvar qav_sh -128
setvar weapon_zoom 6250 //A000
setvar qav_ang 1880
state qav2tc_state
break

case 17
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -3
setvar yweapon -67
setvarvar qav_sh -128
setvar weapon_zoom 6250 //A000
setvar qav_ang 1880
state qav2tc_state
break

case 18
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -40
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -3
setvar yweapon -73
setvarvar qav_sh -128
setvar weapon_zoom 6875 //B000
setvar qav_ang 1880
state qav2tc_state
break

case 19
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 909
setvar orientationweapon 16
setvar xweapon -3
setvar yweapon -71
setvarvar qav_sh -128
setvar weapon_zoom 6875 //B000
setvar qav_ang 1880
state qav2tc_state
break

case 20
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -40
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -3
setvar yweapon -74
setvarvar qav_sh -128
setvar weapon_zoom 6875 //B000
setvar qav_ang 1880
state qav2tc_state
break

case 21
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -7
setvar yweapon -70
setvarvar qav_sh -128
setvar weapon_zoom 6875 //B000
setvar qav_ang 1848
state qav2tc_state
break

case 22
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -8
setvar yweapon -72
setvarvar qav_sh -128
setvar weapon_zoom 6875 //B000
setvar qav_ang 1880
state qav2tc_state
break

case 23
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -8
setvar yweapon -69
setvarvar qav_sh -128
setvar weapon_zoom 6875 //B000
setvar qav_ang 1880
state qav2tc_state
break

case 24
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -4
setvar yweapon -72
setvarvar qav_sh -128
setvar weapon_zoom 6875 //B000
setvar qav_ang 1880
state qav2tc_state
break

case 25
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 909
setvar orientationweapon 16
setvar xweapon -3
setvar yweapon -71
setvarvar qav_sh -128
setvar weapon_zoom 6875 //B000
setvar qav_ang 1880
state qav2tc_state
break
case 26
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -40
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -7
setvar yweapon -78
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break
case 27
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -6
setvar yweapon -77
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break

case 28
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -40
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon -6
setvar yweapon -73
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break

case 29
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -11
setvar yweapon -75
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break

case 30
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -40
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -10
setvar yweapon -74
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break

case 31
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -48
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -8
setvar yweapon -76
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break

case 32
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state


setvarvar tilenumweapon 909
setvar orientationweapon 16
setvar xweapon -7
setvar yweapon -75
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break
case 33
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -5
setvar yweapon -77
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break

case 34
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -5
setvar yweapon -77
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break
case 35
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon -5
setvar yweapon -75
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break
case 36
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -12
setvar yweapon -76
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break
case 37
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -11
setvar yweapon -73
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 1880
state qav2tc_state
break
case 38
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -10
setvar yweapon -80
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
setvar qav_ang 1880
state qav2tc_state
break

case 39
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -7
setvar yweapon -83
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
setvar qav_ang 1880
state qav2tc_state
break

case 40
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -9
setvar yweapon -81
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
setvar qav_ang 1880
state qav2tc_state
break

case 41
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -9
setvar yweapon -81
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
setvar qav_ang 1880
state qav2tc_state
break

case 42
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon -9
setvar yweapon -79
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
setvar qav_ang 1880
state qav2tc_state
break

case 43
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -15
setvar yweapon -80
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
setvar qav_ang 1880
state qav2tc_state
break

case 44
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -14
setvar yweapon -76
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
setvar qav_ang 1880
state qav2tc_state
break
case 45
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -12
setvar yweapon -79
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
setvar qav_ang 1880
state qav2tc_state
break

case 46
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 909
setvar orientationweapon 16
setvar xweapon -11
setvar yweapon -85
setvarvar qav_sh -128
setvar weapon_zoom 8750 //E000
setvar qav_ang 1880
state qav2tc_state
break

case 47
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -11
setvar yweapon -86
setvarvar qav_sh -128
setvar weapon_zoom 8750 //E000
setvar qav_ang 1880
state qav2tc_state
break
case 48
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -11
setvar yweapon -85
setvarvar qav_sh -128
setvar weapon_zoom 8750 //E000
setvar qav_ang 1880
state qav2tc_state
break
case 49
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon -15
setvar yweapon -80
setvarvar qav_sh -128
setvar weapon_zoom 8750 //E000
setvar qav_ang 1880
state qav2tc_state
break
case 50
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -19
setvar yweapon -82
setvarvar qav_sh -128
setvar weapon_zoom 8750 //E000
setvar qav_ang 1880
state qav2tc_state
break

case 51
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -19
setvar yweapon -80
setvarvar qav_sh -128
setvar weapon_zoom 8750 //E000
setvar qav_ang 1880
state qav2tc_state
break
case 52
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -15
setvar yweapon -83
setvarvar qav_sh -128
setvar weapon_zoom 8750 //E000
setvar qav_ang 1880
state qav2tc_state
break
case 53
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 909
setvar orientationweapon 16
setvar xweapon -10
setvar yweapon -82
setvarvar qav_sh -128
setvar weapon_zoom 8750 //E000
setvar qav_ang 1880
state qav2tc_state
break
case 54
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -11
setvar yweapon -83
setvarvar qav_sh -128
setvar weapon_zoom 8750 //E000
setvar qav_ang 1880
state qav2tc_state
break
case 55
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -11
setvar yweapon -83
setvarvar qav_sh -128
setvar weapon_zoom 8750 //E000
setvar qav_ang 1880
state qav2tc_state
break
case 56
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon -15
setvar yweapon -84
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 57
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -23
setvar yweapon -86
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 58
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -21
setvar yweapon -83
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 59
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -87
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 60
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 909
setvar orientationweapon 16
setvar xweapon -14
setvar yweapon -86
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 61
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -14
setvar yweapon -89
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 62
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -16
setvar yweapon -88
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 63
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon -15
setvar yweapon -85
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 64
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -22
setvar yweapon -86
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 65
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -22
setvar yweapon -83
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 66
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -85
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 67
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -14
setvar yweapon -86
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 68
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -14
setvar yweapon -89
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 69
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -14
setvar yweapon -88
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 70
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon -13
setvar yweapon -86
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 71
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -21
setvar yweapon -86
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 72
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -20
setvar yweapon -84
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 73
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -85
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 74
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 909
setvar orientationweapon 16
setvar xweapon -14
setvar yweapon -86
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 75
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -14
setvar yweapon -88
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 76
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -14
setvar yweapon -89
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 77
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon -15
setvar yweapon -84
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 78
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -21
setvar yweapon -86
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 79
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -21
setvar yweapon -84
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 1880
state qav2tc_state
break
case 80
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -22
setvar yweapon -90
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 81
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 909
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -90
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 82
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -92
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 83
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -92
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 84
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -89
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 85
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -28
setvar yweapon -89
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 86
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -26
setvar yweapon -86
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 87
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -21
setvar yweapon -91
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 88
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 909
setvar orientationweapon 16
setvar xweapon -17
setvar yweapon -90
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 89
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -92
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 90
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -19
setvar yweapon -93
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 91
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon -25
setvar yweapon -85
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 92
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -27
setvar yweapon -90
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 93
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 914
setvar orientationweapon 16
setvar xweapon -27
setvar yweapon -87
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 94
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 908
setvar orientationweapon 16
setvar xweapon -21
setvar yweapon -90
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 95
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 909
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -89
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 96
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 910
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -93
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 97
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 911
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -92
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 98
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 912
setvar orientationweapon 16
setvar xweapon -22
setvar yweapon -88
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
case 99
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon 8
setvarvar qav_sh -16
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvarvar tilenumweapon 913
setvar orientationweapon 16
setvar xweapon -26
setvar yweapon -90
setvarvar qav_sh -128
setvar weapon_zoom 10000
setvar qav_ang 1880
state qav2tc_state
break
endswitch
ends

state spraycandisplay
ifvarn sprayalt 0 { state sprayaltfire break }

setvarvar qav_maxframes 26
setvar qav_tpf 5
state qav_initframes6

switch qav_frame
case 0 //CANIDLE.QAV
setvar tilenumweapon 3207
setvar orientationweapon 0
setvar xweapon 11
setvar yweapon -28
setvar qav_sh -16
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 1 //CANFIRE.QAV
case 3
setvar tilenumweapon 3212
setvar orientationweapon 0
setvar xweapon -41
setvar yweapon -25
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3208
setvar orientationweapon 0
setvar xweapon 2
setvar yweapon -29
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
break
case 2
case 4
setvar tilenumweapon 3212
setvar orientationweapon 0
setvar xweapon -41
setvar yweapon -25
setvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3208
setvar orientationweapon 0
setvar xweapon 2
setvar yweapon -29
setvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 5 //CANTHRO.QAV
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 86
setvar yweapon 26
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2167
setvar orientationweapon 4
setvar xweapon 41
setvar yweapon -28
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 7500 //C000
setvar qav_ang 976
state qav2tc_state
break
case 6
setvar tilenumweapon 2168
setvar orientationweapon 4
setvar xweapon 49
setvar yweapon 8
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 8125 //D000
setvar qav_ang 976
state qav2tc_state
break
case 7
setvar tilenumweapon 3225
setvar orientationweapon 0
setvar xweapon 114
setvar yweapon 22
setvar qav_sh -16
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 8
setvar tilenumweapon 3225
setvar orientationweapon 0
setvar xweapon 102
setvar yweapon -2
setvar qav_sh -16
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 9
setvar tilenumweapon 3226
setvar orientationweapon 0
setvar xweapon 92
setvar yweapon -33
setvar qav_sh -16
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 10
setvar tilenumweapon 3226
setvar orientationweapon 0
setvar xweapon 90
setvar yweapon -35
setvar qav_sh -16
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 11
setvar tilenumweapon 3226
setvar orientationweapon 0
setvar xweapon 87
setvar yweapon -2
setvar qav_sh -16
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 12
setvar tilenumweapon 3226
setvar orientationweapon 0
setvar xweapon 92
setvar yweapon 12
setvar qav_sh -16
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 13
setvar tilenumweapon 3225
setvar orientationweapon 0
setvar xweapon 89
setvar yweapon 25
setvar qav_sh -16
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 14
setplayer[THISACTOR].weapon_pos 10
setplayer[THISACTOR].kickback_pic 0
break
case 15 //CANDROP.QAV
setvar tilenumweapon 3182
setvar orientationweapon 0
setvar xweapon 86
setvar yweapon 26
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2167
setvar orientationweapon 4
setvar xweapon 41
setvar yweapon -28
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 7500 //C000
setvar qav_ang 976
state qav2tc_state
break
case 16
setvar tilenumweapon 2168
setvar orientationweapon 4
setvar xweapon 49
setvar yweapon 8
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 8125 //D000
setvar qav_ang 976
state qav2tc_state
break
case 24
setplayer[THISACTOR].weapon_pos 10
setplayer[THISACTOR].kickback_pic 0
break
endswitch
ends

state spraycanfirestate
ifvarn sprayalt 0 { setvar RETURN -1 }
ends

state spraycandofirestate
ifvare CURRWEAP 6
{
	getplayer[THISACTOR].ammo_amount 6 tmp
	ifvare player[THISACTOR].weapon_pos 0
	ifvarg tmp 0
	{
		subvar tmp 1
		setplayer[THISACTOR].ammo_amount 6 tmp
		ifrnd 128 eshoot FLAME else eshoot FLAME2
		soundonce SPRAYFIR
    	getplayer[THISACTOR].ang temp
		randvar tmp 24
		ifrnd 128  addvarvar temp tmp else subvarvar temp tmp
		setactor[RETURN].ang temp
		getactor[RETURN].zvel zvel
		subvar zvel 512
		setvar tmp 0
		randvar tmp 1024
		addvarvar zvel tmp
		setactor[RETURN].zvel zvel
	}
}
ends

state spraycanpressedfire
ifvare CURRWEAP 6
ifp palive
{	
	ifinwater {
		setplayer[THISACTOR].kickback_pic 0
		setvar TNTCOUNT 0
		setvar pressfire -1
	} else
	{
		ifvarg qav_frame 11
		ifvarn sprayalt 0
		{ 
			ifvarl TNTCOUNT 64 { addvar TNTCOUNT 1 }
			setvar sprayfire 1 
		}
	}
}
ends

onevent EVENT_WEAPKEY7
ifvarn CURRWEAP 5 { ifvarn currdinamite 1 { setvar LIGHTERENABLE 0 } }
ifinwater nullop else
{
	ifvarn CURRWEAP 6 
	ifvare player[THISACTOR].kickback_pic 0
	ifvare player[THISACTOR].weapon_pos 0
	ifvarg player[THISACTOR].ammo_amount 6 0
	ifvarg player[THISACTOR].gotweapon 6 0
	{ 
	setvar changeweappos 4
	setplayer[THISACTOR].weapon_pos -1 
	}
}
setvar RETURN -1
endevent