
gamevar WEAPON3_SHOOTS -1 1
gamevar WEAPON3_FLAGS 4 1
gamevar WEAPON3_FIRESOUND -1 1

state qav_initframes3
setvarvar WEAPON3_TOTALTIME qav_maxframes
mulvarvar WEAPON3_TOTALTIME qav_tpf
divvarvar WEAPON3_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 akimbo_xcoord3
ifvarn tmakimbo 0 ifvarn tmakimbo 1
	{
		setvarvar temp tmakimbo
		ifvarl tmakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
ends

state akimbo_ycoord3
ifvarn tmakimbo 0 ifvarn tmakimbo 1
	{
		setvarvar temp tmakimbo
		ifvarl tmakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
ends

state qav_initfr_scpred3
setvarvar WEAPON3_TOTALTIME qav_maxframes
mulvarvar WEAPON3_TOTALTIME qav_tpf
divvarvar WEAPON3_TOTALTIME 4
setvarvar tmp qav_tpf
divvarvar tmp 5
addvarvar WEAPON3_TOTALTIME tmp
setvarvar qav_frame tommysweep
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ends

state qav_initfr_altscpred3
setvarvar WEAPON3_TOTALTIME qav_maxframes
mulvarvar WEAPON3_TOTALTIME qav_tpf
divvarvar WEAPON3_TOTALTIME 4
setvarvar tmp qav_tpf
divvarvar tmp 5
addvarvar WEAPON3_TOTALTIME tmp
setvarvar qav_frame akimbotommysweep
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ends

defineprojectile NEWSHELL PROJ_WORKSLIKE 6278
defineprojectile NEWSHELL PROJ_EXTRA 0
defineprojectile NEWSHELL PROJ_HITRADIUS 0
defineprojectile NEWSHELL PROJ_VEL 24
defineprojectile NEWSHELL PROJ_SPAWNS FLOORSHEEL
defineprojectile NEWSHELL PROJ_DROP -256
defineprojectile NEWSHELL PROJ_BOUNCES 2
defineprojectile NEWSHELL PROJ_BSOUND SHTSHL
defineprojectile NEWSHELL PROJ_CLIPDIST 16
defineprojectile NEWSHELL PROJ_XREPEAT 4
defineprojectile NEWSHELL PROJ_YREPEAT 4
actor NEWSHELL 0 FRAME_FRAME1 enda

defineprojectile TOMMYFIRST PROJ_WORKSLIKE 4097
defineprojectile TOMMYFIRST PROJ_SPAWNS -1
defineprojectile TOMMYFIRST PROJ_DECAL -1
defineprojectile TOMMYFIRST PROJ_EXTRA 12
defineprojectile TOMMYFIRST PROJ_XREPEAT 3
defineprojectile TOMMYFIRST PROJ_YREPEAT 3

defineprojectile ALTTOMMY PROJ_WORKSLIKE 4097
defineprojectile ALTTOMMY PROJ_SPAWNS -1
defineprojectile ALTTOMMY PROJ_DECAL -1
defineprojectile ALTTOMMY PROJ_EXTRA 12
defineprojectile ALTTOMMY PROJ_XREPEAT 3
defineprojectile ALTTOMMY PROJ_YREPEAT 3

state tommygundisplayroom
ifvare CURRWEAP 3 
{ 
	getplayer[THISACTOR].kickback_pic tmp
	ifvarand tmp 1 { addvar camerahoriz 1 }
	ifvarand tommysweep 1 { addvar camerahoriz 1 }
}
ends

state akimbotommyshellstate

	randvar zdist -256
	subvar zdist 866
	ezshootvar zdist NEWSHELL
		
	getplayer[THISACTOR].ang ang
	addvar ang 512
	randvar tmp 256
	addvarvar ang tmp
	setactor[RETURN].ang ang
	setactor[RETURN].xoffset xoffset
	getplayer[THISACTOR].horiz tmp
	subvar tmp 100
	mulvar tmp 3
	divvar tmp 5
	getactor[RETURN].yoffset yoffset
	setvarvar yoffset tmp
	setactor[RETURN].yoffset yoffset
	
	getactor[THISACTOR].x x
	getactor[THISACTOR].y y
	getplayer[THISACTOR].ang tmp
	setvarvar x2 x
	addvar x2 128
	rotatepoint x y x2 y tmp x3 y3
	setactor[RETURN].x x3
	setactor[RETURN].y y3
	getprojectile[NEWSHELL].vel tmp
	randvar tmp 64 ifvarl tmp 24 { setvar tmp 24 }
	setprojectile[NEWSHELL].vel tmp
	
ends

state tommyshellstate

	ifvare tommysweep 0
	{
		randvar zdist -256
		subvar zdist 866
		ezshootvar zdist NEWSHELL
		setvarvar tommy_return RETURN
		
		getplayer[THISACTOR].ang ang
		subvar ang 512
		randvar tmp 256
		addvarvar ang tmp
		setactor[tommy_return].ang ang
	} 
	else ifvare tommyfire_count 1
	{
		randvar zdist -512
		subvar zdist 1024
		ezshootvar zdist NEWSHELL
		setvarvar tommy_return RETURN
		getplayer[THISACTOR].ang ang
		subvar ang 768
		randvar tmp 1536
		addvarvar ang tmp
		setactor[tommy_return].ang ang
	}
	ifvarg tommy_return -1
	{
		setactor[tommy_return].xoffset xoffset
		getplayer[THISACTOR].horiz tmp
		subvar tmp 100
		mulvar tmp 3
		divvar tmp 5
		getactor[tommy_return].yoffset yoffset
		setvarvar yoffset tmp
		ifvarn tommysweep 0 { addvar yoffset 15 }
		setactor[tommy_return].yoffset yoffset
		
		getactor[THISACTOR].x x
		getactor[THISACTOR].y y
		getplayer[THISACTOR].ang tmp
		setvarvar x2 x
		addvar x2 128
		rotatepoint x y x2 y tmp x3 y3
		setactor[tommy_return].x x3
		setactor[tommy_return].y y3
		getprojectile[NEWSHELL].vel tmp
		ifvarn tommysweep 0 { randvar tmp 24 ifvarl tmp 8 { setvar tmp 8 } } 
		else { randvar tmp 64 ifvarl tmp 24 { setvar tmp 24 } }
		setprojectile[NEWSHELL].vel tmp
		setvar tommy_return -1
	}
	
ends

state tommyfire
setvarvar tommyfire_var qav_tpf
divvarvar tommyfire_var 4
setvarvar tommyfire_count tommysweep
modvarvar tommyfire_count tommyfire_var

getplayer[THISACTOR].ammo_amount 3 tmp
ifvarg tmp 0
ifvare tommyfire_count 1
{
	sound TOM
	shoot ALTTOMMY
	flash
	subvar tmp 1
	setplayer[THISACTOR].ammo_amount 3 tmp
}
ends

state tommygunprocessinput

ifvare CURRWEAP 3 
{ 
	ifvarand num 4 
	ifvare tommysweep 0
	ifvare akimbotommysweep 0
	ifvare player[THISACTOR].weapon_pos 0
	ifp palive
	{ 
		setvarvar tommyfire_var qav_tpf
		divvarvar tommyfire_var 4
		setvarvar tommyfire_count player[THISACTOR].kickback_pic
		modvarvar tommyfire_count tommyfire_var
		
		ifvare tommyfire_count 1
		{
			getplayer[THISACTOR].ammo_amount 3 tmp
			ifvarg tmp 0
		    {
				ifvare tmakimbo 1
				{ setvar xoffset -70 state akimbotommyshellstate } else ifvare tmakimbo 0 { setvar xoffset -25 state tommyshellstate }
			}
		}
	}
	else setplayer[THISACTOR].kickback_pic 0 
}
ends

state tommygunaltstate
ifvare CURRWEAP 3
{
	ifvare tommysweep 0
	ifvare akimbotommysweep 0
	ifvare player[THISACTOR].weapon_pos 0
	ifp palive
	{
		getplayer[THISACTOR].kickback_pic temp
		ifvare temp 0
		{
			getplayer[THISACTOR].ammo_amount 3 temp
			ifvarg temp 0 { ifvare tmakimbo 0 { setvar tommysweep 1 } else ifvare tmakimbo 1 { setvar tommysweep 1 setvar akimbotommysweep 1 } }
		}
	}
}
ends

state tommygunplayerstate
//TOMMYGUN AKIMBO

ifvarg tmakimbo 1 subvar tmakimbo 1
ifvarl tmakimbo -1
{
	addvar tmakimbo 1
	ifvare tmakimbo -1 setvar tmakimbo 0
}
ifvare CURRWEAP 3 
{
	getplayer[THISACTOR].kickback_pic temp
	ifvarand temp 1
	ifvare tmakimbo 1
	ifp palive
	ifvarn EOL_VAR 1 ifvarn EOG_VAR 1 
	ifvare akimbotommysweep 0
	{	
		sound TOM
		flash
		shoot TOMMYFIRST
		setvar xoffset 65 state tommyshellstate
		getplayer[THISACTOR].ammo_amount 3 tmp
		ifvarg tmp 0 subvar tmp 1
		setplayer[THISACTOR].ammo_amount 3 tmp
	} 
	
	ifvare player[THISACTOR].kickback_pic 0 ifvare player[THISACTOR].weapon_pos 0 {
		getplayer[THISACTOR].ammo_amount 3 tmp
		ifvarl tmp 1 { setvar changeweappos 5 setplayer[THISACTOR].weapon_pos -1 }
	}
}

ifvarn akimbotommysweep 0
{
		setplayer[THISACTOR].curr_weapon 3
		setplayer[THISACTOR].weapon_pos 1
	
		getplayer[THISACTOR].ang ang
		setvarvar saveang ang
		switch qav_frame
		case 0
		subvar ang 48
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 110 state tommyshellstate
		break
		case 1
		subvar ang 72
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 120 state tommyshellstate
		break
		case 2
		subvar ang 96
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 120 state tommyshellstate
		break
		case 3
		subvar ang 144
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 120 state tommyshellstate
		break
		case 4
		subvar ang 144
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 120 state tommyshellstate
		break
		case 5
		subvar ang 96
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 120 state tommyshellstate
		break
		case 6
		subvarvar ang 72
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 75 state tommyshellstate
		break
		case 7
		subvar ang 48
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 75 state tommyshellstate
		break
		case 8
		addvar ang 72
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 75 state tommyshellstate
		break
		case 9
		addvar ang 96
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 75 state tommyshellstate
		break
		case 10
		addvar ang 144
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 40 state tommyshellstate
		break
		case 11
		addvar ang 144
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 40 state tommyshellstate
		break
		case 12
		addvar ang 96
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 60 state tommyshellstate
		break
		case 13
		addvar ang 72
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		setvar xoffset 75 state tommyshellstate
		break
		default break
		endswitch
		
		addvar akimbotommysweep 1 
		getinput[THISACTOR].bits num
		ifvare num 12582944 { ifvarvarg akimbotommysweep WEAPON3_TOTALTIME setvar akimbotommysweep 1 } else 
		ifvarvarg akimbotommysweep WEAPON3_TOTALTIME setvar akimbotommysweep 0
		
		
		getplayer[THISACTOR].ammo_amount 3 tmp
		
		ifvarl tmp 1 { setvar changeweappos 5 setplayer[THISACTOR].weapon_pos -1 setvar akimbotommysweep 0 }
}

ifvarn tommysweep 0
{
		setplayer[THISACTOR].curr_weapon 3
		setplayer[THISACTOR].weapon_pos 1

		getplayer[THISACTOR].ang ang
		setvarvar saveang ang
		switch qav_frame
		case 0
		state tommyfire
		ifvare tmakimbo 0 { setvar xoffset -5 state tommyshellstate } else { setvar xoffset -70 state tommyshellstate }
		break
		case 1
		subvar ang 24
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset 30 state tommyshellstate } else { setvar xoffset -40 state tommyshellstate }
		break
		case 2
		subvar ang 48
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset 30 state tommyshellstate } else { setvar xoffset -40 state tommyshellstate }
		break
		case 3
		subvar ang 72
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset 30 state tommyshellstate } else { setvar xoffset -40 state tommyshellstate }
		break
		case 4
		subvar ang 72
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset 30 state tommyshellstate } else { setvar xoffset -40 state tommyshellstate }
		break
		case 5
		subvar ang 48
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset 30 state tommyshellstate } else { setvar xoffset -40 state tommyshellstate }
		break
		case 6
		subvar ang 24
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset 10 state tommyshellstate } else { setvar xoffset -70 state tommyshellstate }
		break
		case 7
		state tommyfire
		ifvare tmakimbo 0 { setvar xoffset -10 state tommyshellstate } else { setvar xoffset -70 state tommyshellstate }
		break
		case 8
		addvar ang 24
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset -15 state tommyshellstate } else { setvar xoffset -70 state tommyshellstate }
		break
		case 9
		addvar ang 48
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset -30 state tommyshellstate } else { setvar xoffset -90 state tommyshellstate }
		break
		case 10
		addvar ang 72
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset -70 state tommyshellstate } else { setvar xoffset -120 state tommyshellstate }
		break
		case 11
		addvar ang 72
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset -70 state tommyshellstate } else { setvar xoffset -120 state tommyshellstate }
		break
		case 12
		addvar ang 48
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset -70 state tommyshellstate } else { setvar xoffset -120 state tommyshellstate }
		break
		case 13
		addvar ang 24
		setplayer[THISACTOR].ang ang
		state tommyfire
		setplayer[THISACTOR].ang saveang
		ifvare tmakimbo 0 { setvar xoffset -50 state tommyshellstate } else { setvar xoffset -80 state tommyshellstate }
		break
		default break
		endswitch
		
		addvar tommysweep 1
		getinput[THISACTOR].bits num
		ifvare num 12582944 { ifvarvarg tommysweep WEAPON3_TOTALTIME setvar tommysweep 1 } else 
		ifvarvarg tommysweep WEAPON3_TOTALTIME setvar tommysweep 0
		getplayer[THISACTOR].ammo_amount 3 tmp
		ifvarl tmp 1 { setvar changeweappos 5 setplayer[THISACTOR].weapon_pos -1 setvar tommysweep 0 }
}
ends

