define PR_NAPALMRADIUS 1280 

spritenoshade PR_NAPALM
defineprojectile PR_NAPALM PROJ_WORKSLIKE 69634 //65536 + 4096 + 2
defineprojectile PR_NAPALM PROJ_HITRADIUS 10
//defineprojectile PR_NAPALM PROJ_SPAWNS EXPLOSION4
defineprojectile PR_NAPALM PROJ_EXTRA 220
defineprojectile PR_NAPALM PROJ_EXTRA_RAND 25
defineprojectile PR_NAPALM PROJ_SXREPEAT 32
defineprojectile PR_NAPALM PROJ_SYREPEAT 32
defineprojectile PR_NAPALM PROJ_VEL 1000
//defineprojectile PR_NAPALM PROJ_ISOUND EXPLODCM
defineprojectile PR_NAPALM PROJ_SOUND SNGAIR2
defineprojectile PR_NAPALM PROJ_TRAIL NAPALMSMOKE2
defineprojectile PR_NAPALM PROJ_TXREPEAT 12
defineprojectile PR_NAPALM PROJ_TYREPEAT 12
defineprojectile PR_NAPALM PROJ_CLIPDIST 32
defineprojectile PR_NAPALM PROJ_XREPEAT 4
defineprojectile PR_NAPALM PROJ_YREPEAT 4
defineprojectile PR_NAPALM PROJ_CSTAT 128

actor PR_NAPALM 0 FRAME1 enda

spritenoshade ALTNAPALM
defineprojectile ALTNAPALM PROJ_WORKSLIKE 71822
defineprojectile ALTNAPALM PROJ_HITRADIUS 2048
defineprojectile ALTNAPALM PROJ_SPAWNS EXPLOSION6
defineprojectile ALTNAPALM PROJ_SXREPEAT 32
defineprojectile ALTNAPALM PROJ_SYREPEAT 32
defineprojectile ALTNAPALM PROJ_VEL 512
defineprojectile ALTNAPALM PROJ_DROP -256
defineprojectile ALTNAPALM PROJ_BOUNCES 2
defineprojectile ALTNAPALM PROJ_BSOUND -1
defineprojectile ALTNAPALM PROJ_ISOUND EXPLODCM
defineprojectile ALTNAPALM PROJ_SOUND SNGAIR2
defineprojectile ALTNAPALM PROJ_CLIPDIST 32
defineprojectile ALTNAPALM PROJ_XREPEAT 32
defineprojectile ALTNAPALM PROJ_YREPEAT 32
defineprojectile ALTNAPALM PROJ_CSTAT 128

actor ALTNAPALM 0 FRAME1 enda

gamevar WEAPON4_SHOOTS PR_NAPALM 1
gamevar WEAPON4_FIRESOUND NAPEXPL 1

state qav_initframes4
setvarvar WEAPON4_TOTALTIME qav_maxframes
mulvarvar WEAPON4_TOTALTIME qav_tpf
divvarvar WEAPON4_TOTALTIME 4
setvarvar qav_frame player[THISACTOR].kickback_pic
mulvarvar qav_frame 4
divvarvar qav_frame qav_tpf
ends