state sweepdisplay

setvarvar qav_maxframes 13
setvar qav_tpf 8
state qav_initfr_scpred3

switch qav_frame
case 0
setvar tilenumweapon 3188
setvar orientationweapon 0
setvar xweapon 14
setvar yweapon -63
setvarvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 3177
setvar xweapon 34
setvar yweapon -33
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 1
setvar tilenumweapon 3185
setvar xweapon 8
setvar yweapon -69
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3178
setvar xweapon 24
setvar yweapon -34
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 2
setvar tilenumweapon 3186
setvar xweapon -27
setvar yweapon -67
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3179
setvar xweapon 6
setvar yweapon -33
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 3
setvar tilenumweapon 3187
setvar xweapon -34
setvar yweapon -65
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3179
setvar xweapon -2
setvar yweapon -34
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 4
setvar tilenumweapon 3188
setvar xweapon -32
setvar yweapon -65
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3180
setvar xweapon 0
setvar yweapon -33
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 5
setvar tilenumweapon 3185
setvar xweapon -24
setvar yweapon -68
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3179
setvar xweapon 8
setvar yweapon -34
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 6
setvar tilenumweapon 3186
setvar xweapon 8
setvar yweapon -70
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3177
setvar xweapon 24
setvar yweapon -33
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 7
setvar tilenumweapon 3187
setvar xweapon 29
setvar yweapon -69
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3181
setvar xweapon 35
setvar yweapon -33
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 8
setvar tilenumweapon 3188
setvar xweapon 46
setvar yweapon -69
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3181
setvar orientationweapon 4
setvar qav_ang 1024
setvar xweapon 43
setvar yweapon -34
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 9
setvar tilenumweapon 3185
setvar qav_ang 0
setvar xweapon 71
setvar yweapon -70
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3178
setvar orientationweapon 4
setvar qav_ang 1024
setvar xweapon 52
setvar yweapon -33
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 10
setvar tilenumweapon 3186
setvar qav_ang 0
setvar xweapon 91
setvar yweapon -69
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3177
setvar orientationweapon 4
setvar qav_ang 1024
setvar xweapon 70
setvar yweapon -34
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 11
setvar tilenumweapon 3187
setvar qav_ang 0
setvar xweapon 92
setvar yweapon -70
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3178
setvar orientationweapon 4
setvar qav_ang 1024
setvar xweapon 71
setvar yweapon -33
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 12
setvar tilenumweapon 3188
setvar qav_ang 0
setvar xweapon 81
setvar yweapon -67
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3177
setvar orientationweapon 4
setvar qav_ang 1024
setvar xweapon 66
setvar yweapon -34
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 13
setvar tilenumweapon 3185
setvar qav_ang 0
setvar xweapon 50
setvar yweapon -71
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3181
setvar orientationweapon 0
setvar xweapon 53
setvar yweapon -33
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break

endswitch
ends

state akimbosweepdisplay
setvarvar qav_maxframes 13
setvar qav_tpf 8
state qav_initfr_altscpred3

switch qav_frame
case 0
setvar tilenumweapon 3188
setvar orientationweapon 0
setvar xweapon 65
setvar yweapon -68
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3177
setvar orientationweapon 0
setvar xweapon 90
setvar yweapon -28
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3185
setvar orientationweapon 0
setvar xweapon -69
setvar yweapon -66
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3177
setvar orientationweapon 4
setvar xweapon -89
setvar yweapon -24
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 1
setvar tilenumweapon 3185
setvar orientationweapon 0
setvar xweapon 67
setvar yweapon -78
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3178
setvar orientationweapon 0
setvar xweapon 83
setvar yweapon -34
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3187
setvar orientationweapon 0
setvar xweapon -82
setvar yweapon -66
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3181
setvar orientationweapon 4
setvar xweapon -93
setvar yweapon -19
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 2
setvar tilenumweapon 3186
setvar orientationweapon 0
setvar xweapon 44
setvar yweapon -67
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 0
setvar xweapon 76
setvar yweapon -22
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3188
setvar orientationweapon 0
setvar xweapon -120
setvar yweapon -69
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3178
setvar orientationweapon 0
setvar xweapon -104
setvar yweapon -34
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
break
case 3
setvar tilenumweapon 3187
setvar orientationweapon 0
setvar xweapon 39
setvar yweapon -65
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 0
setvar xweapon 72
setvar yweapon -20
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3185
setvar orientationweapon 0
setvar xweapon -127
setvar yweapon -63
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3177
setvar orientationweapon 0
setvar xweapon -110
setvar yweapon -24
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
break
case 4
setvar tilenumweapon 3188
setvar orientationweapon 0
setvar xweapon 30
setvar yweapon -68
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3180
setvar orientationweapon 0
setvar xweapon 65
setvar yweapon -26
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3186
setvar orientationweapon 0
setvar xweapon -128
setvar yweapon -71
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3178
setvar orientationweapon 0
setvar xweapon -109
setvar yweapon -31
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
break
case 5
setvar tilenumweapon 3185
setvar orientationweapon 0
setvar xweapon 35
setvar yweapon -73
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 0
setvar xweapon 70
setvar yweapon -30
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3187
setvar orientationweapon 0
setvar xweapon -118
setvar yweapon -61
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3177
setvar orientationweapon 0
setvar xweapon -97
setvar yweapon -25
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
break
case 6
setvar tilenumweapon 3186
setvar orientationweapon 0
setvar xweapon 59
setvar yweapon -70
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3177
setvar orientationweapon 0
setvar xweapon 77
setvar yweapon -33
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3188
setvar orientationweapon 0
setvar xweapon -99
setvar yweapon -75
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 8125
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3181
setvar orientationweapon 0
setvar xweapon -91
setvar yweapon -29
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
break
case 7
setvar tilenumweapon 3187
setvar orientationweapon 0
setvar xweapon 79
setvar yweapon -74
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3181
setvar orientationweapon 0
setvar xweapon 86
setvar yweapon -29
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3185
setvar orientationweapon 4
setvar xweapon -79
setvar yweapon -72
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10625
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3181
setvar orientationweapon 4
setvar xweapon -83
setvar yweapon -21
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 8
setvar tilenumweapon 3188
setvar orientationweapon 0
setvar xweapon 103
setvar yweapon -72
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3181
setvar orientationweapon 4
setvar xweapon 97
setvar yweapon -27
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3186
setvar orientationweapon 4
setvar xweapon -44
setvar yweapon -69
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10625
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3180
setvar orientationweapon 4
setvar xweapon -74
setvar yweapon -21
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 9
setvar tilenumweapon 3185
setvar orientationweapon 0
setvar xweapon 124
setvar yweapon -70
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3178
setvar orientationweapon 4
setvar xweapon 105
setvar yweapon -33
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3187
setvar orientationweapon 0
setvar xweapon -41
setvar yweapon -66
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 4
setvar xweapon -71
setvar yweapon -24
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 10
setvar tilenumweapon 3186
setvar orientationweapon 0
setvar xweapon 120
setvar yweapon -71
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3177
setvar orientationweapon 4
setvar xweapon 101
setvar yweapon -38
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3188
setvar orientationweapon 0
setvar xweapon -33
setvar yweapon -70
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 8750
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 4
setvar xweapon -68
setvar yweapon -23
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 11
setvar tilenumweapon 3187
setvar orientationweapon 0
setvar xweapon 115
setvar yweapon -70
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3178
setvar orientationweapon 4
setvar xweapon 96
setvar yweapon -33
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3185
setvar orientationweapon 0
setvar xweapon -56
setvar yweapon -63
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3178
setvar orientationweapon 4
setvar xweapon -73
setvar yweapon -25
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 12
setvar tilenumweapon 3188
setvar orientationweapon 0
setvar xweapon 107
setvar yweapon -69
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3177
setvar orientationweapon 4
setvar xweapon 91
setvar yweapon -34
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3186
setvar orientationweapon 0
setvar xweapon -64
setvar yweapon -74
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3177
setvar orientationweapon 4
setvar xweapon -80
setvar yweapon -38
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 13
setvar tilenumweapon 3185
setvar orientationweapon 0
setvar xweapon 81
setvar yweapon -79
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3181
setvar orientationweapon 0
setvar xweapon 89
setvar yweapon -33
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3187
setvar orientationweapon 4
setvar xweapon -75
setvar yweapon -68
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3178
setvar orientationweapon 4
setvar xweapon -90
setvar yweapon -32
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
endswitch
ends