state akimbo_xcoord4
ifvarn npakimbo 0 ifvarn npakimbo 1
	{
		setvarvar temp npakimbo
		ifvarl npakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
ends 

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

state weaponnapalmkillit
ifactor ALTNAPALM
{
	stopsound SPRAYFIR
	getactorvar[THISACTOR].napalmammo np_ammo
	setvar QUAKETIME 36
	setvar QUAKEACTIVE 1
	//quake 36
	ifvarg np_ammo 3
	{
		subvar np_ammo 2
		espawn FIREBALL
		setactorvar[RETURN].napalmammo np_ammo
		setactor[RETURN].xrepeat 24
		setactor[RETURN].yrepeat 24
		espawn FIREBALL 
		setactorvar[RETURN].napalmammo np_ammo
		setactor[RETURN].xrepeat 24
		setactor[RETURN].yrepeat 24
	} 
	else
	ifvare np_ammo 3
	{
		espawn FIREBALL
		setactorvar[RETURN].napalmammo 0
		setactor[RETURN].xrepeat 24
		setactor[RETURN].yrepeat 24
		espawn FIREBALL 
		setactorvar[RETURN].napalmammo 0
		setactor[RETURN].xrepeat 24
		setactor[RETURN].yrepeat 24
	} 
	else
	ifvare np_ammo 2
	{
		espawn FIREBALL 
		setactorvar[RETURN].napalmammo 0
		setactor[RETURN].xrepeat 24
		setactor[RETURN].yrepeat 24
	}
	setvar RETURN 0
}

//ifactor PR_NAPALM { ifvare QUAKETIME 0 { setvar QUAKETIME 36 setvar QUAKEACTIVE 1 } else { setvar QUAKETIME 36 setvar QUAKEACTIVE 2 } stopsound SPRAYFIR }
ends

state pr_napalmkillit
ifvare QUAKETIME 0 { setvar QUAKETIME 36 setvar QUAKEACTIVE 1 } else { setvar QUAKETIME 36 setvar QUAKEACTIVE 2 } stopsound SPRAYFIR
	getactor[THISACTOR].htmovflag wallid
	addvar wallid 32768
	ifvarg wallid -1 ifvarl wallid 16384
	{ 
	    state broken_proj
	    ifvare RETURN 0
		{
			spawn EXPLOSION4
			sound EXPLODCM
			hitradius 1280 60 100 125 125
		}	
	} else
	{			
		getactor[THISACTOR].htmovflag sectorid
		subvar sectorid 16384
		ifvarg sectorid -1 ifvarl sectorid 16384 
		{
			getactor[THISACTOR].zvel zvel
			ifvarand sector[sectorid].ceilingstat 1 ifvarl zvel 0 nullop else 
			ifvarand sector[sectorid].floorstat 1 ifvarg zvel 0 nullop else
			{
				spawn EXPLOSION4
				sound EXPLODCM
				hitradius PR_NAPALMRADIUS 60 100 125 125
				findnearsprite3d APLAYER PR_NAPALMRADIUS spriteid
				ifvarn spriteid -1 {
					getactor[THISACTOR].x x
					setactorvar[spriteid].playerhtx x
					getactor[THISACTOR].y y
					setactorvar[spriteid].playerhty y
					getactor[THISACTOR].z z
					setactorvar[spriteid].playerhtz z
				}
			}
		} else
		{
			spawn EXPLOSION4
			sound EXPLODCM
			hitradius PR_NAPALMRADIUS 60 100 125 125
			findnearsprite3d APLAYER PR_NAPALMRADIUS spriteid
			ifvarn spriteid -1 {
				getactor[THISACTOR].x x
				setactorvar[spriteid].playerhtx x
				getactor[THISACTOR].y y
				setactorvar[spriteid].playerhty y
				getactor[THISACTOR].z z
				setactorvar[spriteid].playerhtz z
			}
		}
	}
ends

state weaponnapalmgame
ifactor PR_NAPALM
{
	getactor[THISACTOR].mdflags  tmp
	orvar  tmp 16
	setactor[THISACTOR].mdflags  tmp
	
	ifspawnedby APLAYER nullop else soundonce SPRAYFIR
	addvar COUNTER 1
	ifvare COUNTER 3
	{
		setvar COUNTER 0
		ifaction FRAME1 action FRAME2 else
		ifaction FRAME2 action FRAME3 else
		ifaction FRAME3 action FRAME1
	}
	
}
ifactor ALTNAPALM
{
	addvar COUNTER 1
	ifvare COUNTER 3
	{
		setvar COUNTER 0
		ifaction FRAME1 action FRAME2 else
		ifaction FRAME2 action FRAME3 else
		ifaction FRAME3 action FRAME1
	}	
	setactorvar[THISACTOR].width 64
	setactorvar[THISACTOR].height 64
	state newfirestate
	getactor[THISACTOR].z z
	subvar z 2048
	setactor[RETURN].z z
}
ifactor TCHERNMISSLE {
	setactorvar[THISACTOR].width 64
	setactorvar[THISACTOR].height 64
	
	setvar tmp 0
	whilevarn tmp 4 {
		state newfirestate
		getactor[THISACTOR].z z
		addvar z 2048
		setactor[RETURN].xrepeat 40
		setactor[RETURN].yrepeat 40
		setactor[RETURN].pal 1
		setactor[RETURN].z z
		addvar tmp 1
	}
}
ends

state napalmplayerstate
//NAPALM AKIMBO

ifvarg npakimbo 1 subvar npakimbo 1
ifvarl npakimbo -1
{
	addvar npakimbo 1
	ifvare npakimbo -1 setvar npakimbo 0
}
ifvare CURRWEAP 4 ifvarg npakimbo 0
ifvare player[THISACTOR].kickback_pic 7
ifp palive
{
ifvare napalmalt 0
	{	
		sound NAPEXPL
		eshoot PR_NAPALM
		getactor[RETURN].xoffset xoffset
		addvar xoffset 24
		setactor[RETURN].xoffset xoffset
		getplayer[THISACTOR].ammo_amount 4 tmp
		ifvarg tmp 0 subvar tmp 1
		setplayer[THISACTOR].ammo_amount 4 tmp
	} 
	else 
	{ 
		getplayer[THISACTOR].ammo_amount 4 temp
		ifvarg temp 0
		{
		 sound NAPEXPL
		 eshoot ALTNAPALM
		 ifvarg temp 12 { setactorvar[RETURN].napalmammo 12 } else setactorvar[RETURN].napalmammo temp
		 ifvarg temp 11 { subvar tmp 12 } else setvar temp 0
		 getactor[RETURN].xoffset xoffset
		 addvar xoffset 24
	     setactor[RETURN].xoffset xoffset
		 setplayer[THISACTOR].ammo_amount 4 temp
		} 
		setvar napalmalt 0
	}
}
ends

state napalmaltstate
ifvare CURRWEAP 4
{
	ifvare napalmalt 0
	ifvare player[THISACTOR].weapon_pos 0
	ifp palive
	{
		getplayer[THISACTOR].kickback_pic temp
		ifvare temp 0
		{
			getplayer[THISACTOR].ammo_amount 4 temp
			ifvarg temp 0 { setplayer[THISACTOR].kickback_pic 1 setvar napalmalt 1 } //11
		}
	}
}
ends

state napalmakimbodisplay
setvarvar qav_maxframes 10
setvar qav_tpf 6
state qav_initframes4

switch qav_frame
case 0
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 89
setvar yweapon -23
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 2350
setvar orientationweapon 4
setvar xweapon -89
setvar yweapon -23
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state

divvar tmp 100
modvar tmp 5
ifvare tmp 0
{
setvar tilenumweapon 2351
setvar orientationweapon 0
setvar xweapon 71
setvar yweapon -39
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2355
setvar orientationweapon 1
setvar xweapon 75
setvar yweapon -53
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2354
setvar orientationweapon 33
setvar xweapon 74
setvar yweapon -50
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 2353
setvar orientationweapon 4
setvar xweapon -70
setvar yweapon -47
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2352
setvar orientationweapon 5
setvar xweapon -70
setvar yweapon -43
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2351
setvar orientationweapon 37
setvar xweapon -71
setvar yweapon -39
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
}
ifvare tmp 1
{
setvar tilenumweapon 2352
setvar orientationweapon 0
setvar xweapon 70
setvar yweapon -43
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2351
setvar orientationweapon 1
setvar xweapon 71
setvar yweapon -39
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2355
setvar orientationweapon 33
setvar xweapon 75
setvar yweapon -53
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 2354
setvar orientationweapon 4
setvar xweapon -73
setvar yweapon -49
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2353
setvar orientationweapon 5
setvar xweapon -70
setvar yweapon -47
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2352
setvar orientationweapon 37
setvar xweapon -70
setvar yweapon -43
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
}
ifvare tmp 2
{
setvar tilenumweapon 2353
setvar orientationweapon 0
setvar xweapon 70
setvar yweapon -47
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2352
setvar orientationweapon 1
setvar xweapon 70
setvar yweapon -43
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2351
setvar orientationweapon 33
setvar xweapon 71
setvar yweapon -39
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 2355
setvar orientationweapon 4
setvar xweapon -75
setvar yweapon -53
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2354
setvar orientationweapon 5
setvar xweapon -74
setvar yweapon -50
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2353
setvar orientationweapon 37
setvar xweapon -71
setvar yweapon -48
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
}
ifvare tmp 3
{
setvar tilenumweapon 2354
setvar orientationweapon 0
setvar xweapon 73
setvar yweapon -49
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2353
setvar orientationweapon 1
setvar xweapon 70
setvar yweapon -47
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2352
setvar orientationweapon 33
setvar xweapon 70
setvar yweapon -43
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 2351
setvar orientationweapon 4
setvar xweapon -71
setvar yweapon -39
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2355
setvar orientationweapon 5
setvar xweapon -75
setvar yweapon -53
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2354
setvar orientationweapon 37
setvar xweapon -73
setvar yweapon -49
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
}
ifvare tmp 4
{
setvar tilenumweapon 2355
setvar orientationweapon 0
setvar xweapon 75
setvar yweapon -53
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2354
setvar orientationweapon 1
setvar xweapon 74
setvar yweapon -50
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2353
setvar orientationweapon 33
setvar xweapon 70
setvar yweapon -47
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 2352
setvar orientationweapon 4
setvar xweapon -70
setvar yweapon -43
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2351
setvar orientationweapon 5
setvar xweapon -71
setvar yweapon -39
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2355
setvar orientationweapon 37
setvar xweapon -75
setvar yweapon -53
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
}
break
case 1
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 89
setvar yweapon -23
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 2350
setvar orientationweapon 4
setvar xweapon -89
setvar yweapon -23
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
break
case 2
setvar tilenumweapon 3482
setvar orientationweapon 0
setvar xweapon 68
setvar yweapon -45 //-28
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 8125
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2343
setvar orientationweapon 0
setvar xweapon 107
setvar yweapon -4
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 2350
setvar orientationweapon 4
setvar xweapon -90
setvar yweapon -20
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2351
setvar orientationweapon 4
setvar xweapon -72
setvar yweapon -36
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
break
case 3
setvar tilenumweapon 3485
setvar orientationweapon 0
setvar xweapon 65
setvar yweapon -45 //-28
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 9375
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2343
setvar orientationweapon 0
setvar xweapon 114
setvar yweapon 7
setvar qav_sh -48
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 2350
setvar orientationweapon 4
setvar xweapon -92
setvar yweapon -14
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2352
setvar orientationweapon 4
setvar xweapon -73
setvar yweapon -34
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
break
case 4
setvar tilenumweapon 3486
setvar orientationweapon 0
setvar xweapon 64
setvar yweapon -45 //-28
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 8125
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2343
setvar orientationweapon 0
setvar xweapon 108
setvar yweapon 1
setvar qav_sh -35
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 2350
setvar orientationweapon 4
setvar xweapon -91
setvar yweapon -16
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2353
setvar orientationweapon 4
setvar xweapon -72
setvar yweapon -40
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
break
case 5
setvar tilenumweapon 3488
setvar orientationweapon 0
setvar xweapon 66
setvar yweapon -45 //-28
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 8125
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 94
setvar yweapon -17
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2353
setvar orientationweapon 0
setvar xweapon 75
setvar yweapon -41
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 2350
setvar orientationweapon 4
setvar xweapon -89
setvar yweapon -23
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2354
setvar orientationweapon 4
setvar xweapon -73
setvar yweapon -49
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
break
case 6
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 89
setvar yweapon -23
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2352
setvar orientationweapon 0
setvar xweapon 70
setvar yweapon -43
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 3481
setvar orientationweapon 4
setvar xweapon -72
setvar yweapon -52
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 8750
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2343
setvar orientationweapon 4
setvar xweapon -107
setvar yweapon -4
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
break
case 7
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 90
setvar yweapon -19
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2353
setvar orientationweapon 0
setvar xweapon 71
setvar yweapon -43
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 3483
setvar orientationweapon 4
setvar xweapon -69
setvar yweapon -51
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 9375
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2343
setvar orientationweapon 4
setvar xweapon -114
setvar yweapon 7
setvar qav_sh -48
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
break
case 8
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 91
setvar yweapon -15
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2354
setvar orientationweapon 0
setvar xweapon 75
setvar yweapon -41
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 3485
setvar orientationweapon 4
setvar xweapon -63
setvar yweapon -51
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 8750
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2343
setvar orientationweapon 4
setvar xweapon -108
setvar yweapon 1
setvar qav_sh -35
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
break
case 9
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 90
setvar yweapon -18
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2355
setvar orientationweapon 0
setvar xweapon 76
setvar yweapon -48
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 3487
setvar orientationweapon 4
setvar xweapon -59
setvar yweapon -51
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 8750
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2343
setvar orientationweapon 4
setvar xweapon -94
setvar yweapon -17
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
break
case 10
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 89
setvar yweapon -23
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state
setvar tilenumweapon 2351
setvar orientationweapon 0
setvar xweapon 71
setvar yweapon -39
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state akimbo_xcoord4
state qav2tc_state

setvar tilenumweapon 3489
setvar orientationweapon 4
setvar xweapon -55
setvar yweapon -52
setvar qav_sh -128
setvar qav_pal 0
setvar weapon_zoom 8125
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2350
setvar orientationweapon 4
setvar xweapon -89
setvar yweapon -23
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
setvar tilenumweapon 2355
setvar orientationweapon 4
setvar xweapon -75
setvar yweapon -53
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 1024
state akimbo_ycoord4
state qav2tc_state
break
endswitch
ends

state napalmdisplay

setvarvar qav_maxframes 10
setvar qav_tpf 7
state qav_initframes4

switch qav_frame
case 0
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 39
setvar yweapon -31
setvar qav_sh 0
setvar qav_pal 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state
divvar tmp 100
modvar tmp 5
ifvare tmp 0
{
setvar tilenumweapon 2351
setvar orientationweapon 0
setvar xweapon 21
setvar yweapon -47
setvar qav_sh -32
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 2355
setvar orientationweapon 1
setvar xweapon 25
setvar yweapon -61
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 2354
setvar orientationweapon 33
setvar xweapon 24
setvar yweapon -58
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
}
ifvare tmp 1
{
setvar tilenumweapon 2352
setvar orientationweapon 0
setvar xweapon 20
setvar yweapon -51
setvar qav_sh -32
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 2351
setvar orientationweapon 1
setvar xweapon 21
setvar yweapon -47
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 2355
setvar orientationweapon 33
setvar xweapon 25
setvar yweapon -61
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
}
ifvare tmp 2
{
setvar tilenumweapon 2353
setvar orientationweapon 0
setvar xweapon 20
setvar yweapon -55
setvar qav_sh -32
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 2352
setvar orientationweapon 1
setvar xweapon 20
setvar yweapon -51
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 2351
setvar orientationweapon 33
setvar xweapon 21
setvar yweapon -47
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
}
ifvare tmp 3
{
setvar tilenumweapon 2354
setvar orientationweapon 0
setvar xweapon 24
setvar yweapon -58
setvar qav_sh -32
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 2353
setvar orientationweapon 1
setvar xweapon 20
setvar yweapon -55
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 2352
setvar orientationweapon 33
setvar xweapon 20
setvar yweapon -51
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
}
ifvare tmp 4
{
setvar tilenumweapon 2355
setvar orientationweapon 0
setvar xweapon 25
setvar yweapon -61
setvar qav_sh -32
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 2354
setvar orientationweapon 1
setvar xweapon 24
setvar yweapon -58
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
setvar tilenumweapon 2353
setvar orientationweapon 33
setvar xweapon 20
setvar yweapon -55
setvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
}
break
case 1
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 39
setvar yweapon -31
setvar qav_sh 0
setvar weapon_zoom 10000
state qav2tc_state
break
case 2
setvar tilenumweapon 3482
setvar xweapon 18
setvar yweapon -52
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
state qav2tc_state

setvar tilenumweapon 2343
setvar xweapon 57
setvar yweapon -12
setvarvar qav_sh -128
setvar weapon_zoom 10000
state qav2tc_state
break
case 3
setvar tilenumweapon 3483 //8603
setvar orientationweapon 16
setvar xweapon -33
setvar yweapon -110
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2343
setvar orientationweapon 0
setvar xweapon 63
setvar yweapon -4
setvarvar qav_sh -88
setvar weapon_zoom 10000
state qav2tc_state

setvar tilenumweapon 3532
setvar orientationweapon 4
setvar xweapon -6
setvar yweapon -33
setvarvar qav_sh -128
setvar weapon_zoom 5625 //9000
setvar qav_ang 384
state qav2tc_state

setvar tilenumweapon 3533
setvar orientationweapon 0
setvar xweapon 12
setvar yweapon -25
setvarvar qav_sh 0
setvar weapon_zoom 3125 //5000
setvar qav_ang 1152
state qav2tc_state

setvar tilenumweapon 3535
setvar orientationweapon 4
setvar xweapon 0
setvar yweapon -19
setvarvar qav_sh -128
setvar weapon_zoom 3125 //5000
setvar qav_ang 384
state qav2tc_state
break

case 4
setvar tilenumweapon 3485
setvar orientationweapon 16
setvar xweapon -34
setvar yweapon -107
setvarvar qav_sh -128
setvar weapon_zoom 9375 //F000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2343
setvar orientationweapon 0
setvar xweapon 64
setvar yweapon -1
setvarvar qav_sh -48
setvar weapon_zoom 10000
state qav2tc_state

setvar tilenumweapon 3533
setvar orientationweapon 4
setvar xweapon -9
setvar yweapon -33
setvarvar qav_sh -128
setvar weapon_zoom 5000 //8000
setvar qav_ang 384
state qav2tc_state

setvar tilenumweapon 3534
setvar orientationweapon 0
setvar xweapon 9
setvar yweapon -26
setvarvar qav_sh 0
setvar weapon_zoom 3750 //6000
setvar qav_ang 1152
state qav2tc_state

setvar tilenumweapon 3536
setvar orientationweapon 4
setvar xweapon -5
setvar yweapon -12
setvarvar qav_sh -128
setvar weapon_zoom 2500 //4000
setvar qav_ang 384
state qav2tc_state
break

case 5
setvar tilenumweapon 3486
setvar orientationweapon 16
setvar xweapon -25
setvar yweapon -95
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2343
setvar orientationweapon 0
setvar xweapon 58
setvar yweapon -7
setvarvar qav_sh -35
setvar weapon_zoom 10000
state qav2tc_state

setvar tilenumweapon 3534
setvar orientationweapon 4
setvar xweapon -12
setvar yweapon -31
setvarvar qav_sh -128
setvar weapon_zoom 3750 //6000
setvar qav_ang 384
state qav2tc_state

setvar tilenumweapon 3535
setvar orientationweapon 0
setvar xweapon 6
setvar yweapon -25
setvarvar qav_sh 0
setvar weapon_zoom 3125 //5000
setvar qav_ang 1152
state qav2tc_state

setvar tilenumweapon 3537
setvar orientationweapon 4
setvar xweapon -7
setvar yweapon -9
setvarvar qav_sh -128
setvar weapon_zoom 2500 //4000
setvar qav_ang 384
state qav2tc_state
break

case 6
setvar tilenumweapon 3487
setvar orientationweapon 16
setvar xweapon -23
setvar yweapon -90
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2343
setvar orientationweapon 0
setvar xweapon 48
setvar yweapon -19
setvarvar qav_sh -20
setvar weapon_zoom 10000
state qav2tc_state

setvar tilenumweapon 3535
setvar orientationweapon 4
setvar xweapon -15
setvar yweapon -30
setvarvar qav_sh -128
setvar weapon_zoom 3125 //5000
setvar qav_ang 384
state qav2tc_state

setvar tilenumweapon 3536
setvar orientationweapon 0
setvar xweapon 3
setvar yweapon -24
setvarvar qav_sh 0
setvar weapon_zoom 1875 //3000
setvar qav_ang 1152
state qav2tc_state

setvar tilenumweapon 3538
setvar orientationweapon 4
setvar xweapon -9
setvar yweapon -4
setvarvar qav_sh -128
setvar weapon_zoom 1875 //3000
setvar qav_ang 384
state qav2tc_state
break

case 7
setvar tilenumweapon 3488
setvar orientationweapon 16
setvar xweapon -23
setvar yweapon -87
setvarvar qav_sh -128
setvar weapon_zoom 8125 //D000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 44
setvar yweapon -25
setvar qav_sh 0
setvar weapon_zoom 10000
state qav2tc_state

setvar tilenumweapon 2354
setvar orientationweapon 0
setvar xweapon 28
setvar yweapon -51
setvarvar qav_sh 0
setvar weapon_zoom 10000
state qav2tc_state

setvar tilenumweapon 3536
setvar orientationweapon 4
setvar xweapon -18
setvar yweapon -28
setvarvar qav_sh -128
setvar weapon_zoom 1875 //3000
setvar qav_ang 384
state qav2tc_state

setvar tilenumweapon 3539
setvar orientationweapon 4
setvar xweapon -9
setvar yweapon -2
setvarvar qav_sh -128
setvar weapon_zoom 1875 //3000
setvar qav_ang 384
state qav2tc_state
break

case 8
setvar tilenumweapon 3489
setvar orientationweapon 16
setvar xweapon -18
setvar yweapon -83
setvarvar qav_sh -128
setvar weapon_zoom 7500 //C000
setvar qav_ang 0
state qav2tc_state
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 42
setvar yweapon -28
setvar qav_sh 0
setvar weapon_zoom 10000
state qav2tc_state

setvar tilenumweapon 2353
setvar orientationweapon 0
setvar xweapon 23
setvar yweapon -52
setvarvar qav_sh 0
setvar weapon_zoom 10000
state qav2tc_state

setvar tilenumweapon 3537
setvar orientationweapon 4
setvar xweapon -21
setvar yweapon -24
setvarvar qav_sh -128
setvar weapon_zoom 1250 //2000
setvar qav_ang 384
state qav2tc_state
break

case 9
setvar tilenumweapon 2350
setvar orientationweapon 0
setvar xweapon 39
setvar yweapon -31
setvar qav_sh 0
setvar weapon_zoom 10000
setvar qav_ang 0
state qav2tc_state

setvar tilenumweapon 2352
setvar orientationweapon 0
setvar xweapon 20
setvar yweapon -51
setvarvar qav_sh 0
setvar weapon_zoom 10000
state qav2tc_state
break
endswitch
ends

state napalmdofirestate
ifvare CURRWEAP 4
{
	getplayer[THISACTOR].ammo_amount 4 temp
	ifvare napalmalt 1
	ifvarg temp 0
	{
		sound NAPEXPL
		eshoot ALTNAPALM
		ifvarg temp 12 { setactorvar[RETURN].napalmammo 12 } else setactorvar[RETURN].napalmammo temp
		ifvarg temp 11 { subvar temp 12 } else setvar temp 0
		setplayer[THISACTOR].ammo_amount 4 temp
		ifvarl npakimbo 1 { setvar napalmalt 0 }
	}
}
ends