state tommyakimbodisplay
ifvarn akimbotommysweep 0 { state akimbosweepdisplay break }
 
setvarvar qav_maxframes 8
setvar qav_tpf 8
state qav_initframes3

switch qav_frame
case 0 //2TOMIDLE.QAV
setvar tilenumweapon 3179
setvar orientationweapon 0
setvar xweapon 90
setvar yweapon -28
setvar qav_sh 0
setvarvar qav_pal 5
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 4
setvar xweapon -88
setvar yweapon -26
setvar qav_sh 0
setvarvar qav_pal 5
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 1
setvar tilenumweapon 3188
setvar orientationweapon 0
setvar xweapon 59
setvar yweapon -59
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 6250
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 0
setvar xweapon 94
setvar yweapon -26
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 2032
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3185
setvar orientationweapon 4
setvar xweapon -59
setvar yweapon -59
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1152
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 4
setvar xweapon -92
setvar yweapon -22
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 2
setvar tilenumweapon 3185
setvar orientationweapon 0
setvar xweapon 63
setvar yweapon -61
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3180
setvar orientationweapon 0
setvar xweapon 100
setvar yweapon -21
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3186
setvar orientationweapon 4
setvar xweapon -67
setvar yweapon -50
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 6875
setvar qav_ang 1140
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3180
setvar orientationweapon 4
setvar xweapon -100
setvar yweapon -12
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1012
state akimbo_ycoord3
state qav2tc_state
break
case 3
setvar tilenumweapon 3186
setvar orientationweapon 0
setvar xweapon 63
setvar yweapon -61
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 6250
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 0
setvar xweapon 96
setvar yweapon -25
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3187
setvar orientationweapon 4
setvar xweapon -59
setvar yweapon -56
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 6875
setvar qav_ang 1156
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 4
setvar xweapon -96
setvar yweapon -18
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 4
setvar tilenumweapon 3187
setvar orientationweapon 0
setvar xweapon 65
setvar yweapon -58
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3180
setvar orientationweapon 0
setvar xweapon 100
setvar yweapon -21
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 16
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3189
setvar orientationweapon 4
setvar xweapon -63
setvar yweapon -52
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 7500
setvar qav_ang 800
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3180
setvar orientationweapon 4
setvar xweapon -100
setvar yweapon -13
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1012
state akimbo_ycoord3
state qav2tc_state
break
case 5
setvar tilenumweapon 3186
setvar orientationweapon 0
setvar xweapon 58
setvar yweapon -61
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 6875
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 0
setvar xweapon 96
setvar yweapon -25
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3186
setvar orientationweapon 4
setvar xweapon -62
setvar yweapon -50
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 4
setvar xweapon -101
setvar yweapon -11
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1016
state akimbo_ycoord3
state qav2tc_state
break
case 6
setvar tilenumweapon 3187
setvar orientationweapon 0
setvar xweapon 66
setvar yweapon -61
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10625
setvar qav_ang 1280
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3180
setvar orientationweapon 0
setvar xweapon 102
setvar yweapon -19
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3187
setvar orientationweapon 4
setvar xweapon -54
setvar yweapon -60
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 6250
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3180
setvar orientationweapon 4
setvar xweapon -91
setvar yweapon -21
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
case 7
setvar tilenumweapon 3188
setvar orientationweapon 0
setvar xweapon 61
setvar yweapon -59
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 6250
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3179
setvar orientationweapon 0
setvar xweapon 96
setvar yweapon -25
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3185
setvar orientationweapon 4
setvar xweapon -63
setvar yweapon -56
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 6250
setvar qav_ang 0
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3180
setvar orientationweapon 4
setvar xweapon -96
setvar yweapon -17
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1012
state akimbo_ycoord3
state qav2tc_state
break
case 8
setvar tilenumweapon 3185
setvar orientationweapon 0
setvar xweapon 66
setvar yweapon -58
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord3
state qav2tc_state
setvar tilenumweapon 3180
setvar orientationweapon 0
setvar xweapon 102
setvar yweapon -20
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 20
state akimbo_xcoord3
state qav2tc_state

setvar tilenumweapon 3186
setvar orientationweapon 4
setvar xweapon -57
setvar yweapon -59
setvar qav_sh -128
setvarvar qav_pal 0
setvar weapon_zoom 6875
setvar qav_ang 1152
state akimbo_ycoord3
state qav2tc_state
setvar tilenumweapon 3180
setvar orientationweapon 4
setvar xweapon -89
setvar yweapon -21
setvar qav_sh -16
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord3
state qav2tc_state
break
endswitch
ends

state tommygundisplay
ifvarn tommysweep 0 { state sweepdisplay break }

setvarvar qav_maxframes 9
setvar qav_tpf 8
state qav_initframes3

switch qav_frame
case 0 //TOMIDLE.QAV
setvar tilenumweapon 3176
setvar orientationweapon 0
setvar xweapon 39
setvar yweapon -34
setvar qav_sh 0
setvarvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
break
case 1 //TOMFIRE.QAV
setvar tilenumweapon 3188
setvar xweapon 20
setvar yweapon -74 // 69
setvarvar qav_sh -128
setvar weapon_zoom 6250 //A000
state qav2tc_state
setvar tilenumweapon 3177
setvar xweapon 38
setvar yweapon -36
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 2
setvar tilenumweapon 3185
setvar xweapon 22
setvar yweapon -71
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3177
setvar xweapon 44
setvar yweapon -31
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 3
setvar tilenumweapon 3186
setvar xweapon 23
setvar yweapon -76 //71
setvarvar qav_sh -128
setvar weapon_zoom 6250 //A000
state qav2tc_state
setvar tilenumweapon 3178
setvar xweapon 40
setvar yweapon -35
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 4
setvar tilenumweapon 3187
setvar xweapon 24
setvar yweapon -70
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3178
setvar xweapon 44
setvar yweapon -31
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 5
setvar tilenumweapon 3186
setvar xweapon 27
setvar yweapon -76 //71
setvarvar qav_sh -128
setvar weapon_zoom 6875 //B000
state qav2tc_state
setvar tilenumweapon 3177
setvar xweapon 40
setvar yweapon -35
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 6
setvar tilenumweapon 3187
setvar xweapon 27
setvar yweapon -71
setvarvar qav_sh -128
setvar weapon_zoom 11000
state qav2tc_state
setvar tilenumweapon 3178
setvar xweapon 46
setvar yweapon -29
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 7
setvar tilenumweapon 3188
setvar xweapon 23
setvar yweapon -73 //68
setvarvar qav_sh -128
setvar weapon_zoom 6250 //A000
state qav2tc_state
setvar tilenumweapon 3177
setvar xweapon 40
setvar yweapon -35
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
case 8
setvar tilenumweapon 3185
setvar xweapon 25
setvar yweapon -69
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 3178
setvar xweapon 46
setvar yweapon -30
setvarvar qav_sh -16
setvar weapon_zoom 10000
state qav2tc_state
break
endswitch

ends

state tommygunshotrange
ifvare CURRWEAP 3 ifvarn tommysweep 0
{
	setvar ANGRANGE 16
	setvar ZRANGE 128
}
ends

state tommygunfirestate
ifvare CURRWEAP 3
{
	setvar RETURN -1
	getplayer[THISACTOR].ammo_amount 3 tmp
	ifvarg tmp 0
	{
		ifvarn tmakimbo 0 ifvarn tmakimbo 1 nullop else		
		{
		getplayer[THISACTOR].kickback_pic tmp
		randvar tmp2 12
		addvarvar tmp tmp2
		setplayer[THISACTOR].kickback_pic tmp
		} 
	}
}
ifvarn tommysweep 0 setvar RETURN -1
ifvarn akimbotommysweep 0 setvar RETURN -1
ends

state tommygunpressedfire
ifvarn tmakimbo 1 ifvarn tmakimbo 0 { setvar RETURN -1 setplayer[THISACTOR].kickback_pic 0 }
ifvare CURRWEAP 3
ifvare tommysweep 0
ifvare akimbotommysweep 0
ifvare player[THISACTOR].weapon_pos 0
ifp palive
{
	setvarvar tommyfire_var qav_tpf
	divvarvar tommyfire_var 4
	setvarvar tommyfire_count player[THISACTOR].kickback_pic
	modvarvar tommyfire_count tommyfire_var
	
	ifvare tommyfire_count 0
    { 
			getplayer[THISACTOR].ammo_amount 3 tmp
			ifvarg tmp 0
		    {
				ifvare tmakimbo 1
				{
					subvar tmp 1
					getplayer[THISACTOR].ang ang
					setvarvar saveang ang
					addvar ang 24
					setplayer[THISACTOR].ang ang
					sound TOM
					flash
					shoot TOMMYFIRST
					setplayer[THISACTOR].ang saveang
					setplayer[THISACTOR].ammo_amount 3 tmp
				} 
				else
				ifvare tmakimbo 0
				{
					subvar tmp 1
					shoot TOMMYFIRST
					flash
					sound TOM
					setplayer[THISACTOR].ammo_amount 3 tmp
				}
		    }
    }
}
ends