// Weapons code

state hudcoordfix
addvarvar xweapon weapon_xoffset
subvarvar xweapon looking_angSR1
addvarvar xweapon HUDsx
addvar xweapon 30
addvarvar yweapon looking_arc
subvarvar yweapon gun_pos
addvarvar yweapon HUDsy
ifvare hudtype 0 { subvarvar yweapon 22 }
ends

gamevar WEAPON0_TOTALTIME 14 1
gamevar WEAPON0_SHOOTS FORKSTAB 1
gamevar WEAPON0_FIREDELAY 5 1
gamevar WEAPON0_SHOTSPERBURST 4 1

gamevar WEAPON1_SHOOTS FLARE 1
gamevar WEAPON1_CLIP 0 1
gamevar WEAPON1_SPAWN -1 1
gamevar WEAPON1_FIREDELAY 5 1
gamevar WEAPON1_TOTALTIME 15 1
gamevar WEAPON1_FIRESOUND FLAREF 1

gamevar WEAPON2_TOTALTIME 12 1
gamevar WEAPON2_SHOOTS SHOTAMMO 1
gamevar WEAPON2_SHOTSPERBURST 14 1
gamevar WEAPON2_CLIP 2 1
gamevar WEAPON2_RELOAD 27 1
gamevar WEAPON2_SPAWN -1 0
gamevar WEAPON2_FIRESOUND SHOTFIRE 1
gamevar WEAPON2_SOUND2SOUND SHOTCOCK 1

gamevar WEAPON3_TOTALTIME 12 1
gamevar WEAPON3_FIREDELAY 12 1
gamevar WEAPON3_SHOOTS -1 1
gamevar WEAPON3_FLAGS 4 1
gamevar WEAPON3_FIRESOUND -1 1

gamevar WEAPON4_TOTALTIME 15 1
gamevar WEAPON4_SHOOTS PR_NAPALM 1
gamevar WEAPON4_FIRESOUND NAPEXPL 1

gamevar WEAPON5_TOTALTIME 22 1
gamevar WEAPON5_FIREDELAY 14 1
gamevar WEAPON5_HOLDDELAY 15 1

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

gamevar WEAPON7_TOTALTIME 10 1
gamevar WEAPON7_FIREDELAY 10 1
gamevar WEAPON7_FLAGS 65536 1
gamevar WEAPON7_INITIALSOUND 0 1
gamevar WEAPON7_SHOOTS -1 1

gamevar WEAPON8_WORKSLIKE 11 1
gamevar WEAPON8_TOTALTIME 81 1
gamevar WEAPON8_FIREDELAY 81 1
gamevar WEAPON8_FLAGS 65536 1
gamevar WEAPON8_SHOOTS -1 1

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

onevent EVENT_RESETWEAPONS

	setplayer[THISACTOR].curr_weapon 0
	setplayer[THISACTOR].gotweapon 1 0
	setplayer[THISACTOR].ammo_amount 1 0
	
endevent

state MINEEXPLODE
	iffloordistl 8 { spawn EXPLOSION3 quake 26 } else { spawn EXPLOSION4 quake 26 }
	hitradius 2048 60 100 160 300
	globalsound EXPLODCM
	debris SCRAP2 3 
	setactorvar[THISACTOR].active 0
	killit
ends

state voodoohitstate
getactor[minid].extra extra
ifvarg extra 0
{ 
	ifvarg voodoocount2 0
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 8
		{
			subvar extra 17 ifvarl extra 0 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
			setactor[minid].extra extra
			subvar temp 8
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 8
		{
			setvar diffammo 17 // sub health
			divvar diffammo 8 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar extra temp ifvarl extra 0 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
			setactor[minid].extra extra
			setplayer[THISACTOR].ammo_amount 9 0
		}
	} else 
	ifvarg voodoocount3 0
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 4
		{
			subvar extra 9 ifvarl extra 0 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
			setactor[minid].extra extra
			subvar temp 4
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 4
		{
			setvar diffammo 9 // sub health
			divvar diffammo 4 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar extra temp ifvarl extra 0 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
			setactor[minid].extra extra
			setplayer[THISACTOR].ammo_amount 9 0
		}
	} else
	ifvarg voodoocount4 0
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 5
		{
			subvar extra 11 ifvarl extra 0 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
			setactor[minid].extra extra
			subvar temp 5
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 5
		{
			setvar diffammo 11 // sub health
			divvar diffammo 5 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar extra temp ifvarl extra 0 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
			setactor[minid].extra extra
			setplayer[THISACTOR].ammo_amount 9 0
		}
	} else
	ifvarg voodoocount5 0
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 24
		{
			subvar extra 49 ifvarl extra 0 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
			setactor[minid].extra extra
			subvar temp 24
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 24
		{
			setvar diffammo 49 // sub health
			divvar diffammo 24 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar extra temp ifvarl extra 0 { setactorvar[minid].voodoohitenemy 1 setvar extra 0 }
			setactor[minid].extra extra
			setplayer[THISACTOR].ammo_amount 9 0
		}
	}
}
ends

state pvoodoohitstate
getactor[pminid].extra HEALTHAMOUNT
ifvarg HEALTHAMOUNT 0
{ 
	ifvarg voodoocount2 0
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 4
		{
			subvar HEALTHAMOUNT 17 ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			subvar temp 4
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 4
		{
			setvar diffammo 17 // sub health
			divvar diffammo 4 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar HEALTHAMOUNT temp ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			setplayer[THISACTOR].ammo_amount 9 0
		}
	} else
	ifvarg voodoocount3 0
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 2
		{
			subvar HEALTHAMOUNT 9 ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			subvar temp 2
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 2
		{
			setvar diffammo 9 // sub health
			divvar diffammo 2 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar HEALTHAMOUNT temp ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			setplayer[THISACTOR].ammo_amount 9 0
		}
	} else
	ifvarg voodoocount4 0 //EYE
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 2
		{
			setactorvar[pminid].voodoohitenemy 2
			subvar HEALTHAMOUNT 11 ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			subvar temp 2
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 2
		{
			setactorvar[pminid].voodoohitenemy 2
			setvar diffammo 11 // sub health
			divvar diffammo 2 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar HEALTHAMOUNT temp ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			setplayer[THISACTOR].ammo_amount 9 0
		}
	} else
	ifvarg voodoocount5 0
	{
		getplayer[THISACTOR].ammo_amount 9 temp
		ifvarg temp 12
		{
			subvar HEALTHAMOUNT 49 ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			subvar temp 12
			setplayer[THISACTOR].ammo_amount 9 temp
		} else 
		ifvarl temp 12
		{
			setvar diffammo 49 // sub health
			divvar diffammo 12 // sub ammo
			mulvarvar temp diffammo // health per 1 ammo
			subvarvar HEALTHAMOUNT temp ifvarl HEALTHAMOUNT 0 { setvar HEALTHAMOUNT 0 setactorvar[pminid].voodoohitenemy 1 setactor[pminid].extra HEALTHAMOUNT }
			setactor[pminid].extra HEALTHAMOUNT
			setplayer[THISACTOR].ammo_amount 9 0
		}
	}
}
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
		
		getplayer[THISACTOR].ang ang
		subvar ang 512
		randvar tmp 256
		addvarvar ang tmp
		setactor[RETURN].ang ang
	} 
	else
	{
		randvar zdist -512
		subvar zdist 1024
		ezshootvar zdist NEWSHELL
		getplayer[THISACTOR].ang ang
		subvar ang 768
		randvar tmp 1536
		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
	ifvarn tommysweep 0 { addvar yoffset 15 }
	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
	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
	
ends

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

state shotgunshellstate

	randvar zdist -256
	subvar zdist 768
	ezshootvar zdist NEWSHSHELL
	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
	
	getactor[RETURN].xoffset xoffset
	addvar xoffset -50
	setactor[RETURN].xoffset xoffset
	getplayer[THISACTOR].horiz tmp
	subvar tmp 100
	mulvar tmp 3
	divvar tmp 5
	getactor[RETURN].yoffset yoffset
	addvarvar yoffset tmp
	setactor[RETURN].yoffset yoffset
	getplayer[THISACTOR].ang ang
	addvar ang 768
	randvar tmp 256
	addvarvar ang tmp
	setactor[RETURN].ang ang
	getprojectile[NEWSHSHELL].vel tmp
	randvar tmp 32
	ifvarl tmp 12 { setvar tmp 12 }
	setprojectile[NEWSHSHELL].vel tmp
	
ends


state weapon_processinput

ifvare CURRWEAP 3 
{ 
	ifvarand num 4 
	ifvare tommysweep 0
	ifvare akimbotommysweep 0
	ifvare player[THISACTOR].weapon_pos 0
	ifp palive
	{ 
		getplayer[THISACTOR].kickback_pic tmp
		ifvarand tmp 1 nullop else 
		{
			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 
}
ifvare CURRWEAP 6 ifvare sprayalt 14 ifvare sprayfire 1 { ifvarand num 4 setvar pressfire 1 else setvar pressfire 0 }
ifvare pressfire 0 { setplayer[THISACTOR].kickback_pic 4 setvar SHOOTSPRAY 1 setvar pressfire -1 setvar sprayalt 0 setvar sprayfire 0 }

ends

state weapon_displayroom

ifvare CURRWEAP 2
{ 
	getplayer[THISACTOR].kickback_pic tmp
	ifvare tmp 1 { addvar camerahoriz 2 addvar cameraz -600 }
	ifvare tmp 2 { addvar camerahoriz 1 addvar cameraz -500 }
	ifvare tmp 3 { addvar cameraz -300 }
	ifvare shotgunalt 1 { ifvare tmp 1 { addvar camerahoriz 3 addvar cameraz -600 }
	ifvare tmp 2 { addvar camerahoriz 2 addvar cameraz -500 } ifvare tmp 3 { addvar cameraz -300 } }
	ifvare sgakimbo 1 { ifvare tmp 5 { addvar camerahoriz 2 addvar cameraz -600 }
	ifvare tmp 6 { addvar camerahoriz 1 addvar cameraz -500 }
	ifvare tmp 7 { addvar cameraz -300 } }
	ifvare akimboshotgunalt 1 { addvar camerahoriz 5 addvar cameraz -1200 }
	ifvare akimboshotgunalt 2 { addvar camerahoriz 3 addvar cameraz -1000 }
	ifvare akimboshotgunalt 3 { addvar camerahoriz 1 addvar cameraz -800 }
	ifvare akimboshotgunalt 4 { addvar cameraz -600 }
	ifvare akimboshotgunalt 5 { addvar cameraz -300 }
}
ifvare CURRWEAP 3 
{ 
	getplayer[THISACTOR].kickback_pic tmp
	ifvarand tmp 1 { addvar camerahoriz 1 }
	ifvarand tommysweep 1 { addvar camerahoriz 1 }
}

ends

state weapon_game

ifactor SHOTSPARK1 
ifvare CURRWEAP 0 
ifspawnedby APLAYER
 {  
	getactor[THISACTOR].htg_t 6 tmp //wall hit
	ifvarn tmp -1
	{
	   getwall[tmp].picnum picnum
		switch picnum
			case 151
			case 152
			case 153
			case 154
			case 156
			case 447
			case 448
			case 449
			case 450
			case 457
			case 458
			case 459
			case 469
			case 470
			case 1079
			case 5135
			case 5136
			case 5137
			case 5138
			case 5139
			case 5140
			case 5141
			case 5142
			case 5143
			case 5144
			case 5145
			case 5146
			case 5147
			case 5148
			case 5149
			case 5150
			case 5151
			case 5152
			case 5153
			case 5154
			case 5155
			case 5156
			case 5158
			case 5159
			case 5166
			case 5176
			case 5177
			case 5183
			case 5184
			case 5187
			case 5188
			case 5189
			case 5204
			case 5205
			case 5206
			case 5207
			case 5208
			case 5215
			case 5220
			case 5221
			case 5222
			case 5228
			case 5229
			case 5238
			case 5239
			case 5247
			case 5250
			case 5251
			case 5252
			case 5254
			case 5259
			case 8277
			case 8278
			case 8279
			case 5269
			case 5270
			case 5271
			case 5272
			case 5273
			case 5274
			case 6376
			case 5280
			case 5283
			case 5288
			case 5289
			case 5290
			case 5291
			case 5292
			case 5293
			case 5294
			case 5295
			case 5296
			case 5297
			case 5298
			case 5299
			case 5303
			case 5370
			case 5374
			case 5376
			case 5377
			case 5378
			case 5379
			case 5383
			case 5387
			case 5389
			case 5404
			case 5453
			case 5454
			case 5455
			case 5468
			case 5469
			case 5470
			case 5471
			case 5498
			case 5509
			case 5516
			case 5517
			case 5518
			case 5519
			case 5522
			case 5577
			case 5600
			case 5624
			case 5634
			case 5642
			case 5686
			case 5708
			case 5729
			case 5730
			case 5731
			case 5732
			case 5733
			case 5734
			case 5737
			case 5740
			case 5741
			case 5765
			case 5766
			case 5767
			case 5774
			case 5872
			case 5881
			case 5917
			case 5918
			case 5919
			case 5927
			case 5941
			case 5944
			case 5965
			case 5966
			case 5967
			case 5968
			case 5970
			case 6027
			case 6036
			case 6045
			case 6050
			case 6051
			case 6052
			case 6053
			case 6063
			case 6094
			case 6124
			case 6127
			case 6128
			case 6177
			case 6215
			case 6216
			case 6265
			case 6266
			case 6273
			case 6274
			case 6275
			case 6379
			case 6380
			case 6381
			case 6468
			case 6676
			case 6677
			case 6845
			case 6846
			case 7460
			case 7461
			case 7476
			case 7477
			case 7497
			case 7496
			case 7574
			case 7576
			case 7594
			case 7615
			case 7659
			ifactioncount 1 soundonce PWOOD else stopsound PWOOD
		break
			case 132
			case 133
			case 136
			case 137
			case 138
			case 139
			case 140
			case 141
			case 162
			case 163
			case 164
			case 165
			case 242
			case 5127
			case 5129
			case 5168
			case 5169
			case 518
			case 5179
			case 5197
			case 5198
			case 5199
			case 5284
			case 5285
			case 5286
			case 5287
			case 5320
			case 5321
			case 5325
			case 5328
			case 5381
			case 5382
			case 5431
			case 5432
			case 5445
			case 5450
			case 5451
			case 5452
			case 5583
			case 5584
			case 5585
			case 5586
			case 5587
			case 5588
			case 5589
			case 5590
			case 5605
			case 5614
			case 5615
			case 5625
			case 5626
			case 5643
			case 5644
			case 5645
			case 5646
			case 5647
			case 5648
			case 5649
			case 5650
			case 5651
			case 5652
			case 5653
			case 5654
			case 5655
			case 5656
			case 5657
			case 5658
			case 5659
			case 5660
			case 5661
			case 5662
			case 5663
			case 5664
			case 5665
			case 5666
			case 5667
			case 5668
			case 5669
			case 5670
			case 5671
			case 5672
			case 5673
			case 5674
			case 5675
			case 5676
			case 5677
			case 5678
			case 5679
			case 5680
			case 5681
			case 5682
			case 5683
			case 5684
			case 5685
			case 5735
			case 5775
			case 5828
			case 5835
			case 5836
			case 5865
			case 5873
			case 5878
			case 5892
			case 5943
			case 5955
			case 5964
			case 5974
			case 5975
			case 5976
			case 5977
			case 5978
			case 5979
			case 6025
			case 6068
			case 6077
			case 6081
			case 6088
			case 6089
			case 6090
			case 6091
			case 6092
			case 6093
			case 6102
			case 6103
			case 6164
			case 6166
			case 6167
			case 6168
			case 6169
			case 6175
			case 6176
			case 6180
			case 6184
			case 6185
			case 6190
			case 6191
			case 6192
			case 6193
			case 6194
			case 6195
			case 6196
			case 6197
			case 6200
			case 6210
			case 6211
			case 6217
			case 6218
			case 6285
			case 6286
			case 6472
			case 6473
			case 6474
			case 6573
			case 6581
			case 6821
			case 6822
			case 6823
			case 6824
			case 6825
			case 6826
			case 6827
			case 6829
			case 6828
			case 6830
			case 6831
			case 6832
			case 6833
			case 6834
			case 6835
			case 6836
			case 7415
			case 7424
			case 7425
			case 7438
			case 7440
			case 7441
			case 7442
			case 7443
			case 7582
			case 7583
			case 7592
			case 7596
			case 7597
			case 7599
			case 7600
			case 7601
			case 7602
			case 7603
			case 7604
			case 7605
			case 7606
			case 7607
			case 7608
			case 7609
			case 7613
			case 7666
			case 7667
			case 7668
			case 7669
			case 7670
			case 8660
		    ifactioncount 1 soundonce PMETAL else stopsound PMETAL
		break
			case 134
			case 135
			case 150
			case 155
			case 157
			case 158
			case 159
			case 5120
			case 5121
			case 5122
			case 5123
			case 5124
			case 5125
			case 5126
			case 5128
			case 5131
			case 5132
			case 5133
			case 5134
			case 5157
			case 5163
			case 5164
			case 5165
			case 5167
			case 5180
			case 5181
			case 5182
			case 5185
			case 5190
			case 5191
			case 5192
			case 5194
			case 5200
			case 5201
			case 5202
			case 5203
			case 5209
			case 5210
			case 5211
			case 5212
			case 5213
			case 5214
			case 5216
			case 5217
			case 5218
			case 5219
			case 5223
			case 5227
			case 5230
			case 5231
			case 5234
			case 5235
			case 5236
			case 5237
			case 5242
			case 5248
			case 5253
			case 5263
			case 5275
			case 5300
			case 5301
			case 5302
			case 5304
			case 5305
			case 5306
			case 5310
			case 5311
			case 5312
			case 5313
			case 5314
			case 5315
			case 5316
			case 5317
			case 5318
			case 5322
			case 5323
			case 5324
			case 5326
			case 5327
			case 5329
			case 5330
			case 5331
			case 5332
			case 5333
			case 5334
			case 5335
			case 5336
			case 5337
			case 5338
			case 5339
			case 5340
			case 5341
			case 5342
			case 5343
			case 5344
			case 5345
			case 5346
			case 5347
			case 5348
			case 5349
			case 5369
			case 5373
			case 5375
			case 5392
			case 5393
			case 5394
			case 5395
			case 5396
			case 5397
			case 5398
			case 5399
			case 5400
			case 5401
			case 5402
			case 5403
			case 5405
			case 5406
			case 5407
			case 5408
			case 5409
			case 5410
			case 5411
			case 5412
			case 5413
			case 5414
			case 5415
			case 5416
			case 5417
			case 5418 
			case 5419
			case 5429
			case 5430
			case 5435
			case 5436
			case 5437
			case 5438
			case 5439
			case 5440
			case 5441
			case 5442
			case 5443
			case 5444
			case 5446
			case 5459
			case 5460
			case 5461
			case 5462
			case 5463
			case 5464
			case 5465
			case 5466
			case 5467
			case 5472
			case 5473
			case 5474
			case 5475
			case 5477
			case 5478
			case 5479
			case 5480
			case 5481
			case 5482
			case 5483
			case 5484
			case 5485
			case 5486
			case 5487
			case 5488
			case 5489
			case 5491
			case 5494
			case 5495
			case 5496
			case 5497
			case 5499
			case 5500
			case 5501
			case 5502
			case 5503
			case 5504
			case 5505
			case 5506
			case 5507
			case 5508
			case 5510
			case 5511
			case 5512
			case 5513
			case 5514
			case 5515
			case 5520
			case 5521
			case 5523
			case 5524
			case 5525
			case 5526
			case 5527
			case 5528
			case 5529
			case 5530
			case 5531
			case 5532
			case 5533
			case 5534
			case 5535
			case 5536
			case 5537
			case 5538
			case 5539
			case 5540
			case 5541
			case 5542
			case 5543
			case 5544
			case 5545
			case 5546
			case 5547
			case 5548
			case 5549
			case 5550
			case 5551
			case 5552
			case 5553
			case 5554
			case 5555
			case 5556
			case 5557
			case 5558
			case 5559
			case 5561
			case 5562
			case 5563
			case 5565
			case 5568
			case 5569
			case 5570
			case 5578
			case 5579
			case 5591
			case 5592
			case 5593
			case 5594
			case 5595
			case 5596
			case 5597
			case 5598
			case 5599
			case 5601
			case 5603
			case 5607
			case 5608
			case 5609
			case 5610
			case 5611
			case 5612
			case 5613
			case 5616
			case 5617
			case 5618
			case 5619
			case 5620
			case 5621
			case 5622
			case 5623
			case 5632
			case 5688
			case 5690
			case 5691
			case 5692
			case 5693
			case 5696
			case 5697
			case 5698
			case 5699
			case 5700
			case 5701
			case 5702
			case 5703
			case 5704
			case 5705
			case 5706
			case 5707
			case 5742
			case 5743
			case 5754
			case 5755
			case 5756
			case 5757
			case 5758
			case 5763
			case 5798
			case 5799
			case 5819
			case 5820
			case 5821
			case 5822
			case 5823
			case 5824
			case 5825
			case 5826
			case 5827
			case 5829
			case 5909
			case 5910
			case 5914
			case 5916
			case 5924
			case 5925
			case 5926
			case 5928
			case 5969
			case 6062
			case 6078
			case 6084
			case 6086
			case 6087
			case 6131
			case 6132
			case 6161
			case 6249
			case 6279
			case 6289
			case 6650
			case 6658
			case 6785
			case 6786
			case 6837
			case 6838
			case 6839
			case 7132
			case 7133
			case 7412
			case 7413
			case 7414
			case 7437
			case 7570
			case 7571
			case 7572
			case 7573
			case 7575
			case 7577
			case 7580
			case 7593
			case 7610
			case 7611
			case 7612
			case 7614
			case 7616
			case 7660
			case 7661
			case 7662
			case 7663
			case 7664
			case 7665
			ifactioncount 1 soundonce PSTONE else stopsound PSTONE
		break
		  default
		  ifactioncount 1 soundonce PSTONE else stopsound PSTONE
		break
		endswitch
	} 
	else
	{
		getactor[THISACTOR].htg_t 7 tmp
		ifvarn tmp -1
		{
			getactor[THISACTOR].htg_t 8 tmp //sprite hit
			ifvarn tmp -1
			{
				getactor[tmp].picnum picnum
				switch picnum
				case ZOMBIE
				case HERETIC
				case EVILHAND
				case FATRAT
				case GARGOYLE
				case BUTCHER
				case GREENSLIME
				case NEWBEAST
				case BOSS1
				case BOSS2
				case BOSS3
				case BOSS4
				case PODFEM1
				case FEM1
				case FEM2
				case FEM3
				case FEM4
				case FEM5
				case BLOODYPOLE
				case FEM6
				case FEM7
				case FEM8
				case FEM9
				case FEM6PAD
				case MONK
				case SPACEMARINE
				case LUKE
				case INDY
				case APLAYER
				case SNAKEP
				case DOLPHIN1
				case DOLPHIN2
				case ROBOTDOG2
				case SKINNEDCHICKEN
				case FEATHEREDCHICKEN
				case PIRATEHALF
				case PIRATE1A
				case PIRATE4A
				case PIRATE2A
				case PIRATE3A
				case PIRATE5A
				case PIRATE6A
				ifactioncount 1 soundonce PFLESH else stopsound PFLESH
				ifvare peractor 0 spawn BLOODSPARK1 setvar peractor 1
				break
				default
				ifactioncount 1 soundonce PMETAL else stopsound PMETAL
				break
				endswitch
			} 
			else
			{
				getactor[THISACTOR].htg_t 7 tmp //sector hit ( floors )
				ifvarn tmp -1
				{
					getsector[tmp].floorpicnum picnum
					switch picnum
					  	case 151
						case 152
						case 153
						case 154
						case 156
						case 447
						case 448
						case 449
						case 450
						case 457
						case 458
						case 459
						case 469
						case 470
						case 1079
						case 5135
						case 5136
						case 5137
						case 5138
						case 5139
						case 5140
						case 5141
						case 5142
						case 5143
						case 5144
						case 5145
						case 5146
						case 5147
						case 5148
						case 5149
						case 5150
						case 5151
						case 5152
						case 5153
						case 5154
						case 5155
						case 5156
						case 5158
						case 5159
						case 5166
						case 5176
						case 5177
						case 5183
						case 5184
						case 5187
						case 5188
						case 5189
						case 5204
						case 5205
						case 5206
						case 5207
						case 5208
						case 5215
						case 5220
						case 5221
						case 5222
						case 5228
						case 5229
						case 5238
						case 5239
						case 5247
						case 5250
						case 5251
						case 5252
						case 5254
						case 5259
						case 8277
						case 8278
						case 8279
						case 5269
						case 5270
						case 5271
						case 5272
						case 5273
						case 5274
						case 6376
						case 5280
						case 5283
						case 5288
						case 5289
						case 5290
						case 5291
						case 5292
						case 5293
						case 5294
						case 5295
						case 5296
						case 5297
						case 5298
						case 5299
						case 5303
						case 5370
						case 5374
						case 5376
						case 5377
						case 5378
						case 5379
						case 5383
						case 5387
						case 5389
						case 5404
						case 5453
						case 5454
						case 5455
						case 5468
						case 5469
						case 5470
						case 5471
						case 5498
						case 5509
						case 5516
						case 5517
						case 5518
						case 5519
						case 5522
						case 5577
						case 5600
						case 5624
						case 5634
						case 5642
						case 5686
						case 5708
						case 5729
						case 5730
						case 5731
						case 5732
						case 5733
						case 5734
						case 5737
						case 5740
						case 5741
						case 5765
						case 5766
						case 5767
						case 5774
						case 5872
						case 5881
						case 5917
						case 5918
						case 5919
						case 5927
						case 5941
						case 5944
						case 5965
						case 5966
						case 5967
						case 5968
						case 5970
						case 6027
						case 6036
						case 6045
						case 6050
						case 6051
						case 6052
						case 6053
						case 6063
						case 6094
						case 6124
						case 6127
						case 6128
						case 6177
						case 6215
						case 6216
						case 6265
						case 6266
						case 6273
						case 6274
						case 6275
						case 6379
						case 6380
						case 6381
						case 6468
						case 6676
						case 6677
						case 6845
						case 6846
						case 7460
						case 7461
						case 7476
						case 7477
						case 7497
						case 7496
						case 7574
						case 7576
						case 7594
						case 7615
						case 7659
						ifactioncount 1 soundonce PWOOD else stopsound PWOOD
					break
						case 132
						case 133
						case 136
						case 137
						case 138
						case 139
						case 140
						case 141
						case 162
						case 163
						case 164
						case 165
						case 242
						case 5127
						case 5129
						case 5168
						case 5169
						case 518
						case 5179
						case 5197
						case 5198
						case 5199
						case 5284
						case 5285
						case 5286
						case 5287
						case 5320
						case 5321
						case 5325
						case 5328
						case 5381
						case 5382
						case 5431
						case 5432
						case 5445
						case 5450
						case 5451
						case 5452
						case 5583
						case 5584
						case 5585
						case 5586
						case 5587
						case 5588
						case 5589
						case 5590
						case 5605
						case 5614
						case 5615
						case 5625
						case 5626
						case 5643
						case 5644
						case 5645
						case 5646
						case 5647
						case 5648
						case 5649
						case 5650
						case 5651
						case 5652
						case 5653
						case 5654
						case 5655
						case 5656
						case 5657
						case 5658
						case 5659
						case 5660
						case 5661
						case 5662
						case 5663
						case 5664
						case 5665
						case 5666
						case 5667
						case 5668
						case 5669
						case 5670
						case 5671
						case 5672
						case 5673
						case 5674
						case 5675
						case 5676
						case 5677
						case 5678
						case 5679
						case 5680
						case 5681
						case 5682
						case 5683
						case 5684
						case 5685
						case 5735
						case 5775
						case 5828
						case 5835
						case 5836
						case 5865
						case 5873
						case 5878
						case 5892
						case 5943
						case 5955
						case 5964
						case 5974
						case 5975
						case 5976
						case 5977
						case 5978
						case 5979
						case 6025
						case 6068
						case 6077
						case 6081
						case 6088
						case 6089
						case 6090
						case 6091
						case 6092
						case 6093
						case 6102
						case 6103
						case 6164
						case 6166
						case 6167
						case 6168
						case 6169
						case 6175
						case 6176
						case 6180
						case 6184
						case 6185
						case 6190
						case 6191
						case 6192
						case 6193
						case 6194
						case 6195
						case 6196
						case 6197
						case 6200
						case 6210
						case 6211
						case 6217
						case 6218
						case 6285
						case 6286
						case 6472
						case 6473
						case 6474
						case 6573
						case 6581
						case 6821
						case 6822
						case 6823
						case 6824
						case 6825
						case 6826
						case 6827
						case 6829
						case 6828
						case 6830
						case 6831
						case 6832
						case 6833
						case 6834
						case 6835
						case 6836
						case 7415
						case 7424
						case 7425
						case 7438
						case 7440
						case 7441
						case 7442
						case 7443
						case 7582
						case 7583
						case 7592
						case 7596
						case 7597
						case 7599
						case 7600
						case 7601
						case 7602
						case 7603
						case 7604
						case 7605
						case 7606
						case 7607
						case 7608
						case 7609
						case 7613
						case 7666
						case 7667
						case 7668
						case 7669
						case 7670
						case 8660
						ifactioncount 1 soundonce PMETAL else stopsound PMETAL
					break
						case 134
						case 135
						case 150
						case 155
						case 157
						case 158
						case 159
						case 5120
						case 5121
						case 5122
						case 5123
						case 5124
						case 5125
						case 5126
						case 5128
						case 5131
						case 5132
						case 5133
						case 5134
						case 5157
						case 5163
						case 5164
						case 5165
						case 5167
						case 5180
						case 5181
						case 5182
						case 5185
						case 5190
						case 5191
						case 5192
						case 5194
						case 5200
						case 5201
						case 5202
						case 5203
						case 5209
						case 5210
						case 5211
						case 5212
						case 5213
						case 5214
						case 5216
						case 5217
						case 5218
						case 5219
						case 5223
						case 5227
						case 5230
						case 5231
						case 5234
						case 5235
						case 5236
						case 5237
						case 5242
						case 5248
						case 5253
						case 5263
						case 5275
						case 5300
						case 5301
						case 5302
						case 5304
						case 5305
						case 5306
						case 5310
						case 5311
						case 5312
						case 5313
						case 5314
						case 5315
						case 5316
						case 5317
						case 5318
						case 5322
						case 5323
						case 5324
						case 5326
						case 5327
						case 5329
						case 5330
						case 5331
						case 5332
						case 5333
						case 5334
						case 5335
						case 5336
						case 5337
						case 5338
						case 5339
						case 5340
						case 5341
						case 5342
						case 5343
						case 5344
						case 5345
						case 5346
						case 5347
						case 5348
						case 5349
						case 5369
						case 5373
						case 5375
						case 5392
						case 5393
						case 5394
						case 5395
						case 5396
						case 5397
						case 5398
						case 5399
						case 5400
						case 5401
						case 5402
						case 5403
						case 5405
						case 5406
						case 5407
						case 5408
						case 5409
						case 5410
						case 5411
						case 5412
						case 5413
						case 5414
						case 5415
						case 5416
						case 5417
						case 5418 
						case 5419
						case 5429
						case 5430
						case 5435
						case 5436
						case 5437
						case 5438
						case 5439
						case 5440
						case 5441
						case 5442
						case 5443
						case 5444
						case 5446
						case 5459
						case 5460
						case 5461
						case 5462
						case 5463
						case 5464
						case 5465
						case 5466
						case 5467
						case 5472
						case 5473
						case 5474
						case 5475
						case 5477
						case 5478
						case 5479
						case 5480
						case 5481
						case 5482
						case 5483
						case 5484
						case 5485
						case 5486
						case 5487
						case 5488
						case 5489
						case 5491
						case 5494
						case 5495
						case 5496
						case 5497
						case 5499
						case 5500
						case 5501
						case 5502
						case 5503
						case 5504
						case 5505
						case 5506
						case 5507
						case 5508
						case 5510
						case 5511
						case 5512
						case 5513
						case 5514
						case 5515
						case 5520
						case 5521
						case 5523
						case 5524
						case 5525
						case 5526
						case 5527
						case 5528
						case 5529
						case 5530
						case 5531
						case 5532
						case 5533
						case 5534
						case 5535
						case 5536
						case 5537
						case 5538
						case 5539
						case 5540
						case 5541
						case 5542
						case 5543
						case 5544
						case 5545
						case 5546
						case 5547
						case 5548
						case 5549
						case 5550
						case 5551
						case 5552
						case 5553
						case 5554
						case 5555
						case 5556
						case 5557
						case 5558
						case 5559
						case 5561
						case 5562
						case 5563
						case 5565
						case 5568
						case 5569
						case 5570
						case 5578
						case 5579
						case 5591
						case 5592
						case 5593
						case 5594
						case 5595
						case 5596
						case 5597
						case 5598
						case 5599
						case 5601
						case 5603
						case 5607
						case 5608
						case 5609
						case 5610
						case 5611
						case 5612
						case 5613
						case 5616
						case 5617
						case 5618
						case 5619
						case 5620
						case 5621
						case 5622
						case 5623
						case 5632
						case 5688
						case 5690
						case 5691
						case 5692
						case 5693
						case 5696
						case 5697
						case 5698
						case 5699
						case 5700
						case 5701
						case 5702
						case 5703
						case 5704
						case 5705
						case 5706
						case 5707
						case 5742
						case 5743
						case 5754
						case 5755
						case 5756
						case 5757
						case 5758
						case 5763
						case 5798
						case 5799
						case 5819
						case 5820
						case 5821
						case 5822
						case 5823
						case 5824
						case 5825
						case 5826
						case 5827
						case 5829
						case 5909
						case 5910
						case 5914
						case 5916
						case 5924
						case 5925
						case 5926
						case 5928
						case 5969
						case 6062
						case 6078
						case 6084
						case 6086
						case 6087
						case 6131
						case 6132
						case 6161
						case 6249
						case 6279
						case 6289
						case 6650
						case 6658
						case 6785
						case 6786
						case 6837
						case 6838
						case 6839
						case 7132
						case 7133
						case 7412
						case 7413
						case 7414
						case 7437
						case 7570
						case 7571
						case 7572
						case 7573
						case 7575
						case 7577
						case 7580
						case 7593
						case 7610
						case 7611
						case 7612
						case 7614
						case 7616
						case 7660
						case 7661
						case 7662
						case 7663
						case 7664
						case 7665
						ifactioncount 1 soundonce PSTONE else stopsound PSTONE
					break
					endswitch
				 }
			}
		}
	}
}

ifvare CURRWEAP 2 { ifvarg player[THISACTOR].kickback_pic 12 { setvar shotgunaltdisplay 0 stopsound EJECT_CLIP	stopsound INSERT_CLIP } }
ifactor REMOTEBUNDLE
{
	getplayer[THISACTOR].hbomb_on hbomb_on
	ifvare hbomb_on 0
	{ 
	spawn EXPLOSION4 
	quake 26
	setvar hbomb_on 1
	hitradius 2048 60 100 160 300
	globalsound EXPLODCM
	debris SCRAP2 3 
	killit 
	}
}
ifactor HEAVYHBOMB { ifspawnedby APLAYER killit }

ifactor HELLSTAFF
{
	getactor[THISACTOR].hitag HITAGSAVED
	ifvare HITAGSAVED 1
	{
		getactor[THISACTOR].htextra htextra
		ifvarg htextra 0 
		{
			addvar COUNTER 1
			ifvare COUNTER 1 { subvarvar hellextra htextra }
			
			getactor[THISACTOR].x px
			getactor[THISACTOR].y py
			getactor[THISACTOR].z pz
			getactor[THISACTOR].sectnum psector
			getactor[THISACTOR].ang pang
			cos mycos pang
			sin mysin pang
			hitscan px py pz psector mycos mysin 0 HITSECTOR HITWALL HITSPRITE HITX HITY HITZ 0 //4294901808
		
			subvarvar HITX px
			subvarvar HITY py
			mulvarvar HITX HITX
			mulvarvar HITY HITY
			addvarvar HITX HITY
			sqrt HITX WALLDIST
			
			getactor[THISACTOR].htang a
			setactor[THISACTOR].ang a

			ifvarl WALLDIST 220 ifvare peractor 0 
			{ 
				getwall[HITWALL].x wallx
				getwall[HITWALL].y wally
				getwall[HITWALL].point2 wallid
				getwall[wallid].x wallx2
				getwall[wallid].y wally2
				subvarvar wallx wallx2
				subvarvar wally wally2
				getangle wallang wallx wally
				getactor[THISACTOR].ang ang
				shiftvarl wallang 1
				subvarvar wallang ang
				andvar wallang 2047
				setactor[THISACTOR].htang wallang
				divvar htextra 2
				setvar peractor 1 
			}
			
			cos x a
			sin y a
			setvarvar tmp htextra
			divvar tmp 4
			subvarvar tmp COUNTER
			ifvarl tmp 0 setvar tmp 0	
			mulvarvar x tmp                
			mulvarvar y tmp
			shiftvarr x 8
			shiftvarr y 8
			setvar z 0
			movesprite THISACTOR x y z CLIPMASK0 RETURN
			ifvare tmp 0 { setactor[THISACTOR].htextra 0 setvar COUNTER 0 setvar peractor 0 }
		}
	}
}

ends

state weapon_egs

getactor[THISACTOR].picnum picnum
	switch picnum
		case HEAVYHBOMB
		ifvare WEAPON_VAR_TNT 1
		{
			ifp palive setvar SHOOTTNT 1
		}
		ifvare WEAPON_VAR_TNT 2
		{
			ifp palive setvar SHOOTTNT 2
		}
		ifvare WEAPON_VAR_TNT 3
		{
			ifp palive setvar SHOOTTNT 3
		}
		break
		case TNTFLOOR
		ifvare TNTFLOORALT 1 { setactor[THISACTOR].pal 30 setvar TNTFLOORALT 0 }
		break
		case SPRAYFLOOR
		ifvare SPRAYFLOORALT 1 { setactor[THISACTOR].pal 30 setvar pressfire -1 setvar SPRAYFLOORALT 0 }
		break
	endswitch
	
ends

onevent EVENT_QUICKKICK
setvar RETURN -1
ifvare CURRWEAP 1
{
	ifvare flarealt 0
	ifvare player[THISACTOR].weapon_pos 0
	ifp palive
	{
		getplayer[THISACTOR].kickback_pic temp
		getplayer[THISACTOR].ammo_amount 1 ammo
		ifvare temp 0
		ifvarg ammo 7
		{
			setplayer[THISACTOR].kickback_pic 1 
			setvar flarealt 1
		}
	}
}
ifvare CURRWEAP 2
{
	ifvare shotgunalt 0
	ifvare akimboshotgunalt 0
	ifvare player[THISACTOR].weapon_pos 0
	ifp palive
	{
		getplayer[THISACTOR].kickback_pic temp
		ifvare temp 0
		{
			getplayer[THISACTOR].ammo_amount 2 SHOTGUNAMMO
			ifvarg SHOTGUNAMMO 0 
			{
			ifvarl sgakimbo 1 { setvar shotgunalt 1 setplayer[THISACTOR].kickback_pic 1 setvar shotgunaltdisplay 1 } else ifvarg SHOTGUNAMMO 3 setvar akimboshotgunalt 1
			}
		}
	}
}
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 } }
		}
	}
}
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
		}
	}
}
ifvare CURRWEAP 5
{
    ifvare WEAPON_VAR_TNT 1
	{
		ifvare tntalt 0
		ifvare player[THISACTOR].weapon_pos 0
		ifp palive
		{
			ifvare player[THISACTOR].kickback_pic 0
			{
				getplayer[THISACTOR].ammo_amount 5 temp
				ifvarg temp 0 { setvar tntalt 1 }
			}
		} else
		ifvare tntalt 14
		{
		setplayer[THISACTOR].kickback_pic 22
		setprojectile[TNTBUNDLE].vel 0
		setvar TNTFLOORALT 1
		eshoot TNTBUNDLE
		setactorvar[RETURN].detonatetime dtime
		subvar TNT_AMMOAMOUNT 1
		setvar tntalt 0
		setvar dtime 0
		setprojectile[TNTBUNDLE].vel 512
		}
	}
	ifvare WEAPON_VAR_TNT 2
	{
		ifvare proxialt 0
		ifvare player[THISACTOR].weapon_pos 0
		ifp palive
		{
			ifvare player[THISACTOR].kickback_pic 0
			{
				setvar proxialt 1 
				setplayer[THISACTOR].kickback_pic 22
				setprojectile[PROXIMITYBUNDLE].vel 0
				eshoot PROXIMITYBUNDLE
				subvar PROXIMITYMINE_AMMOAMOUNT 1
				setvar proxialt 0
				setprojectile[PROXIMITYBUNDLE].vel 512
			}
		}
	}
	ifvare WEAPON_VAR_TNT 3
	{
		ifvare remotealt 0
		ifvare player[THISACTOR].weapon_pos 0
		ifp palive
		{
			ifvare player[THISACTOR].kickback_pic 0
			{
				setvar remotealt 1 
				setplayer[THISACTOR].hbomb_on 1
				setplayer[THISACTOR].kickback_pic 22
				setprojectile[REMOTEBUNDLE].vel 0
				eshoot REMOTEBUNDLE
				subvar REMOTETNT_AMMOAMOUNT 1
				setvar remotealt 0
				setprojectile[REMOTEBUNDLE].vel 512
			}
		}
	}
}
ifvare CURRWEAP 6
{
		ifvare sprayalt 0
		ifvare pressfire -1
		ifvare player[THISACTOR].weapon_pos 0
		ifp palive
		{
			ifvare player[THISACTOR].kickback_pic 0
			{
				getplayer[THISACTOR].ammo_amount 6 temp
				ifvarg temp 47 { setvar sprayalt 1 }
			}
		} else
		ifvare sprayalt 14
		{
		setplayer[THISACTOR].kickback_pic 9
		setprojectile[SPRAYBUNDLE].vel 0
		setvar SPRAYFLOORALT 1
		eshoot SPRAYBUNDLE
		setactorvar[RETURN].detonatetime dtime
		getplayer[THISACTOR].ammo_amount 6 tmp
		subvar tmp 48
		setplayer[THISACTOR].ammo_amount 6 tmp
		setvar sprayalt 0
		setvar pressfire 2
		setvar dtime 0
		setprojectile[SPRAYBUNDLE].vel 512
		}
}
ifvare CURRWEAP 7
{
	ifvare teslaalt 0
	ifvare akimboteslaalt 0
	ifvare player[THISACTOR].weapon_pos 0
	ifp palive
	{
		getplayer[THISACTOR].kickback_pic temp
		ifvare temp 0
		{
			getplayer[THISACTOR].ammo_amount 7 tmp
			ifvarg tmp 35 
			{ 
				ifvare tsakimbo 0 { setvar teslaalt 1 } else 
				ifvare tsakimbo 1 
				{
					ifvarg tmp 70 { setvar akimboteslaalt 1 } else { setvar tsakimbo 0 setvar teslaalt 1 }
				}
			}
		}
	}
}
ifvare CURRWEAP 8
{
	ifvare player[THISACTOR].weapon_pos 0
	ifp palive
	{
		getplayer[THISACTOR].kickback_pic temp
		ifvare temp 0
		{
			espawn HELLSTAFF
			setvarvar HELLSTAFFID RETURN
			globalsound TNTTOSS
			setactor[RETURN].cstat 257
			setactor[RETURN].hitag 1
			getplayer[THISACTOR].i r0
			setactorvar[RETURN].friend_id r0
			getplayer[THISACTOR].ammo_amount 8 tmp
			ifvarl tmp 25
			{
			sound DUKE_LONGTERM_PAIN 
			setvar tmp2 25
			subvarvar tmp2 tmp
			mulvar tmp2 2
			getactor[r0].extra extra
			subvarvar extra tmp2
			setactor[r0].extra extra
			setactor[RETURN].lotag 25
			} else { setactor[RETURN].lotag tmp }
			setvar changeweappos 5
			setplayer[THISACTOR].weapon_pos -1 
			setplayer[THISACTOR].ammo_amount 8 0
			setplayer[THISACTOR].gotweapon 8 0
		}
	}
}
ifvare CURRWEAP 9
{
	ifvare voodooalt 0
	ifvare player[THISACTOR].weapon_pos 0
	ifp palive
	{
		getplayer[THISACTOR].kickback_pic temp
		ifvare temp 0
		{
			getplayer[THISACTOR].ammo_amount 9 tmp
			ifvarg tmp 0 { setvar voodooalt 1 }
		}
	}
}
endevent

state pitchforkdisplay
getsector[THISACTOR].floorshade shade
 switch weaponcount
 case 0
 case 1
 case 14
	setvar xweapon 159
	setvar yweapon 179
	setvar tilenumweapon PITCHFORK
	addvar tilenumweapon 0
	state hudcoordfix addvar yweapon 65
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
break
case 2
	setvar xweapon 157
	setvar yweapon 171
	setvar tilenumweapon PITCHFORK
	addvar tilenumweapon 1
	state hudcoordfix addvar yweapon 65
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
break
case 3
	setvar xweapon 157
	setvar yweapon 161
	setvar tilenumweapon PITCHFORK
	addvar tilenumweapon 2
	state hudcoordfix addvar yweapon 65
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
break
case 4
case 5
case 6
	setvar xweapon 156
	setvar yweapon 160
	setvar tilenumweapon PITCHFORK
	addvar tilenumweapon 2
	state hudcoordfix addvar yweapon 65
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
break
case 7
case 8
case 9
	setvar xweapon 158
	setvar yweapon 167
	setvar tilenumweapon PITCHFORK
	addvar tilenumweapon 2
	state hudcoordfix addvar yweapon 65
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
break
case 10
case 11
	setvar xweapon 158
	setvar yweapon 171
	setvar tilenumweapon PITCHFORK
	addvar tilenumweapon 1
	state hudcoordfix addvar yweapon 65
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
break
case 12
case 13
	setvar xweapon 159
	setvar yweapon 178
	setvar tilenumweapon PITCHFORK
	addvar tilenumweapon 1
	state hudcoordfix addvar yweapon 65
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
break
endswitch

ends

state flareakimbodisplay
 switch weaponcount
	case 0
	setvar xweapon 60
	setvar yweapon 240
	state hudcoordfix
	ifvarn flakimbo 0 ifvarn flakimbo 1
	{
		setvarvar temp flakimbo
		ifvarl flakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	setvar tilenumweapon FLAREGUN
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 120
	setvar yweapon 240
	state hudcoordfix
	addvar xweapon 120
	ifvarn flakimbo 0 ifvarn flakimbo 1
	{
		setvarvar temp flakimbo
		ifvarl flakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	break
	case 1
    case 2
    case 3
	setvar xweapon 60
	setvar yweapon 240
	state hudcoordfix
	ifvarn flakimbo 0 ifvarn flakimbo 1
	{
		setvarvar temp flakimbo
		ifvarl flakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	setvar tilenumweapon FLAREGUN
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    setvar xweapon 120
    setvar yweapon 235
	state hudcoordfix
	addvar xweapon 120
	ifvarn flakimbo 0 ifvarn flakimbo 1
	{
		setvarvar temp flakimbo
		ifvarl flakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 0
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 4
		{
		 setvar xweapon 105
   		 setvar yweapon 209
		 state hudcoordfix
		 addvar xweapon 120
		 ifvarn flakimbo 0 ifvarn flakimbo 1
		 {
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp -6
			addvarvar xweapon temp
		 }
   		 setvar tilenumweapon FLAREGUN
   		 addvar tilenumweapon 1
		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		}
    break
    case 4
    case 5
    case 6
	setvar xweapon 60
    setvar yweapon 235
	state hudcoordfix
	ifvarn flakimbo 0 ifvarn flakimbo 1
		{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp 6
			addvarvar yweapon temp
		}
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 0
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		ifvarl weaponcount 7
		{
		 setvar xweapon 75
   		 setvar yweapon 209
		 state hudcoordfix
		 ifvarn flakimbo 0 ifvarn flakimbo 1
		 {
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp 6
			addvarvar yweapon temp
		 }
   		 setvar tilenumweapon FLAREGUN
   		 addvar tilenumweapon 1
		 ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		}
    setvar xweapon 120
    setvar yweapon 235
    state hudcoordfix
	addvar xweapon 120
	ifvarn flakimbo 0 ifvarn flakimbo 1
	{
		setvarvar temp flakimbo
		ifvarl flakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 0
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvare weaponcount 5
		{
		setvar xweapon 94
		setvar yweapon 127
		ifvare hudtype 0 { subvarvar yweapon 22 }
		addvar xweapon 120
		ifvarn flakimbo 0 ifvarn flakimbo 1
		{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp -6
			addvarvar xweapon temp
		}
 		myospal xweapon yweapon 8277 shade orientationweapon palweapon
		}
		ifvarl weaponcount 7
		{
		 setvar xweapon 95
   		 setvar yweapon 210
		 state hudcoordfix
		 addvar xweapon 120
		 ifvarn flakimbo 0 ifvarn flakimbo 1
			{
				setvarvar temp flakimbo
				ifvarl flakimbo -1 
				{ 
					mulvar temp -1 
					setvar tempb 10
					subvarvar tempb temp 
					setvarvar temp tempb 
				}
				mulvar temp -6
				addvarvar xweapon temp
			}
   		 setvar tilenumweapon FLAREGUN
   		 addvar tilenumweapon 2
		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		}
    break
    case 7
    case 8
    case 9
	setvar xweapon 60
    setvar yweapon 235
    state hudcoordfix
	ifvarn flakimbo 0 ifvarn flakimbo 1
	{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp 6
			addvarvar yweapon temp
	}
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 0
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		ifvare weaponcount 8
		{
		setvar xweapon 114
		setvar yweapon 127
		ifvare hudtype 0 { subvarvar yweapon 22 }
		ifvarn flakimbo 0 ifvarn flakimbo 1
		{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp 6
			addvarvar yweapon temp
		}
 		myospal xweapon yweapon 8277 shade orientationweapon palweapon
		}
		ifvarl weaponcount 10
		{
		 setvar xweapon 85
   		 setvar yweapon 210
		 state hudcoordfix
		 ifvarn flakimbo 0 ifvarn flakimbo 1
		 {
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp 6
			addvarvar yweapon temp
		 }
   		 setvar tilenumweapon FLAREGUN
   		 addvar tilenumweapon 2
		 ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		}
    setvar xweapon 135
    setvar yweapon 215
	state hudcoordfix
	addvar xweapon 120
	ifvarn flakimbo 0 ifvarn flakimbo 1
		{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp -6
			addvarvar xweapon temp
		}
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 3
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 10
		{
		setvar xweapon 90
		setvar yweapon 132
		ifvare hudtype 0 { subvarvar yweapon 22 }
		addvar xweapon 120
		ifvarn flakimbo 0 ifvarn flakimbo 1
		{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp -6
			addvarvar xweapon temp
		}
 		myospal xweapon yweapon 8278 shade orientationweapon palweapon
		}
    break
    case 10
    case 11
    case 12
		ifvarl weaponcount 13
		{
		setvar xweapon 145
		setvar yweapon 132
		ifvare hudtype 0 { subvarvar yweapon 22 }
		 ifvarn flakimbo 0 ifvarn flakimbo 1
		 {
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp 6
			addvarvar yweapon temp
		 }
 		myospal xweapon yweapon 8278 shade orientationweapon palweapon
		}
	setvar xweapon 75
    setvar yweapon 215
	state hudcoordfix
	ifvarn flakimbo 0 ifvarn flakimbo 1
	{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp 6
			addvarvar yweapon temp
	}
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 3
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim	
    setvar xweapon 142
    setvar yweapon 224
	state hudcoordfix
	addvar xweapon 120
	ifvarn flakimbo 0 ifvarn flakimbo 1
		{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp -6
			addvarvar xweapon temp
		}
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 3
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 13
		{
		setvar xweapon 75
		setvar yweapon 126
		ifvare hudtype 0 { subvarvar yweapon 22 }
		addvar xweapon 120
		ifvarn flakimbo 0 ifvarn flakimbo 1
		{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp -6
			addvarvar xweapon temp
		}
 		myospal xweapon yweapon 8279 shade orientationweapon palweapon
		}
    break
    case 13
    case 14
    case 15
	setvar xweapon 82
    setvar yweapon 224
	state hudcoordfix
	ifvarn flakimbo 0 ifvarn flakimbo 1
	{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp 6
			addvarvar yweapon temp
	}
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 3
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		ifvarl weaponcount 16
		{
		setvar xweapon 145
		setvar yweapon 126
		ifvare hudtype 0 { subvarvar yweapon 22 }
		ifvarn flakimbo 0 ifvarn flakimbo 1
		{
				setvarvar temp flakimbo
				ifvarl flakimbo -1 
				{ 
					mulvar temp -1 
					setvar tempb 10
					subvarvar tempb temp 
					setvarvar temp tempb 
				}
				mulvar temp 6
				addvarvar yweapon temp
		}
 		myospal xweapon yweapon 8279 shade orientationweapon palweapon
		}
    setvar xweapon 130
    setvar yweapon 230
    state hudcoordfix
	addvar xweapon 120
	ifvarn flakimbo 0 ifvarn flakimbo 1
		{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp -6
			addvarvar xweapon temp
		}
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 4
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 16
	case 17
	case 18
	setvar xweapon 70
    setvar yweapon 230
    state hudcoordfix
	ifvarn flakimbo 0 ifvarn flakimbo 1
	{
			setvarvar temp flakimbo
			ifvarl flakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp 6
			addvarvar yweapon temp
	}
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 4
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 120
	setvar yweapon 240
	state hudcoordfix
	addvar xweapon 120
	ifvarn flakimbo 0 ifvarn flakimbo 1
	{
		setvarvar temp flakimbo
		ifvarl flakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
 endswitch

ends


state flaregundisplay
 switch weaponcount
    case 0
    setvar xweapon 210
    setvar yweapon 240
	state hudcoordfix
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 1
    case 2
    case 3
    setvar xweapon 220
    setvar yweapon 235
	state hudcoordfix
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 4
		{
		 setvar xweapon 205
   		 setvar yweapon 209
		 state hudcoordfix
   		 setvar tilenumweapon FLAREGUN
   		 addvar tilenumweapon 1
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    break
    case 4
    case 5
    case 6
    setvar xweapon 220
    setvar yweapon 235
    state hudcoordfix
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 0
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvare weaponcount 5
		{
		setvar xweapon 194
		setvar yweapon 127
		ifvare hudtype 0 { subvarvar yweapon 22 }
 		myospal 194 127 8277 shade orientationweapon palweapon
		}
		ifvarl weaponcount 7
		{
		 setvar xweapon 195
   		 setvar yweapon 210
		 state hudcoordfix
   		 setvar tilenumweapon FLAREGUN
   		 addvar tilenumweapon 2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    break
    case 7
    case 8
    case 9
    setvar xweapon 235
    setvar yweapon 215
	state hudcoordfix
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 3
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 10
		{
		setvar xweapon 190
		setvar yweapon 132
		ifvare hudtype 0 { subvarvar yweapon 22 }
 		myospal xweapon yweapon 8278 shade orientationweapon palweapon
		}
    break
    case 10
    case 11
    case 12
    setvar xweapon 242
    setvar yweapon 224
	state hudcoordfix
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 3
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 13
		{
		setvar xweapon 175
		setvar yweapon 126
		ifvare hudtype 0 { subvarvar yweapon 22 }
 		myospal xweapon yweapon 8279 shade orientationweapon palweapon
		}
    break
    case 13
    case 14
    case 15
    setvar xweapon 230
    setvar yweapon 230
    state hudcoordfix
    setvar tilenumweapon FLAREGUN
    addvar tilenumweapon 4
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
 endswitch
ends

state akimboshotgunaltdisplay
switch akimboshotgunalt
	case 0
	setvar xweapon 60
	setvar yweapon 250
	state hudcoordfix
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}

	setvar tilenumweapon BLSHOTGUN
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon -22
	addvar yweapon 12
   	rotatesprite xweapon yweapon 65536 1024 7751 shade palweapon 4 0 0 xdim ydim
	addvar xweapon 42
	addvar yweapon -5
	rotatesprite xweapon yweapon 65536 1024 7750 shade palweapon 4 0 0 xdim ydim

	setvar xweapon 120
	setvar yweapon 250
	state hudcoordfix
	addvar xweapon 120
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	addvar xweapon -21
	addvar yweapon 8
   	myospal xweapon yweapon 7750 shade orientationweapon palweapon
	addvar xweapon 42
	addvar yweapon 3
	myospal xweapon yweapon 7751 shade orientationweapon palweapon
	break
	case 1
    case 2
	ifvarl weaponcount 3
	{
		setvar xweapon 223
		setvar yweapon 150
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8277 shade orientationweapon palweapon
	}
    setvar xweapon 185
    setvar yweapon 265
	state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	ifvarl weaponcount 3
	{
		setvar xweapon 181
   		setvar yweapon 238
		state hudcoordfix
   		setvar tilenumweapon BLSHOTGUN
   		addvar tilenumweapon 3
	   	addvar xweapon 55
		ifvarn sgakimbo 0 ifvarn sgakimbo 1
		{
			setvarvar temp sgakimbo
			ifvarl sgakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp -6
			addvarvar xweapon temp
		}
		rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	}
	ifvarl weaponcount 3
	{
		setvar xweapon 103
		setvar yweapon 150
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8277 shade orientationweapon palweapon
	}
	setvar xweapon 185
    setvar yweapon 265
	state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	ifvarl weaponcount 3
	{
		setvar xweapon 189
   		setvar yweapon 238
		state hudcoordfix
   		setvar tilenumweapon BLSHOTGUN
   		addvar tilenumweapon 3
		addvar xweapon -120
	    ifvarn sgakimbo 0 ifvarn sgakimbo 1
		{
			setvarvar temp sgakimbo
			ifvarl sgakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp 6
			addvarvar yweapon temp
		}
		ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	}
    break
    case 3
    case 4
	ifvarl weaponcount 5
	{
		setvar xweapon 221
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8278 shade orientationweapon palweapon
	}
    setvar xweapon 190
    setvar yweapon 285
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	ifvarl weaponcount 5
	{
		setvar xweapon 114
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8278 shade orientationweapon palweapon
	}
	setvar xweapon 190
    setvar yweapon 285
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
    case 5
    case 6
	ifvarl weaponcount 7
	{
		setvar xweapon 224
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8279 shade orientationweapon palweapon
	}
    setvar xweapon 187
    setvar yweapon 300
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	ifvarl weaponcount 7
	{
		setvar xweapon 115
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8279 shade orientationweapon palweapon
	}
	setvar xweapon 187
    setvar yweapon 300
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
    case 7
    case 8
    setvar xweapon 185
    setvar yweapon 320
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	
	setvar xweapon 185
    setvar yweapon 320
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
    case 9
    case 10
	case 11
	case 12
    setvar xweapon 183
    setvar yweapon 320
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	
	setvar xweapon 183
    setvar yweapon 320
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 13
    case 14
    setvar xweapon 185
    setvar yweapon 300
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	
	
	setvar xweapon 180
    setvar yweapon 300
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break	
	case 15
    case 16
    setvar xweapon 185
    setvar yweapon 290
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	
	
	setvar xweapon 180
    setvar yweapon 290
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 17
    case 18
    setvar xweapon 185
    setvar yweapon 280
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	
	
	setvar xweapon 180
    setvar yweapon 280
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break	
	case 19
    case 20
    setvar xweapon 185
    setvar yweapon 270
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	
	
	setvar xweapon 180
    setvar yweapon 270
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break	
	case 21
    case 22
    setvar xweapon 185
    setvar yweapon 260
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	
	
	setvar xweapon 180
    setvar yweapon 260
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break	
	case 23
    case 24
    setvar xweapon 185
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	
	
	setvar xweapon 180
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break	
 endswitch
ends

state shotgunakimbodisplay
ifvarn akimboshotgunalt 0 { state akimboshotgunaltdisplay break }
 switch weaponcount
	case 0
	setvar xweapon 60
	setvar yweapon 250
	state hudcoordfix
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}

	setvar tilenumweapon BLSHOTGUN
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon -22
	addvar yweapon 12
   	rotatesprite xweapon yweapon 65536 1024 7751 shade palweapon 4 0 0 xdim ydim
	addvar xweapon 42
	addvar yweapon -5
	rotatesprite xweapon yweapon 65536 1024 7750 shade palweapon 4 0 0 xdim ydim

	setvar xweapon 120
	setvar yweapon 250
	state hudcoordfix
	addvar xweapon 120
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	addvar xweapon -21
	addvar yweapon 8
   	myospal xweapon yweapon 7750 shade orientationweapon palweapon
	addvar xweapon 42
	addvar yweapon 3
	myospal xweapon yweapon 7751 shade orientationweapon palweapon
	break
	case 1
    case 2
	ifvarl weaponcount 3
	{
		setvar xweapon 223
		setvar yweapon 150
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8277 shade orientationweapon palweapon
	}
    setvar xweapon 185
    ifvare shotgunaltdisplay 0 { setvar yweapon 255 } else setvar yweapon 265
	state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 3
		{
		 setvar xweapon 180
   		 setvar yweapon 229
		 state hudcoordfix
   		 setvar tilenumweapon BLSHOTGUN
   		 addvar tilenumweapon 3
		 addvar xweapon 55
		 ifvarn sgakimbo 0 ifvarn sgakimbo 1
		 {
			setvarvar temp sgakimbo
			ifvarl sgakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp -6
			addvarvar xweapon temp
		 }
		rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		}

	setvar xweapon 180
    setvar yweapon 250
	state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon -22
	addvar yweapon 12
   	rotatesprite xweapon yweapon 65536 1024 7751 shade palweapon 4 0 0 xdim ydim
	addvar xweapon 42
	addvar yweapon -5
	rotatesprite xweapon yweapon 65536 1024 7750 shade palweapon 4 0 0 xdim ydim
    break
    case 3
    case 4
	ifvarl weaponcount 5
	{
		setvar xweapon 221
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8278 shade orientationweapon palweapon
	}
    setvar xweapon 190
    ifvare shotgunaltdisplay 0 { setvar yweapon 280 } else setvar yweapon 285
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 180
    setvar yweapon 250
	state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon -22
	addvar yweapon 12
   	rotatesprite xweapon yweapon 65536 1024 7751 shade palweapon 4 0 0 xdim ydim
	addvar xweapon 42
	addvar yweapon -5
	rotatesprite xweapon yweapon 65536 1024 7750 shade palweapon 4 0 0 xdim ydim
    break
    case 5
    case 6
	ifvarl weaponcount 7
	{
		setvar xweapon 224
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8279 shade orientationweapon palweapon
	}
    setvar xweapon 187
    ifvare shotgunaltdisplay 0 { setvar yweapon 275 } else setvar yweapon 330
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 185
    ifvare shotgunaltdisplay 0 { setvar yweapon 255 } else setvar yweapon 265
	state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		ifvarl weaponcount 7
		{
		 setvar xweapon 180
   		 setvar yweapon 229
		 state hudcoordfix
   		 setvar tilenumweapon BLSHOTGUN
   		 addvar tilenumweapon 3
		addvar xweapon -112
	    ifvarn sgakimbo 0 ifvarn sgakimbo 1
		{
			setvarvar temp sgakimbo
			ifvarl sgakimbo -1 
			{ 
				mulvar temp -1 
				setvar tempb 10
				subvarvar tempb temp 
				setvarvar temp tempb 
			}
			mulvar temp 6
			addvarvar yweapon temp
		}
		ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		}
    break
    case 7
    case 8
	ifvarl weaponcount 8
	{
		setvar xweapon 103
		setvar yweapon 150
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8277 shade orientationweapon palweapon
	}
    setvar xweapon 185
    ifvare shotgunaltdisplay 0 { setvar yweapon 270 } else setvar yweapon 300
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 190
    ifvare shotgunaltdisplay 0 { setvar yweapon 280 } else setvar yweapon 285
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
    case 9
    case 10
	ifvarl weaponcount 11
	{
		setvar xweapon 105
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8278 shade orientationweapon palweapon
	}
    setvar xweapon 183
    setvar yweapon 265
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
    addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 185
    ifvare shotgunaltdisplay 0 { setvar yweapon 275 } else setvar yweapon 330
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
    case 11
    case 12
	ifvarl weaponcount 13
	{
		setvar xweapon 119
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8279 shade orientationweapon palweapon
	}
    setvar xweapon 180
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
    addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 183
    ifvare shotgunaltdisplay 0 { setvar yweapon 270 } else setvar yweapon 300
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 13
    case 14
	setvar xweapon 180
    setvar yweapon 250
	state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
    addvar xweapon 55
	ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    setvar xweapon 180
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	addvar xweapon -120
    ifvarn sgakimbo 0 ifvarn sgakimbo 1
	{
		setvarvar temp sgakimbo
		ifvarl sgakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	break
 endswitch

ends

state shotgundisplay
 switch weaponcount
    case 0
    setvar xweapon 180
    setvar yweapon 250
	state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    getplayer[THISACTOR].ammo_amount 2 SHOTGUNAMMO
	andvar SHOTGUNAMMO 1
	 ifvare SHOTGUNAMMO 0
   	 {
	 addvar xweapon -21
	 addvar yweapon 8
   	 myospal xweapon yweapon 7750 shade orientationweapon palweapon
	 addvar xweapon 42
	 addvar yweapon 3
	 myospal xweapon yweapon 7751 shade orientationweapon palweapon
     }
	 ifvarn SHOTGUNAMMO 0
	 {
	 addvar xweapon 21
	 addvar yweapon 11
   	 myospal xweapon yweapon 7751 shade orientationweapon palweapon
	 }
    break
    case 1
    case 2
	ifvare SHOTGUNAMMO 0
    {
		setvar xweapon 170
		setvar yweapon 150
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8277 shade orientationweapon palweapon
    }
    ifvarn SHOTGUNAMMO 0
    {
		setvar xweapon 183
		setvar yweapon 150
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8277 shade orientationweapon palweapon
    }
    setvar xweapon 185
    ifvare shotgunaltdisplay 0 { setvar yweapon 255 } else setvar yweapon 265
	state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	ifvarl weaponcount 3
	{
		{
		 setvar xweapon 180
   		 setvar yweapon 229
		 state hudcoordfix
   		 setvar tilenumweapon BLSHOTGUN
   		 addvar tilenumweapon 3
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
	 	ifvare SHOTGUNAMMO 0
	 	{
	 	addvar xweapon 26
	 	addvar yweapon 37
   	 	myospal xweapon yweapon 7751 shade orientationweapon palweapon
	 	}
	}
    break
    case 3
    case 4
	ifvare SHOTGUNAMMO 0
    {
		setvar xweapon 168
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8278 shade orientationweapon palweapon
    }
    ifvarn SHOTGUNAMMO 0
    {
		setvar xweapon 181
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8278 shade orientationweapon palweapon
    }
    setvar xweapon 190
    ifvare shotgunaltdisplay 0 { setvar yweapon 280 } else setvar yweapon 285
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	ifvarl weaponcount 5
	ifvare SHOTGUNAMMO 0
	{
	 	addvar xweapon 21
	 	addvar yweapon 11
   	 	myospal xweapon yweapon 7751 shade orientationweapon palweapon
	}
    break
    case 5
    case 6
	ifvare SHOTGUNAMMO 0
    {
		setvar xweapon 167
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8279 shade orientationweapon palweapon
    }
    ifvarn SHOTGUNAMMO 0
    {
		setvar xweapon 184
		setvar yweapon 152
		ifvare hudtype 0 { subvarvar yweapon 22 }
		myospal xweapon yweapon 8279 shade orientationweapon palweapon
    }
    setvar xweapon 187
    ifvare shotgunaltdisplay 0 { setvar yweapon 275 } else setvar yweapon 330
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	ifvarl weaponcount 7
	ifvare SHOTGUNAMMO 0
	{
	 	addvar xweapon 21
	 	addvar yweapon 11
   		myospal xweapon yweapon 7751 shade orientationweapon palweapon
	}
    break
    case 7
    case 8
    setvar xweapon 185
    ifvare shotgunaltdisplay 0 { setvar yweapon 270 } else setvar yweapon 300
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 9
		ifvare SHOTGUNAMMO 0
		{
	 	addvar xweapon 21
	 	addvar yweapon 11
   		myospal xweapon yweapon 7751 shade orientationweapon palweapon
		}
    break
    case 9
    case 10
    setvar xweapon 183
    setvar yweapon 265
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 11
	 	ifvare SHOTGUNAMMO 0
	 	{
	 	addvar xweapon 21
	 	addvar yweapon 11
   	 	myospal xweapon yweapon 7751 shade orientationweapon palweapon
	 	}
    break
    case 11
    case 12
    setvar xweapon 180
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon BLSHOTGUN
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 13
		ifvare SHOTGUNAMMO 0
	 	{
	 	addvar xweapon 21
	 	addvar yweapon 11
   	 	myospal xweapon yweapon 7751 shade orientationweapon palweapon
	 	}
    break
    case 13
    case 14
    case 15
    setvar xweapon 180
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon STGNRELOAD
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 16
    case 17
    case 18
    setvar xweapon 180
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon STGNRELOAD
    addvar tilenumweapon 1
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 19
    case 20
    case 21
    case 22
    case 23
    case 24
    setvar xweapon 180
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon STGNRELOAD
    addvar tilenumweapon 2
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 22
		{
		 setvar xweapon 290
   		 setvar yweapon 260
		 state hudcoordfix
   		 setvar tilenumweapon STGNRELOAD
   		 addvar tilenumweapon 3
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
 		ifvarg weaponcount 21
		ifvarl weaponcount 23
		{
		 setvar xweapon 270
   		 setvar yweapon 236
		 state hudcoordfix
   		 setvar tilenumweapon STGNRELOAD
   		 addvar tilenumweapon 3
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 22
		{
		 setvar xweapon 228
   		 setvar yweapon 236
		 state hudcoordfix
   		 setvar tilenumweapon STGNRELOAD
   		 addvar tilenumweapon 3
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    break
    case 25
    case 26
    case 27
	stopsound EJECT_CLIP
	stopsound INSERT_CLIP 
    setvar xweapon 190
    setvar yweapon 250
	state hudcoordfix
    setvar tilenumweapon STGNRELOAD
    addvar tilenumweapon 5
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
 endswitch

ends

state sweepdisplay
 switch tommysweep
    case 1
	case 2
	case 3
		{
		    setvar xweapon 160
			setvar yweapon 194
			state hudcoordfix
			setvar tilenumweapon TOMMYGUN
			addvar tilenumweapon 9
			myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 175
    setvar yweapon 241
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 2
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 4
	case 5
	case 6
		{
		    setvar xweapon 124
			setvar yweapon 201
			state hudcoordfix
			setvar tilenumweapon TOMMYGUN
			addvar tilenumweapon 10
			myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 155
    setvar yweapon 235
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 3
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 7
	case 8
	case 9
		{
		    setvar xweapon 114
			setvar yweapon 201
			state hudcoordfix
			setvar tilenumweapon TOMMYGUN
			addvar tilenumweapon 11
			myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 145
    setvar yweapon 235
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 3
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 10
	case 11
	case 12
		{
		    setvar xweapon 114
			setvar yweapon 201
			state hudcoordfix
			setvar tilenumweapon TOMMYGUN
			addvar tilenumweapon 12
			myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 147
    setvar yweapon 237
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 4
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 13
	case 14
	case 15
		{
		    setvar xweapon 160
			setvar yweapon 200
			state hudcoordfix
			setvar tilenumweapon TOMMYGUN
			addvar tilenumweapon 10
			myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 175
    setvar yweapon 247
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 1
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 16
	case 17
	case 18
		{
		    setvar xweapon 180
			setvar yweapon 197
			state hudcoordfix
			setvar tilenumweapon TOMMYGUN
			addvar tilenumweapon 10
			myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 185
    setvar yweapon 235
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 5
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 19
	case 20
	case 21
		{
		    setvar xweapon 195
			setvar yweapon 204
			state hudcoordfix
			setvar tilenumweapon TOMMYGUN
			addvar tilenumweapon 12
			myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 190
    setvar yweapon 235
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 5
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 22
	case 23
	case 24
		{
		    setvar xweapon 240
			setvar yweapon 202
			state hudcoordfix
			setvar tilenumweapon TOMMYGUN
			addvar tilenumweapon 10
			myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 220
    setvar yweapon 244
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 2
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 25
	case 26
	case 27
		{
		    setvar xweapon 240
			setvar yweapon 202
			state hudcoordfix
			setvar tilenumweapon TOMMYGUN
			addvar tilenumweapon 11
			myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 222
    setvar yweapon 246
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 1
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 28
	case 29
	case 30
		{
		    setvar xweapon 195
			setvar yweapon 197
			state hudcoordfix
			setvar tilenumweapon TOMMYGUN
			addvar tilenumweapon 10
			myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 200
    setvar yweapon 235
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 5
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
 endswitch
 
ends

state akimbosweepdisplay
 switch akimbotommysweep
    case 1
	case 2
	//RIGHT
	setvar xweapon 225
	setvar yweapon 131
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 12
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim

	setvar xweapon 250
	setvar yweapon 171
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 1
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim

	//LEFT
	setvar xweapon 91
	setvar yweapon 133
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 9
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 71
	setvar yweapon 175
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 1
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	break
	case 3
	case 4
	//RIGHT

	setvar xweapon 223
	setvar yweapon 126
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 9
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 243
	setvar yweapon 165
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 2
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim

	//LEFT
	setvar xweapon 78
	setvar yweapon 133
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 11
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 67
	setvar yweapon 180
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 5
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	break
	
	case 5
	case 6
	//RIGHT
	setvar xweapon 204
	setvar yweapon 132
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 10
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 236
	setvar yweapon 177
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 3
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim

	//LEFT

	setvar xweapon 40
	setvar yweapon 130
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 12
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 56
	setvar yweapon 165
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 2
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	break
	
	case 7
	case 8
	//RIGHT
	setvar xweapon 199
	setvar yweapon 134
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 11
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 232
	setvar yweapon 179
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 3
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim

	//LEFT
	setvar xweapon 33
	setvar yweapon 136
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 9
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 50
	setvar yweapon 175
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 1
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	break
	
	case 9
	case 10
	//RIGHT
	
	setvar xweapon 190
	setvar yweapon 131
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 12
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 225
	setvar yweapon 173
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 4
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim

	//LEFT
	setvar xweapon 32
	setvar yweapon 128
	
	
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 10
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 51
	setvar yweapon 168
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 2
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim

	break
	case 11
	case 12
	//RIGHT
	setvar xweapon 195
	setvar yweapon 126
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 9
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 230
	setvar yweapon 169
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 3
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	//LEFT
	setvar xweapon 42
	setvar yweapon 138
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 11
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 63
	setvar yweapon 174
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 1
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	break
	case 13
	case 14
	//RIGHT
	
	setvar xweapon 219
	setvar yweapon 129
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 10
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 237
	setvar yweapon 166
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 1
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim

	//LEFT
	setvar xweapon 61
	setvar yweapon 124
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 12
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 69
	setvar yweapon 170
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 5
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	break
	
	case 15
	case 16
	//RIGHT

	setvar xweapon 239
	setvar yweapon 125
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 11
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 246
	setvar yweapon 170
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 5
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim



	//LEFT
	setvar xweapon 81
	setvar yweapon 127
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 9
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 69
	setvar yweapon 170
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 5
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	break
	
	case 17
	case 18
	//RIGHT

	setvar xweapon 263
	setvar yweapon 127
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 12
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 257
	setvar yweapon 172
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 5
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim



	//LEFT
	setvar xweapon 116
	setvar yweapon 130
	
	
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 10
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 86
	setvar yweapon 178
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 4
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim

	break
	case 19
	case 20
	
	//RIGHT
	setvar xweapon 284
	setvar yweapon 129
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 9
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 265
	setvar yweapon 166
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 2
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim

	setvar xweapon 119
	setvar yweapon 133
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 11
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 89
	setvar yweapon 175
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 3
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
	break
	case 21
	case 22
	setvar xweapon 280
	setvar yweapon 128
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 10
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 261
	setvar yweapon 161
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 1
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim

	//LEFT
	setvar xweapon 127
	setvar yweapon 129
	
	
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 12
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 92
	setvar yweapon 176
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 3
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim


	
	break
	case 23
	case 24
	//RIGHT
	
	setvar xweapon 275
	setvar yweapon 129
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 11
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 256
	setvar yweapon 166
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 2
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim



	//LEFT
	setvar xweapon 104
	setvar yweapon 136
	
	
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 9
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 87
	setvar yweapon 174
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 2
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	break
	case 25
	case 26
	//RIGHT
	
	setvar xweapon 267
	setvar yweapon 130
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 12
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 251
	setvar yweapon 165
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 1
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim

	//LEFT
	setvar xweapon 96
	setvar yweapon 125
	
	
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 10
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 80
	setvar yweapon 161
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 1
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	break
	
	case 27
	case 28
	//RIGHT
	
	setvar xweapon 241
	setvar yweapon 120
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 9
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 249
	setvar yweapon 166
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 5
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim

	//LEFT
	setvar xweapon 85
	setvar yweapon 131
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 11
	state hudcoordfix addvar yweapon 80
	rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 0 orientationweapon 0 0 xdim ydim
	
	setvar xweapon 70
	setvar yweapon 167
	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 2
	state hudcoordfix addvar yweapon 80
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	break
 endswitch
 
ends

state tommyakimbodisplay
 ifvarn akimbotommysweep 0 { state akimbosweepdisplay break }
 switch weaponcount
	case 0
	setvar xweapon 60
	setvar yweapon 245
	state hudcoordfix
	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
	}
	setvar tilenumweapon TOMMYGUN
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim

	setvar xweapon 120
	setvar yweapon 245
	state hudcoordfix
	addvar xweapon 120
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	break
	
	case 1
    case 2
    case 5
    case 6
    case 9
    case 10
		ifvarg weaponcount 0
		ifvarl weaponcount 3
		{
		 setvar xweapon 105
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 9
		 addvar xweapon 120
		 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
			}
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 4
		ifvarl weaponcount 7
		{
		 setvar xweapon 105
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 11
		 addvar xweapon 120
		 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
			}
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 8
		ifvarl weaponcount 11
		{
		 setvar xweapon 105
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 12
		 addvar xweapon 120
		 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
			}
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 120
    setvar yweapon 245
    state hudcoordfix
	addvar xweapon 120
	setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 1
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
		ifvarg weaponcount 0
		ifvarl weaponcount 3
		{
		 setvar xweapon 75
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 9
		 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
			}
		ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		}
		ifvarg weaponcount 4
		ifvarl weaponcount 7
		{
		 setvar xweapon 75
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 11
		 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
			}
		ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		}
		ifvarg weaponcount 8
		ifvarl weaponcount 11
		{
		 setvar xweapon 75
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 12
		 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
			}
		ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		}
		
	setvar xweapon 60
	setvar yweapon 245
	state hudcoordfix
	setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 1
	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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
    case 3
    case 4
    case 7
    case 8
    case 11
    case 12
		ifvarg weaponcount 2
		ifvarl weaponcount 5
		{
		 setvar xweapon 105
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 10
		 addvar xweapon 120
		 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
			}
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 6
		ifvarl weaponcount 9
		{
		 setvar xweapon 105
   		 setvar yweapon 210
   		 state hudcoordfix
		 addvar xweapon 120
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 12
		 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
			}
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 10
		ifvarl weaponcount 13
		{
		 setvar xweapon 105
   		 setvar yweapon 210
   		 state hudcoordfix
		 addvar xweapon 120
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 11
		 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
			}
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}

    setvar xweapon 125
    setvar yweapon 250
    state hudcoordfix
	addvar xweapon 120
	setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 2
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	ifvarg weaponcount 2
	ifvarl weaponcount 5
	{
	setvar xweapon 75
   	setvar yweapon 210
   	state hudcoordfix
   	setvar tilenumweapon TOMMYGUN
   	addvar tilenumweapon 10
	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
					}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	}
	ifvarg weaponcount 6
	ifvarl weaponcount 9
    {
	setvar xweapon 75
   	setvar yweapon 210
    state hudcoordfix
   	setvar tilenumweapon TOMMYGUN
	addvar tilenumweapon 12
	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
				}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	}
	ifvarg weaponcount 10
	ifvarl weaponcount 13
	{
	setvar xweapon 75
   	setvar yweapon 210
   	state hudcoordfix
   	setvar tilenumweapon TOMMYGUN
   	addvar tilenumweapon 11
	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
				}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	}
		
	setvar xweapon 65
	setvar yweapon 250
	state hudcoordfix
	setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 2
	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
			}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
 endswitch

ends

state tommygundisplay
 ifvarn tommysweep 0 { state sweepdisplay break }
 switch weaponcount
    case 0
    setvar xweapon 190
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 1
    case 2
    case 5
    case 6
    case 9
    case 10
		ifvarg weaponcount 0
		ifvarl weaponcount 3
		{
		 setvar xweapon 175
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 9
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 4
		ifvarl weaponcount 7
		{
		 setvar xweapon 175
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 11
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 8
		ifvarl weaponcount 11
		{
		 setvar xweapon 175
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 12
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    setvar xweapon 190
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 1
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 3
    case 4
    case 7
    case 8
    case 11
    case 12
		ifvarg weaponcount 2
		ifvarl weaponcount 5
		{
		 setvar xweapon 175
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 10
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 6
		ifvarl weaponcount 9
		{
		 setvar xweapon 175
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 12
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 10
		ifvarl weaponcount 13
		{
		 setvar xweapon 175
   		 setvar yweapon 210
   		 state hudcoordfix
   		 setvar tilenumweapon TOMMYGUN
   		 addvar tilenumweapon 11
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}

    setvar xweapon 195
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon TOMMYGUN
    addvar tilenumweapon 2
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
 endswitch

ends

state napalmakimbodisplay
	getplayer[THISACTOR].kickback_pic tempb
	ifvarg tempb 0
	{
		setvar tilenumweapon 8600
		mulvar tempb 10
		divvar tempb 16
		addvarvar tilenumweapon tempb
		ifvarg tilenumweapon 8609 { setvar tilenumweapon -1 }
		setvar xweapon 225
		setvar yweapon 175
		ifvare hudtype 0 { subvar yweapon 20 }
		myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	}

	ifvarg tempb 4
	{
		setvar tilenumweapon 8600
		mulvar tempb 10
		divvar tempb 13
		addvarvar tilenumweapon tempb
		ifvarg tilenumweapon 8609 { setvar tilenumweapon -1 }
		setvar xweapon 95
		setvar yweapon 175
		ifvare hudtype 0 { subvar yweapon 20 }
		myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	}
	
 switch weaponcount
	case 0
	setvar xweapon 60
	setvar yweapon 250
	state hudcoordfix
	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
	}

	setvar tilenumweapon NAPALM
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 120
	setvar yweapon 250
	state hudcoordfix
	addvar xweapon 120
	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
	}
	setvar tilenumweapon NAPALM
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvare weaponcount 0
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		
		setvar xweapon 60
		setvar yweapon 250
		state hudcoordfix
		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
		}
		ifvare tilenumweapon 7471
		{
		  addvar xweapon 18
		  addvar yweapon -16
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -4
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon 19
		  addvar yweapon -20
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -6
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon 18
		  addvar yweapon -24
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon 16
		  addvar yweapon -26
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon 14
		  addvar yweapon -30
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 37 0 0 xdim ydim
		}
		setvar xweapon 240
		setvar yweapon 250
		state hudcoordfix
		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
		}
		ifvare tilenumweapon 7471
		{
		  addvar xweapon -18
		  addvar yweapon -16
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 4
          myospal xweapon yweapon 7474 shade 33 palweapon
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon -19
		  addvar yweapon -20
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 1
		  addvar yweapon 4
		  myospal xweapon yweapon 7471 shade 1 palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 33 palweapon
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon -18
		  addvar yweapon -24
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -1
		  addvar yweapon 4
		  myospal xweapon yweapon 7472 shade 1 palweapon
		  addvar xweapon 1
		  addvar yweapon 4
          myospal xweapon yweapon 7471 shade 33 palweapon
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon -16
		  addvar yweapon -26
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 2
		  myospal xweapon yweapon 7473 shade 1 palweapon
		  addvar xweapon -1
		  addvar yweapon 4
          myospal xweapon yweapon 7472 shade 33 palweapon
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon -14
		  addvar yweapon -30
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 4
		  myospal xweapon yweapon 7474 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 2
          myospal xweapon yweapon 7473 shade 33 palweapon
		}
		}
	break
	
	
	case 1
	setvar xweapon 60
	setvar yweapon 250
	state hudcoordfix
	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
	}

	setvar tilenumweapon NAPALM
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		ifvare weaponcount 1
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		setvar xweapon 60
		setvar yweapon 250
		state hudcoordfix
		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
		}
		ifvare tilenumweapon 7471
		{
		  addvar xweapon 18
		  addvar yweapon -16
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -4
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon 19
		  addvar yweapon -20
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -6
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon 18
		  addvar yweapon -24
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon 16
		  addvar yweapon -26
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon 14
		  addvar yweapon -30
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 37 0 0 xdim ydim
		}
		}
    setvar xweapon 190
    setvar yweapon 255
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    addvar xweapon 55
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
    case 2
	setvar xweapon 60
	setvar yweapon 250
	state hudcoordfix
	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
	}
	setvar tilenumweapon NAPALM
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		ifvare weaponcount 2
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		setvar xweapon 60
		setvar yweapon 250
		state hudcoordfix
		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
		}
		ifvare tilenumweapon 7471
		{
		  addvar xweapon 18
		  addvar yweapon -16
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -4
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon 19
		  addvar yweapon -20
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -6
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon 18
		  addvar yweapon -24
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon 16
		  addvar yweapon -26
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon 14
		  addvar yweapon -30
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 37 0 0 xdim ydim
		}
		}
    setvar xweapon 195
    setvar yweapon 260
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    addvar xweapon 55
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
    case 3
    case 4
	setvar xweapon 60
	setvar yweapon 250
	state hudcoordfix
	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
	}

	setvar tilenumweapon NAPALM
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		ifvarl weaponcount 5
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		setvar xweapon 60
		setvar yweapon 250
		state hudcoordfix
		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
		}
		ifvare tilenumweapon 7471
		{
		  addvar xweapon 18
		  addvar yweapon -16
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -4
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon 19
		  addvar yweapon -20
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -6
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon 18
		  addvar yweapon -24
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon 16
		  addvar yweapon -26
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon 14
		  addvar yweapon -30
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 37 0 0 xdim ydim
		}
		}
    setvar xweapon 207
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    addvar xweapon 55
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
    case 5
	setvar xweapon 60
	setvar yweapon 250
	state hudcoordfix
	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
	}

	setvar tilenumweapon NAPALM
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		ifvare weaponcount 5
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		setvar xweapon 60
		setvar yweapon 250
		state hudcoordfix
		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
		}
		ifvare tilenumweapon 7471
		{
		  addvar xweapon 18
		  addvar yweapon -16
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -4
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon 19
		  addvar yweapon -20
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -6
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon 18
		  addvar yweapon -24
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon 16
		  addvar yweapon -26
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon 14
		  addvar yweapon -30
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 37 0 0 xdim ydim
		}
		}
    setvar xweapon 212
    setvar yweapon 275
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    addvar xweapon 55
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
    case 6
	setvar xweapon 60
	setvar yweapon 250
	state hudcoordfix
	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
	}

	setvar tilenumweapon NAPALM
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		ifvare weaponcount 6
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		setvar xweapon 60
		setvar yweapon 250
		state hudcoordfix
		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
		}
		ifvare tilenumweapon 7471
		{
		  addvar xweapon 18
		  addvar yweapon -16
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -4
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon 19
		  addvar yweapon -20
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -6
		  addvar yweapon -14
		  rotatesprite xweapon yweapon 65536 1024 7475 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon 18
		  addvar yweapon -24
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon -1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7471 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon 16
		  addvar yweapon -26
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 1
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7472 shade palweapon 37 0 0 xdim ydim
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon 14
		  addvar yweapon -30
		  ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 4
		  rotatesprite xweapon yweapon 65536 1024 7474 shade palweapon 5 0 0 xdim ydim
		  addvar xweapon 2
		  addvar yweapon 2
		  rotatesprite xweapon yweapon 65536 1024 7473 shade palweapon 37 0 0 xdim ydim
		}
		}
    setvar xweapon 207
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    addvar xweapon 55
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	
    case 7
    case 8
    setvar xweapon 207
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    addvar xweapon 55
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 170
    setvar yweapon 255
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
	addvar xweapon -120
    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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
    break
    case 9
    setvar xweapon 202
    setvar yweapon 265
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    addvar xweapon 55
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 165
    setvar yweapon 260
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
	addvar xweapon -120
    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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
    case 10
    setvar xweapon 202
    setvar yweapon 265
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    addvar xweapon 55
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 153
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
	addvar xweapon -120
    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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
    case 11
    case 12
    setvar xweapon 196
    setvar yweapon 259
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    addvar xweapon 55
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 148
    setvar yweapon 275
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
	addvar xweapon -120
    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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
    break
    case 13
    setvar xweapon 196
    setvar yweapon 259
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    addvar xweapon 55
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 153
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
	addvar xweapon -120
    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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
    break
    case 14
    case 15
    setvar xweapon 190
    setvar yweapon 255
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    addvar xweapon 55
	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
	}
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 153
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
	addvar xweapon -120
    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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 16
	setvar xweapon 158
    setvar yweapon 265
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
	addvar xweapon -120
    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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
	setvar xweapon 120
	setvar yweapon 250
	state hudcoordfix
	addvar xweapon 120
	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
	}
	setvar tilenumweapon NAPALM
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvare weaponcount 16
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		ifvare tilenumweapon 7471
		{
		  addvar xweapon -18
		  addvar yweapon -16
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 4
          myospal xweapon yweapon 7474 shade 33 palweapon
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon -19
		  addvar yweapon -20
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 1
		  addvar yweapon 4
		  myospal xweapon yweapon 7471 shade 1 palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 33 palweapon
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon -18
		  addvar yweapon -24
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -1
		  addvar yweapon 4
		  myospal xweapon yweapon 7472 shade 1 palweapon
		  addvar xweapon 1
		  addvar yweapon 4
          myospal xweapon yweapon 7471 shade 33 palweapon
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon -16
		  addvar yweapon -26
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 2
		  myospal xweapon yweapon 7473 shade 1 palweapon
		  addvar xweapon -1
		  addvar yweapon 4
          myospal xweapon yweapon 7472 shade 33 palweapon
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon -14
		  addvar yweapon -30
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 4
		  myospal xweapon yweapon 7474 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 2
          myospal xweapon yweapon 7473 shade 33 palweapon
		}
		}
	break
	case 17
	setvar xweapon 158
    setvar yweapon 265
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
	addvar xweapon -120
    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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
	setvar xweapon 120
	setvar yweapon 250
	state hudcoordfix
	addvar xweapon 120
	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
	}
	setvar tilenumweapon NAPALM
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvare weaponcount 17
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		ifvare tilenumweapon 7471
		{
		  addvar xweapon -18
		  addvar yweapon -16
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 4
          myospal xweapon yweapon 7474 shade 33 palweapon
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon -19
		  addvar yweapon -20
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 1
		  addvar yweapon 4
		  myospal xweapon yweapon 7471 shade 1 palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 33 palweapon
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon -18
		  addvar yweapon -24
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -1
		  addvar yweapon 4
		  myospal xweapon yweapon 7472 shade 1 palweapon
		  addvar xweapon 1
		  addvar yweapon 4
          myospal xweapon yweapon 7471 shade 33 palweapon
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon -16
		  addvar yweapon -26
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 2
		  myospal xweapon yweapon 7473 shade 1 palweapon
		  addvar xweapon -1
		  addvar yweapon 4
          myospal xweapon yweapon 7472 shade 33 palweapon
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon -14
		  addvar yweapon -30
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 4
		  myospal xweapon yweapon 7474 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 2
          myospal xweapon yweapon 7473 shade 33 palweapon
		}
		}
	break
	case 18
	case 19
	setvar xweapon 164
    setvar yweapon 259
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
	addvar xweapon -120
    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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
	setvar xweapon 120
	setvar yweapon 250
	state hudcoordfix
	addvar xweapon 120
	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
	}
	setvar tilenumweapon NAPALM
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 20
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		ifvare tilenumweapon 7471
		{
		  addvar xweapon -18
		  addvar yweapon -16
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 4
          myospal xweapon yweapon 7474 shade 33 palweapon
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon -19
		  addvar yweapon -20
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 1
		  addvar yweapon 4
		  myospal xweapon yweapon 7471 shade 1 palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 33 palweapon
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon -18
		  addvar yweapon -24
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -1
		  addvar yweapon 4
		  myospal xweapon yweapon 7472 shade 1 palweapon
		  addvar xweapon 1
		  addvar yweapon 4
          myospal xweapon yweapon 7471 shade 33 palweapon
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon -16
		  addvar yweapon -26
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 2
		  myospal xweapon yweapon 7473 shade 1 palweapon
		  addvar xweapon -1
		  addvar yweapon 4
          myospal xweapon yweapon 7472 shade 33 palweapon
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon -14
		  addvar yweapon -30
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 4
		  myospal xweapon yweapon 7474 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 2
          myospal xweapon yweapon 7473 shade 33 palweapon
		}
		}
	break
	case 20
	setvar xweapon 164
    setvar yweapon 259
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
	addvar xweapon -120
    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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
	setvar xweapon 120
	setvar yweapon 250
	state hudcoordfix
	addvar xweapon 120
	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
	}
	setvar tilenumweapon NAPALM
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvare weaponcount 20
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		ifvare tilenumweapon 7471
		{
		  addvar xweapon -18
		  addvar yweapon -16
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 4
          myospal xweapon yweapon 7474 shade 33 palweapon
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon -19
		  addvar yweapon -20
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 1
		  addvar yweapon 4
		  myospal xweapon yweapon 7471 shade 1 palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 33 palweapon
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon -18
		  addvar yweapon -24
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -1
		  addvar yweapon 4
		  myospal xweapon yweapon 7472 shade 1 palweapon
		  addvar xweapon 1
		  addvar yweapon 4
          myospal xweapon yweapon 7471 shade 33 palweapon
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon -16
		  addvar yweapon -26
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 2
		  myospal xweapon yweapon 7473 shade 1 palweapon
		  addvar xweapon -1
		  addvar yweapon 4
          myospal xweapon yweapon 7472 shade 33 palweapon
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon -14
		  addvar yweapon -30
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 4
		  myospal xweapon yweapon 7474 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 2
          myospal xweapon yweapon 7473 shade 33 palweapon
		}
		}
	break
	case 21
	case 22
	setvar xweapon 170
    setvar yweapon 255
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
	addvar xweapon -120
    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
	}
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
	setvar xweapon 120
	setvar yweapon 250
	state hudcoordfix
	addvar xweapon 120
	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
	}
	setvar tilenumweapon NAPALM
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarg weaponcount 20
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		ifvare tilenumweapon 7471
		{
		  addvar xweapon -18
		  addvar yweapon -16
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 4
          myospal xweapon yweapon 7474 shade 33 palweapon
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon -19
		  addvar yweapon -20
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 1
		  addvar yweapon 4
		  myospal xweapon yweapon 7471 shade 1 palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 33 palweapon
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon -18
		  addvar yweapon -24
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -1
		  addvar yweapon 4
		  myospal xweapon yweapon 7472 shade 1 palweapon
		  addvar xweapon 1
		  addvar yweapon 4
          myospal xweapon yweapon 7471 shade 33 palweapon
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon -16
		  addvar yweapon -26
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 2
		  myospal xweapon yweapon 7473 shade 1 palweapon
		  addvar xweapon -1
		  addvar yweapon 4
          myospal xweapon yweapon 7472 shade 33 palweapon
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon -14
		  addvar yweapon -30
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 4
		  myospal xweapon yweapon 7474 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 2
          myospal xweapon yweapon 7473 shade 33 palweapon
		}
		}
	break
 endswitch

ends

state napalmdisplay
 switch weaponcount
    case 0
    setvar xweapon 180
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon NAPALM
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvare weaponcount 0
		{
		divvar tmp 100
		modvar tmp 5
		setvar tilenumweapon 7471
		addvarvar tilenumweapon tmp
		ifvare tilenumweapon 7471
		{
		  addvar xweapon -18
		  addvar yweapon -16
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 4
          myospal xweapon yweapon 7474 shade 33 palweapon
		}
		ifvare tilenumweapon 7472
		{
		  addvar xweapon -19
		  addvar yweapon -20
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon 1
		  addvar yweapon 4
		  myospal xweapon yweapon 7471 shade 1 palweapon
		  addvar xweapon 4
		  addvar yweapon -14
          myospal xweapon yweapon 7475 shade 33 palweapon
		}
		ifvare tilenumweapon 7473
		{
		  addvar xweapon -18
		  addvar yweapon -24
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -1
		  addvar yweapon 4
		  myospal xweapon yweapon 7472 shade 1 palweapon
		  addvar xweapon 1
		  addvar yweapon 4
          myospal xweapon yweapon 7471 shade 33 palweapon
		}
		ifvare tilenumweapon 7474
		{
		  addvar xweapon -16
		  addvar yweapon -26
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 2
		  myospal xweapon yweapon 7473 shade 1 palweapon
		  addvar xweapon -1
		  addvar yweapon 4
          myospal xweapon yweapon 7472 shade 33 palweapon
		}
		ifvare tilenumweapon 7475
		{
		  addvar xweapon -14
		  addvar yweapon -30
		  myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		  addvar xweapon -2
		  addvar yweapon 4
		  myospal xweapon yweapon 7474 shade 1 palweapon
		  addvar xweapon -2
		  addvar yweapon 2
          myospal xweapon yweapon 7473 shade 33 palweapon
		}
		}
    break
    case 1
    setvar xweapon 190
    setvar yweapon 255
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
    	ifvarl weaponcount 2
		{
		ifvare hudtype 0 { myospal 175 155 8599 shade orientationweapon palweapon } else
		myospal 175 175 8599 shade orientationweapon palweapon
		}
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 2
    setvar xweapon 195
    setvar yweapon 260
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
		ifvarl weaponcount 3
		{
		ifvare hudtype 0 { myospal 175 155 8600 shade orientationweapon palweapon } else
		myospal 175 175 8600 shade orientationweapon palweapon
		}
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 3
    case 4
    setvar xweapon 207
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
 		ifvarl weaponcount 5
		{
		ifvare hudtype 0 { myospal 175 155 8601 shade orientationweapon palweapon } else
		myospal 175 175 8601 shade orientationweapon palweapon
		}
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 5
    setvar xweapon 212
    setvar yweapon 275
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
 		ifvarl weaponcount 5
		{
		ifvare hudtype 0 { myospal 175 155 8602 shade orientationweapon palweapon } else
		myospal 175 175 8602 shade orientationweapon palweapon
		}
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 6
    setvar xweapon 207
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
 		ifvarl weaponcount 7
		{
		ifvare hudtype 0 { myospal 175 155 8603 shade orientationweapon palweapon } else
		myospal 175 175 8603 shade orientationweapon palweapon
		}
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 7
    case 8
    setvar xweapon 207
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
 		ifvarl weaponcount 9
		{
		ifvare hudtype 0 { myospal 175 155 8604 shade orientationweapon palweapon } else
		myospal 175 175 8604 shade orientationweapon palweapon
		}
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 9
    setvar xweapon 202
    setvar yweapon 265
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
 		ifvarl weaponcount 10
		{
		ifvare hudtype 0 { myospal 175 155 8605 shade orientationweapon palweapon } else
		myospal 175 175 8605 shade orientationweapon palweapon
		}
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 10
    setvar xweapon 202
    setvar yweapon 265
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
 		ifvarl weaponcount 11
		{
		ifvare hudtype 0 { myospal 175 155 8606 shade orientationweapon palweapon } else
		myospal 175 175 8606 shade orientationweapon palweapon
		}
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 11
    case 12
    setvar xweapon 196
    setvar yweapon 259
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
 		ifvarl weaponcount 13
		{
		ifvare hudtype 0 { myospal 175 155 8607 shade orientationweapon palweapon } else
		myospal 175 175 8607 shade orientationweapon palweapon
		}
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 13
    setvar xweapon 196
    setvar yweapon 259
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
 		ifvarl weaponcount 14
		{
		ifvare hudtype 0 { myospal 175 155 8608 shade orientationweapon palweapon } else
		myospal 175 175 8608 shade orientationweapon palweapon
		}
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 14
    case 15
    setvar xweapon 190
    setvar yweapon 255
	state hudcoordfix
    setvar tilenumweapon NAPALM
     addvar tilenumweapon -7
 		ifvarg weaponcount 13
		{
		ifvare hudtype 0 { myospal 175 155 8609 shade orientationweapon palweapon } else
		myospal 175 175 8609 shade orientationweapon palweapon
		}
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
 endswitch
ends

state lighterdisplay
getplayer[THISACTOR].weapon_pos pos
ifvare weaponcount 0
{
ifvarn LIGHTERENABLE 1
{
switch pos
case 0
	setvar xweapon 98
   	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 3
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar tilenumweapon 7
	addvar xweapon 34
	addvar yweapon -50
	myospal xweapon yweapon tilenumweapon -128 orientationweapon palweapon
	break
 case 1 
 case 2
 case 3 
 	setvar xweapon 98
	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 2
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
 case 4 
 case 5
 case 6
 case 7 
 case 8 
 case 9
 case 10
  	setvar xweapon 98
	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 1
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
endswitch
}

ifvare LIGHTERENABLE 1
ifvare CURRWEAP 5
{
switch pos
case 0 
	setvar xweapon 101
   	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 3
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar tilenumweapon 7
	addvar xweapon 34
	addvar yweapon -50
	myospal xweapon yweapon tilenumweapon -128 1 0
	break
case 1 case 2 case 3 case 4  case 5 case 6 case 7 case 8  case 9 case 10
case -1 case -2 case -3 case -4  case -5 case -6 case -7 case -8  case -9 case -10
  	setvar xweapon 101
	setvar yweapon 246
	state hudcoordfix
	ifvarl yweapon 198 nullop else setvar yweapon 198
	ifvare hudtype 0 { ifvarl yweapon 176 nullop else setvar yweapon 176 }
 	setvar tilenumweapon LIGHTER
	addvar tilenumweapon 3
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar tilenumweapon 7
	addvar xweapon 34
	addvar yweapon -50
	myospal xweapon yweapon tilenumweapon -128 1 0
	break
endswitch
} 
else ifvare LIGHTERENABLE 0
{
switch pos
case -1
case -2
case -3
    setvar LIGHTERENABLE 0
  	setvar xweapon 98
	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 4
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
 case -4 
 case -5
 case -6
  	setvar xweapon 98
	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 5
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
 case -7 
 case -8 
 case -9
 case -10
  	setvar xweapon 98
	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 6
	myospal xweapon yweapon tilenumweapon -128 1 0
	break
	endswitch
}
ifvare LIGHTERENABLE 1
ifvare CURRWEAP 6
{
switch pos
case 0
	setvar xweapon 101
   	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 3
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar tilenumweapon 7
	addvar xweapon 34
	addvar yweapon -50
	myospal xweapon yweapon tilenumweapon -128 1 0
	break
case 1 case 2 case 3 case 4  case 5 case 6 case 7 case 8  case 9 case 10
case -1 case -2 case -3 case -4  case -5 case -6 case -7 case -8  case -9 case -10
  	setvar xweapon 101
	setvar yweapon 246
	state hudcoordfix
	ifvarl yweapon 198 nullop else setvar yweapon 198
	ifvare hudtype 0 { ifvarl yweapon 176 nullop else setvar yweapon 176 }
 	setvar tilenumweapon LIGHTER
	addvar tilenumweapon 3
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar tilenumweapon 7
	addvar xweapon 34
	addvar yweapon -50
	myospal xweapon yweapon tilenumweapon -128 1 0
	break
endswitch
}
else ifvare LIGHTERENABLE 0
{
switch pos
case -1
case -2
case -3
    setvar LIGHTERENABLE 0
  	setvar xweapon 98
	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 4
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
 case -4 
 case -5
 case -6
  	setvar xweapon 98
	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 5
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
 case -7 
 case -8 
 case -9
 case -10
  	setvar xweapon 98
	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 6
	myospal xweapon yweapon tilenumweapon -128 1 0
	break
	endswitch
}

ifvarn CURRWEAP 5
ifvarn CURRWEAP 6
{
switch pos
case -1
case -2
case -3
    setvar LIGHTERENABLE 0
  	setvar xweapon 98
	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 4
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
 case -4 
 case -5
 case -6
  	setvar xweapon 98
	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 5
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
 case -7 
 case -8 
 case -9
 case -10
  	setvar xweapon 98
	setvar yweapon 246
	state hudcoordfix
 	setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 6
	myospal xweapon yweapon tilenumweapon -128 1 0
	break
	endswitch
	}
}
ends

state tntaltfire
 switch tntalt
    case 1
    case 2
    setvar xweapon 200
    setvar yweapon 252
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 3
		{
		 setvar xweapon 148
   		 setvar yweapon 203
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 setvar xweapon 158
   		 setvar yweapon 201
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    break
    case 3
    case 4
    case 5
    setvar xweapon 200
    setvar yweapon 252
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 6
		{
		 setvar xweapon 148
   		 setvar yweapon 203
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 1
         addvar xweapon -25
		 addvar yweapon -10	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		 setvar xweapon 158
   		 setvar yweapon 201
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    break
    case 6
    case 7
    case 8
    setvar xweapon 215
    setvar yweapon 260
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 9
		{
		 setvar xweapon 163
   		 setvar yweapon 211
		state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 1
         addvar xweapon -25
		 addvar yweapon -10	
		 myospal xweapon yweapon tilenumweapon -128 1 0

		 setvar xweapon 153
   		 setvar yweapon 206
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    break
    case 9
    case 10
    case 11
    setvar xweapon 224
    setvar yweapon 272
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 12
		{
		 setvar xweapon 172
   		 setvar yweapon 223
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 1
         addvar xweapon -25
		 addvar yweapon -10	
		 myospal xweapon yweapon tilenumweapon -128 1 0

		 setvar xweapon 144
   		 setvar yweapon 216
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    break
    case 12
    case 13
    case 14
		ifvarl weaponcount 15
		{
		 setvar xweapon 182
   		 setvar yweapon 233
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 
		 setvar xweapon 157
   		 setvar yweapon 228
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 3
		 setvar ang -128
		 setvarvar tmp dtime
		 divvar tmp 2
		 divvar tmp 3
		 addvarvar xweapon tmp
		 ifvarg tmp 6
		 {
		 addvar yweapon -8
		 divvar tmp 5
		 mulvar tmp 2
		 addvarvar yweapon tmp
		 mulvar tmp 15
         setvarvar ang tmp addvar yweapon -1 addvar xweapon 3
		 } ifvare tmp 30 { addvar xweapon -1 addvar yweapon 2 }
		 rotatesprite xweapon yweapon 65536 ang tilenumweapon 0 palweapon orientationweapon 0 0 xdim ydim
		 ifvarg tmp 60
		 {
		 addvar xweapon 12
		 addvar yweapon -3
		 setvar ang 0
		 ifvarg tmp 80 { addvar ang 256 }
		 ifvarg tmp 120 { addvar xweapon 4 addvar ang 256 }
		 ifvarg tmp 160 { addvar xweapon 2 addvar ang 128 }
		 rotatesprite xweapon yweapon 49152 ang tilenumweapon 0 palweapon orientationweapon 0 0 xdim ydim
		 addvar xweapon -1
		 addvar yweapon 8
		 setvar ang 768
		 ifvarg tmp 60 { addvar xweapon -4 addvar ang -256 }
		 ifvarg tmp 90 { addvar xweapon -8 addvar yweapon 3 addvar ang -256 }
		 ifvarg tmp 120 { addvar xweapon -14 addvar yweapon 5 addvar ang -256 }
		 rotatesprite xweapon yweapon 49152 ang tilenumweapon 0 palweapon orientationweapon 0 0 xdim ydim
		 }
		 setvar xweapon 134
   		 setvar yweapon 226
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    setvar xweapon 234
    setvar yweapon 282
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
 endswitch
ends

state dynamitedisplay
ifvarn tntalt 0 { state tntaltfire break }
 switch weaponcount
    case 0
    setvar xweapon 210
    setvar yweapon 250
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon

	setvar xweapon 158
   	setvar yweapon 201
	state hudcoordfix
   	setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 1
    case 2
    setvar xweapon 200
    setvar yweapon 252
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 3
		{
		 setvar xweapon 148
   		 setvar yweapon 203
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 setvar xweapon 158
   		 setvar yweapon 201
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    break
    case 3
    case 4
    case 5
    setvar xweapon 200
    setvar yweapon 252
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 6
		{
		 setvar xweapon 148
   		 setvar yweapon 203
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 1
         addvar xweapon -25
		 addvar yweapon -10	
		 myospal xweapon yweapon tilenumweapon -128 1 0

		 setvar xweapon 158
   		 setvar yweapon 201
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    break
    case 6
    case 7
    case 8
    setvar xweapon 215
    setvar yweapon 260
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 9
		{
		 setvar xweapon 163
   		 setvar yweapon 211
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 1
         addvar xweapon -25
		 addvar yweapon -10	
		 myospal xweapon yweapon tilenumweapon -128 1 0

		 setvar xweapon 153
   		 setvar yweapon 206
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    break
    case 9
    case 10
    case 11
    setvar xweapon 224
    setvar yweapon 272
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 12
		{
		 setvar xweapon 172
   		 setvar yweapon 223
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 1
         addvar xweapon -25
		 addvar yweapon -10	
		 myospal xweapon yweapon tilenumweapon -128 1 0

		 setvar xweapon 144
   		 setvar yweapon 216
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    break
    case 12
    case 13
    case 14
		ifvarl weaponcount 15
		{
		 setvar xweapon 182
   		 setvar yweapon 233
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 
		 setvar xweapon 157
   		 setvar yweapon 228
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 3
		 setvar ang -128
		 setvarvar tmp dtime
		 divvar tmp 2
		 divvar tmp 3
		 addvarvar xweapon tmp
		 ifvarg tmp 6
		 {
		 addvar yweapon -8
		 divvar tmp 5
		 mulvar tmp 2
		 addvarvar yweapon tmp
		 mulvar tmp 15
         setvarvar ang tmp addvar yweapon -1 addvar xweapon 3
		 } ifvare tmp 30 { addvar xweapon -1 addvar yweapon 2 }
		 rotatesprite xweapon yweapon 65536 ang tilenumweapon 0 palweapon orientationweapon 0 0 xdim ydim
		 ifvarg tmp 60
		 {
		 addvar xweapon 12
		 addvar yweapon -3
		 setvar ang 0
		 ifvarg tmp 80 { addvar ang 256 }
		 ifvarg tmp 120 { addvar xweapon 4 addvar ang 256 }
		 ifvarg tmp 160 { addvar xweapon 2 addvar ang 128 }
		 rotatesprite xweapon yweapon 49152 ang tilenumweapon 0 palweapon orientationweapon 0 0 xdim ydim
		 addvar xweapon -1
		 addvar yweapon 8
		 setvar ang 768
		 ifvarg tmp 60 { addvar xweapon -4 addvar ang -256 }
		 ifvarg tmp 90 { addvar xweapon -8 addvar yweapon 3 addvar ang -256 }
		 ifvarg tmp 120 { addvar xweapon -14 addvar yweapon 5 addvar ang -256 }
		 rotatesprite xweapon yweapon 49152 ang tilenumweapon 0 palweapon orientationweapon 0 0 xdim ydim
		 }
		 setvar xweapon 134
   		 setvar yweapon 226
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    setvar xweapon 234
    setvar yweapon 282
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 15
	setvar xweapon 134
   	setvar yweapon 226
	state hudcoordfix
    setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 3
    addvar xweapon -60
	addvar yweapon 45
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar tilenumweapon 7
	addvar xweapon 34
	addvar yweapon -50	
	myospal xweapon yweapon tilenumweapon -128 1 0
	
	setvar xweapon 254
   	setvar yweapon 268
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 33
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 16
	setvar xweapon 134
   	setvar yweapon 226
	state hudcoordfix
    setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 3
    addvar xweapon -60
	addvar yweapon 45
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar tilenumweapon 7
	addvar xweapon 34
	addvar yweapon -50	
	myospal xweapon yweapon tilenumweapon -128 1 0
	setvar xweapon 244
   	setvar yweapon 258
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 33
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	
	case 17
	setvar xweapon 134
   	setvar yweapon 226
	state hudcoordfix
    setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 3
    addvar xweapon -60
	addvar yweapon 45
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar tilenumweapon 7
	addvar xweapon 34
	addvar yweapon -50	
	myospal xweapon yweapon tilenumweapon -128 1 0
	setvar xweapon 236
   	setvar yweapon 246
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 34
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 18
	setvar xweapon 134
   	setvar yweapon 226
	state hudcoordfix
    setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 3
    addvar xweapon -60
	addvar yweapon 45
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar tilenumweapon 7
	addvar xweapon 34
	addvar yweapon -50	
	myospal xweapon yweapon tilenumweapon -128 1 0
	setvar xweapon 240
   	setvar yweapon 250
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 34
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 19
	case 20
	setvar xweapon 144
   	setvar yweapon 216
	state hudcoordfix
    setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 3
    addvar xweapon -60
	addvar yweapon 45
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar tilenumweapon 7
	addvar xweapon 34
	addvar yweapon -50	
	myospal xweapon yweapon tilenumweapon -128 1 0
	
	setvar xweapon 260
   	setvar yweapon 275
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 34
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 21
	case 22
	setvar xweapon 158
   	setvar yweapon 201
	state hudcoordfix
    setvar tilenumweapon LIGHTER
   	addvar tilenumweapon 3
    addvar xweapon -60
	addvar yweapon 45
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar tilenumweapon 7
	addvar xweapon 34
	addvar yweapon -50	
	myospal xweapon yweapon tilenumweapon -128 1 0
	break
 endswitch
ends

state detonatordisplay
ifvarg pos 0 ifvarl pos 11 { setvar pos 0 }
setplayer[THISACTOR].weapon_pos pos
 switch weaponcount
    case 0
    setvar xweapon 60
    setvar yweapon 240
	state hudcoordfix
    setvar tilenumweapon DETONATOR
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon  
		ifvare weaponcount 0
		{ 
		divvar tmp 6
		divvar tmp 10
		modvar tmp 8
	    addvar xweapon 12
		addvar yweapon -48
		ifvare tmp 0 
 		{ myospal xweapon yweapon 8313 0 1 palweapon }
		ifvare tmp 1
		{ 
		addvar xweapon 4 myospal xweapon yweapon 8313 0 1 palweapon 
		addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		}
		ifvare tmp 2 
		{ 
		addvar xweapon 8 myospal xweapon yweapon 8313 0 1 palweapon
		addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		}
		ifvare tmp 3 
		{ 
		addvar xweapon 12 myospal xweapon yweapon 8313 0 1 palweapon
		addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		}
		ifvare tmp 4 
		{ addvar xweapon 12 myospal xweapon yweapon 8313 0 1 palweapon }
		ifvare tmp 5 
		{ 
		addvar xweapon 8 myospal xweapon yweapon 8313 0 1 palweapon 
		addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
		}
		ifvare tmp 6 
		{ 
		addvar xweapon 4 myospal xweapon yweapon 8313 0 1 palweapon
		addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
		}
		ifvare tmp 7 
		{ 
	  	myospal xweapon yweapon 8313 0 1 palweapon
		addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
		}		
		}
    break
    case 1
    case 2
    setvar xweapon 70
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon DETONATOR
    addvar tilenumweapon 1
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon  
    break
    case 3
    case 4
    case 5
    case 6
    setvar xweapon 76
    setvar yweapon 280
	state hudcoordfix
    setvar tilenumweapon DETONATOR
    addvar tilenumweapon 1
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon  
    break
    case 7
    case 8
    setvar xweapon 76
    setvar yweapon 300
	state hudcoordfix
    setvar tilenumweapon DETONATOR
    addvar tilenumweapon 1
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon 
    break
 endswitch

ends

state remotetntdisplay
 switch weaponcount
    case 0
    case 1
    case 2
    case 3
    case 4
    setvar xweapon 210
    setvar yweapon 250
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 5
		{
		 setvar xweapon 180
   		 setvar yweapon 229
		 state hudcoordfix
   		 setvar tilenumweapon DETONATOR
   		 addvar tilenumweapon -2
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	   	 setvar xweapon 60
  		 setvar yweapon 240
		 state hudcoordfix
   		 setvar tilenumweapon DETONATOR
   		 addvar tilenumweapon 0
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
 		 divvar tmp 6
		 divvar tmp 10
		 modvar tmp 8
	     addvar xweapon 12
		 addvar yweapon -48
		 ifvare tmp 0 
 		 { myospal xweapon yweapon 8313 0 1 palweapon }
		 ifvare tmp 1
		 { 
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 1 palweapon 
		 addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 2 
		 { 
		 addvar xweapon 8 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 3 
		 { 
		 addvar xweapon 12 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 4 
		 { 
		 addvar xweapon 12 myospal xweapon yweapon 8313 0 1 palweapon
  		 addvar xweapon 91 addvar yweapon 40 myospal xweapon yweapon 8324 0 0 palweapon
		 }
		 ifvare tmp 5 
		 { 
		 addvar xweapon 8 myospal xweapon yweapon 8313 0 1 palweapon 
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
		 addvar xweapon 91 addvar yweapon 40 myospal xweapon yweapon 8324 0 0 palweapon
		 }
		 ifvare tmp 6 
		 { 
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
         addvar xweapon 95 addvar yweapon 40 myospal xweapon yweapon 8324 0 0 palweapon
		 }
		 ifvare tmp 7 
		 { 
	  	 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
         addvar xweapon 99 addvar yweapon 40 myospal xweapon yweapon 8324 0 0 palweapon
		 }  
		}
    break
    case 5
    case 6
    case 7
    setvar xweapon 235
    setvar yweapon 290
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 8
		{
		 setvar xweapon 205
   		 setvar yweapon 269
		 state hudcoordfix
   		 setvar tilenumweapon DETONATOR
   		 addvar tilenumweapon -2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	   	 setvar xweapon 73
  		 setvar yweapon 245
		 state hudcoordfix
   		 setvar tilenumweapon DETONATOR
   		 addvar tilenumweapon 0
   		 rotatesprite xweapon yweapon 65536 100 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		}
    break
    case 8
    case 9
    case 10
    setvar xweapon 240
    setvar yweapon 310
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 11
		{
		 setvar xweapon 210
   		 setvar yweapon 289
		 state hudcoordfix
   		 setvar tilenumweapon DETONATOR
   		 addvar tilenumweapon -2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	   	 setvar xweapon 80
  		 setvar yweapon 247
		 state hudcoordfix
   		 setvar tilenumweapon DETONATOR
   		 addvar tilenumweapon 0
   		 rotatesprite xweapon yweapon 65536 120 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		}
    break
    case 11
    case 12
    case 13
    setvar xweapon 80
    setvar yweapon 245
	state hudcoordfix
    setvar tilenumweapon DETONATOR
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 80 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
    case 14
    case 15 
    case 16
		ifvarg weaponcount 13 ifvarl weaponcount 15
		{
		setvar xweapon 254
	   	setvar yweapon 268
		state hudcoordfix
	    setvar tilenumweapon DYNAMITE
	   	addvar tilenumweapon 33
		myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 14 ifvarl weaponcount 16
		{
		setvar xweapon 244
	   	setvar yweapon 258
		state hudcoordfix
	    setvar tilenumweapon DYNAMITE
	   	addvar tilenumweapon 33
		myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 15 ifvarl weaponcount 17
		{
	   	 setvar xweapon 40
  		 setvar yweapon 255
		 state hudcoordfix
   		 setvar tilenumweapon DETONATOR
   		 addvar tilenumweapon 0
   		 rotatesprite xweapon yweapon 65536 -40 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		 
		setvar xweapon 236
	   	setvar yweapon 246
		state hudcoordfix
	    setvar tilenumweapon DYNAMITE
	   	addvar tilenumweapon 34
		myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    break
    case 17
    case 18
    case 19
		ifvarg weaponcount 16 ifvarl weaponcount 18
		{
		setvar xweapon 240
	   	setvar yweapon 250
		state hudcoordfix
	    setvar tilenumweapon DYNAMITE
	   	addvar tilenumweapon 34
		myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarg weaponcount 17 ifvarl weaponcount 20
		{
		setvar xweapon 260
	   	setvar yweapon 275
		state hudcoordfix
	    setvar tilenumweapon DYNAMITE
	   	addvar tilenumweapon 34
		myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
		ifvarl weaponcount 20
		{
	   	 setvar xweapon 60
  		 setvar yweapon 240
		 state hudcoordfix
   		 setvar tilenumweapon DETONATOR
   		 addvar tilenumweapon 0
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon

 		 divvar tmp 6
		 divvar tmp 10
		 modvar tmp 8
	     addvar xweapon 12
		 addvar yweapon -48
		 ifvare tmp 0 
 		 { myospal xweapon yweapon 8313 0 1 palweapon }
		 ifvare tmp 1
		 { 
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 1 palweapon 
		 addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 2 
		 { 
		 addvar xweapon 8 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 3 
		 { 
		 addvar xweapon 12 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 4 
		 { addvar xweapon 12 myospal xweapon yweapon 8313 0 1 palweapon }
		 ifvare tmp 5 
		 { 
		 addvar xweapon 8 myospal xweapon yweapon 8313 0 1 palweapon 
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 6 
		 { 
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 7 
		 { 
	  	 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
		 }  
		}
    break
    case 20
    case 21
    case 22
    setvar xweapon 60
    setvar yweapon 240
	state hudcoordfix
	setvar tilenumweapon DETONATOR
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarg weaponcount 19
		{
 		 divvar tmp 6
		 divvar tmp 10
		 modvar tmp 8
	         addvar xweapon 12
		 addvar yweapon -48
		 ifvare tmp 0 
 		 { myospal xweapon yweapon 8313 0 1 palweapon }
		 ifvare tmp 1
		 { 
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 1 palweapon 
		 addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 2 
		 { 
		 addvar xweapon 8 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 3 
		 { 
		 addvar xweapon 12 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon -4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 4 
		 { addvar xweapon 12 myospal xweapon yweapon 8313 0 1 palweapon }
		 ifvare tmp 5 
		 { 
		 addvar xweapon 8 myospal xweapon yweapon 8313 0 1 palweapon 
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 6 
		 { 
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
		 }
		 ifvare tmp 7 
		 { 
	  	 myospal xweapon yweapon 8313 0 1 palweapon
		 addvar xweapon 4 myospal xweapon yweapon 8313 0 33 palweapon
		 }  
		}
    break
 endswitch
ends

state proximityminedisplay
 switch weaponcount
    case 0
    case 1
    case 2
    case 3
    case 4
    setvar xweapon 210
    setvar yweapon 250
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 5
		{
		 setvar xweapon 176
   		 setvar yweapon 218
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 6
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
 		 addvar tilenumweapon 1	
		 addvar yweapon 12
		 addvar xweapon 1
         myospal xweapon yweapon tilenumweapon 0 orientationweapon palweapon
		}
    break
    case 5
    case 6
    case 7
    setvar xweapon 230
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 8
		{
		 setvar xweapon 196
   		 setvar yweapon 238
		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 6
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
 		 addvar tilenumweapon 1	
		 addvar yweapon 12
		 addvar xweapon 1
         myospal xweapon yweapon tilenumweapon 0 orientationweapon palweapon
		}
    break
	case 8
    case 9
    case 10
    setvar xweapon 260
    setvar yweapon 310
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		ifvarl weaponcount 11
		{
		 setvar xweapon 226
   		 setvar yweapon 278
   		 state hudcoordfix
   		 setvar tilenumweapon DYNAMITE
   		 addvar tilenumweapon 6
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		}
    break
	case 15
	setvar xweapon 236
   	setvar yweapon 246
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 34
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 16
	setvar xweapon 240
   	setvar yweapon 250
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 34
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 17
	case 18
	setvar xweapon 260
   	setvar yweapon 275
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 34
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
  endswitch
ends

state sprayaltfire
 switch sprayalt
    case 1
	case 2
		ifvarl weaponcount 3
		{
		 setvar xweapon 148
   		 setvar yweapon 201
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
	setvar xweapon 155
    setvar yweapon 252
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon -25
    rotatesprite xweapon yweapon 65536 128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
    case 3
	case 4
		ifvarl weaponcount 5
		{
		 setvar xweapon 148
   		 setvar yweapon 201
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon 128 1 0
		}
    setvar xweapon 155
    setvar yweapon 252
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon -25
    rotatesprite xweapon yweapon 65536 96 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
    case 5
	case 6
		ifvarl weaponcount 7
		{
		 setvar xweapon 148
   		 setvar yweapon 201
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
	setvar xweapon 155
    setvar yweapon 252
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon -25
    rotatesprite xweapon yweapon 65536 64 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 7
	case 8
		ifvarl weaponcount 9
		{
		 setvar xweapon 148
   		 setvar yweapon 201
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
	setvar xweapon 162
    setvar yweapon 243
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon -25
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 100
   	setvar yweapon 172
	state hudcoordfix
   	setvar tilenumweapon 8403
	divvar tmp3 100
	modvar tmp3 5
	mulvar tmp3 5
	addvarvar tilenumweapon tmp3
	rotatesprite xweapon yweapon 35536 -768 tilenumweapon 0 palweapon orientationweapon 0 0 xdim ydim
    break
	case 9
	case 10
    setvar xweapon 182
    setvar yweapon 253
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon -25
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 120
   	setvar yweapon 182
	state hudcoordfix
   	setvar tilenumweapon 8403
	divvar tmp3 100
	modvar tmp3 5
	mulvar tmp3 5
	addvarvar tilenumweapon tmp3
	rotatesprite xweapon yweapon 35536 -768 tilenumweapon 0 palweapon orientationweapon 0 0 xdim ydim
		ifvare weaponcount 9
		{
		 setvar xweapon 138
   		 setvar yweapon 211
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
		ifvarl weaponcount 11
		{
		 setvar xweapon 128
   		 setvar yweapon 221
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    break
	
    case 11
    case 12
    setvar xweapon 215
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon -25
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	
	setvar xweapon 153
   	setvar yweapon 198
	state hudcoordfix
   	setvar tilenumweapon 8403
	divvar tmp3 100
	modvar tmp3 5
	mulvar tmp3 5
	addvarvar tilenumweapon tmp3
	rotatesprite xweapon yweapon 35536 -768 tilenumweapon 0 palweapon orientationweapon 0 0 xdim ydim
		ifvare weaponcount 11
		{
		 setvar xweapon 108
   		 setvar yweapon 241
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
		ifvarl weaponcount 13
		{
		 setvar xweapon 98
   		 setvar yweapon 251
		 state hudcoordfix
 		 setvar tilenumweapon LIGHTER
   		 addvar tilenumweapon 3
         addvar xweapon -60
		 addvar yweapon 45
		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
		 addvar tilenumweapon 7
		 addvar xweapon 34
		 addvar yweapon -50	
		 myospal xweapon yweapon tilenumweapon -128 1 0
		}
    break
	
	case 13
    case 14
    setvar xweapon 224
    setvar yweapon 272
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon -25
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 153
   	setvar yweapon 198
	state hudcoordfix
   	setvar tilenumweapon 8403
	divvar tmp3 100
	modvar tmp3 5
	mulvar tmp3 5
	addvarvar tilenumweapon tmp3
	setvar ang -768
	setvarvar tmp dtime
	divvar tmp 17
	subvarvar yweapon tmp
	mulvar tmp 1600
	setvar tmp2 49152
	addvarvar tmp2 tmp
	rotatesprite xweapon yweapon tmp2 ang tilenumweapon 0 palweapon orientationweapon 0 0 xdim ydim
    break
	
 endswitch
ends

state spraycandisplay
ifvarn sprayalt 0 { state sprayaltfire break }
 switch weaponcount
    case 0
	stopsound SPRAYFIR
    setvar xweapon 160
    setvar yweapon 240
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
    case 1
    case 2
	case 3
		ifvarl weaponcount 4
		{
		 setvar xweapon 107
   		 setvar yweapon 240
		 state hudcoordfix
         setvar tilenumweapon LIGHTER
         addvar tilenumweapon 3
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
        }
    setvar xweapon 150
    setvar yweapon 236
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon 1
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	
	
	case 4
	setvar xweapon 254
   	setvar yweapon 268
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 33
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 5
	setvar xweapon 244
   	setvar yweapon 258
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 33
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 6
	setvar xweapon 236
   	setvar yweapon 246
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 34
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 7
	setvar xweapon 240
   	setvar yweapon 250
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 34
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 8
	case 9
	setvar xweapon 260
   	setvar yweapon 275
	state hudcoordfix
    setvar tilenumweapon DYNAMITE
   	addvar tilenumweapon 34
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 10	case 11 case 12 case 13	break
	case 14
		 setvar xweapon 87
   		 setvar yweapon 260
		 state hudcoordfix
         setvar tilenumweapon LIGHTER
         addvar tilenumweapon 3
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 160
    setvar yweapon 280
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 15
		 setvar xweapon 97
   		 setvar yweapon 250
		 state hudcoordfix
         setvar tilenumweapon LIGHTER
         addvar tilenumweapon 3
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 160
    setvar yweapon 270
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 16
		 setvar xweapon 107
   		 setvar yweapon 240
		 state hudcoordfix
         setvar tilenumweapon LIGHTER
         addvar tilenumweapon 3
   		 myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 160
    setvar yweapon 260
	state hudcoordfix
    setvar tilenumweapon BLSPRAYCAN
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
 endswitch
ends

state teslaaltdisplay
 switch teslaalt
    case 1
	case 2
	case 3
	case 4
    setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 5
	case 6
	case 7
	case 8
    setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 158
   	setvar yweapon 207
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 15000 -384 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 9
	case 10
	case 11
    setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 156
   	setvar yweapon 205
   	state hudcoordfix
	setvar tilenumweapon 7207
   	rotatesprite xweapon yweapon 17000 -384 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 12
	case 13
    case 14
    setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 201
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 183
   	setvar yweapon 197
   	state hudcoordfix
	setvar tilenumweapon 7208
   	rotatesprite xweapon yweapon 32768 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 15
	case 16
    case 17
    setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 183
   	setvar yweapon 194
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 32768 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 18
	case 19
	case 20
    setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 198
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
   	setvar yweapon 189
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 32768 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 21
	case 22
	case 23
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 24
	case 25
    setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	break
	case 26
	case 27
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 201
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 178
   	setvar yweapon 192
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 32768 -256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 167
   	setvar yweapon 208
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 12000 -384 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 28
	case 29
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 178
   	setvar yweapon 192
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 32768 -256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 167
   	setvar yweapon 208
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 12000 -384 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 30
    setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 198
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 178
   	setvar yweapon 192
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 32768 -256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 167
   	setvar yweapon 208
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 12000 -384 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 31
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 172
   	setvar yweapon 190
   	state hudcoordfix
	setvar tilenumweapon 7203
   	rotatesprite xweapon yweapon 32768 -64 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	break
	case 32
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 172
   	setvar yweapon 190
   	state hudcoordfix
	setvar tilenumweapon 7203
   	rotatesprite xweapon yweapon 32768 -64 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	break
	case 33
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 201
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 172
   	setvar yweapon 190
   	state hudcoordfix
	setvar tilenumweapon 7203
   	rotatesprite xweapon yweapon 32768 -64 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 34
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 164
   	setvar yweapon 215
   	state hudcoordfix
	setvar tilenumweapon 7207
   	rotatesprite xweapon yweapon 24000 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 35
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 164
   	setvar yweapon 215
   	state hudcoordfix
	setvar tilenumweapon 7207
   	rotatesprite xweapon yweapon 24000 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	break
	case 36
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 170
   	setvar yweapon 193
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 24000 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 164
   	setvar yweapon 205
   	state hudcoordfix
	setvar tilenumweapon 7208
   	rotatesprite xweapon yweapon 24000 256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	break
	case 37
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 201
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 170
   	setvar yweapon 193
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 24000 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 164
   	setvar yweapon 205
   	state hudcoordfix
	setvar tilenumweapon 7208
   	rotatesprite xweapon yweapon 24000 256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 38
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 171
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 170
   	setvar yweapon 193
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 24000 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 164
   	setvar yweapon 205
   	state hudcoordfix
	setvar tilenumweapon 7208
   	rotatesprite xweapon yweapon 24000 256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	
	////////////////////////////
	
	case 39
	setvar xweapon 201
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 171
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 185
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 40
	setvar xweapon 203
    setvar yweapon 241
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 175
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 187
    setvar yweapon 224
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 41
    setvar xweapon 205
    setvar yweapon 244
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 175
   	setvar yweapon 206
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 189
    setvar yweapon 227
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 42
    setvar xweapon 202
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 172
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 186
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 43
	setvar xweapon 203
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 174
   	setvar yweapon 204
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 187
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 44
	setvar xweapon 205
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 176
   	setvar yweapon 198
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 168
   	setvar yweapon 212
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 20000 -1280 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 189
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 45
	setvar xweapon 201
    setvar yweapon 242
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 172
   	setvar yweapon 200
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 165
   	setvar yweapon 212
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 20000 -1280 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 185
    setvar yweapon 225
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 46
	setvar xweapon 207
    setvar yweapon 239
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 177
   	setvar yweapon 201
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 172
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 36000 128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 191
    setvar yweapon 222
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 47
	setvar xweapon 200
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 170
   	setvar yweapon 205
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 165
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 32768 -640 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 184
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 48
	setvar xweapon 202
    setvar yweapon 244
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 174
   	setvar yweapon 205
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
   	setvar xweapon 173
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon 7203
   	rotatesprite xweapon yweapon 32768 -640 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 186
    setvar yweapon 227
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 49
	setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 171
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 175
   	setvar yweapon 191
   	state hudcoordfix
	setvar tilenumweapon 7208
   	rotatesprite xweapon yweapon 49000 -640 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 50
	setvar xweapon 205
    setvar yweapon 242
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 176
   	setvar yweapon 201
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 181
   	setvar yweapon 195
   	state hudcoordfix
	setvar tilenumweapon 7207
   	rotatesprite xweapon yweapon 49000 -640 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 167
   	setvar yweapon 210
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 17000 -256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 189
    setvar yweapon 225
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 51
	setvar xweapon 207
    setvar yweapon 241
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 177
   	setvar yweapon 203
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 187
   	setvar yweapon 194
   	state hudcoordfix
	setvar tilenumweapon 7208
   	rotatesprite xweapon yweapon 38000 512 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 167
   	setvar yweapon 210
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 17000 -256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 191
    setvar yweapon 224
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 52
	setvar xweapon 205
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 175
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 189
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 53
	setvar xweapon 202
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 172
   	setvar yweapon 206
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 186
    setvar yweapon 228
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 54
	setvar xweapon 205
    setvar yweapon 241
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 177
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 189
    setvar yweapon 224
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 55
	setvar xweapon 203
    setvar yweapon 241
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 175
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 172
   	setvar yweapon 200
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 12000 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 187
    setvar yweapon 224
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 56
    setvar xweapon 205
    setvar yweapon 244
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 175
   	setvar yweapon 206
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 172
   	setvar yweapon 200
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 12000 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 163
   	setvar yweapon 200
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 23000 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 189
    setvar yweapon 227
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 57
    setvar xweapon 202
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 172
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 180
   	setvar yweapon 190
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 23000 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 163
   	setvar yweapon 200
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 23000 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 186
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 58
	setvar xweapon 203
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 174
   	setvar yweapon 204
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 177
   	setvar yweapon 196
   	state hudcoordfix
	setvar tilenumweapon 7203
   	rotatesprite xweapon yweapon 32768 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 187
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 59
	setvar xweapon 205
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 176
   	setvar yweapon 198
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 177
   	setvar yweapon 196
   	state hudcoordfix
	setvar tilenumweapon 7203
   	rotatesprite xweapon yweapon 32768 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 189
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 60
	setvar xweapon 201
    setvar yweapon 242
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 172
   	setvar yweapon 200
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 165
   	setvar yweapon 210
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 12000 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 172
   	setvar yweapon 206
   	state hudcoordfix
	setvar tilenumweapon 7207
   	rotatesprite xweapon yweapon 12000 256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 166
   	setvar yweapon 207
   	state hudcoordfix
	setvar tilenumweapon 7208
   	rotatesprite xweapon yweapon 12000 32 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 185
    setvar yweapon 225
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 61
	setvar xweapon 207
    setvar yweapon 239
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 177
   	setvar yweapon 201
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 165
   	setvar yweapon 210
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 12000 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 172
   	setvar yweapon 206
   	state hudcoordfix
	setvar tilenumweapon 7207
   	rotatesprite xweapon yweapon 12000 256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 166
   	setvar yweapon 207
   	state hudcoordfix
	setvar tilenumweapon 7208
   	rotatesprite xweapon yweapon 12000 32 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 191
    setvar yweapon 222
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 62
	case 63
	setvar xweapon 220
    setvar yweapon 265
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
	rotatesprite xweapon yweapon 65536 48 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 165
   	setvar yweapon 186
   	state hudcoordfix
	setvar tilenumweapon 8288
   	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade 6 1 0 0 xdim ydim
	setvar xweapon 195
   	setvar yweapon 140
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 50000 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 287
   	setvar yweapon 190
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 50000 1424 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 93
   	setvar yweapon 194
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 65536 -1424 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 144
   	setvar yweapon 325
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 65536 128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 297
   	setvar yweapon 260
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 50000 -1424 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 208
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	break
	case 64
	setvar xweapon 270
    setvar yweapon 265
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
	rotatesprite xweapon yweapon 65536 64 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 155
   	setvar yweapon 188
   	state hudcoordfix
	setvar tilenumweapon 8290
   	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade 6 1 0 0 xdim ydim
	setvar xweapon 195
   	setvar yweapon 20
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 50000 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 330
   	setvar yweapon 190
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 50000 1424 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon -20
   	setvar yweapon 186
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 65536 -1424 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 258
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	break
	case 65	case 66 case 67 case 68	case 69	break
	case 70
	case 71
	setvar xweapon 230
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
	rotatesprite xweapon yweapon 65536 48 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 218
    setvar yweapon 230
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	break
 endswitch
ends

state akimboteslaaltdisplay
 switch akimboteslaalt
	case 1
	case 2 
	case 3
	setvar xweapon 51
    setvar yweapon 253
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
	setvar xweapon 251
    setvar yweapon 255
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -13
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	
	setvar xweapon 221
   	setvar yweapon 207
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 32768 -256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 220
   	setvar yweapon 218
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 23000 -256 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 4
	setvar xweapon 51
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
	setvar xweapon 88
   	setvar yweapon 210
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 32768 128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 251
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -13
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 5
	case 6
	case 7
	setvar xweapon 51
    setvar yweapon 247
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -21
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 90
   	setvar yweapon 207
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 32768 128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 67
   	setvar yweapon 205
   	state hudcoordfix
	setvar tilenumweapon 7203
   	rotatesprite xweapon yweapon 23000 128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 255
    setvar yweapon 249
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -14
   	addvar yweapon -21
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 8
	setvar xweapon 48
    setvar yweapon 251
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 15
   	addvar yweapon -23
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 93
   	setvar yweapon 207
   	state hudcoordfix
	setvar tilenumweapon 7207
   	rotatesprite xweapon yweapon 32768 128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 67
   	setvar yweapon 200
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 23000 128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 253
    setvar yweapon 247
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -14
   	addvar yweapon -23
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 9
	setvar xweapon 48
    setvar yweapon 247
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 15
   	addvar yweapon -24
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 93
   	setvar yweapon 207
   	state hudcoordfix
	setvar tilenumweapon 7207
   	rotatesprite xweapon yweapon 13000 128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 70
   	setvar yweapon 198
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 32768 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	
	setvar xweapon 256
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -13
   	addvar yweapon -24
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 10
	case 11
	setvar xweapon 53
    setvar yweapon 252
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 75
   	setvar yweapon 198
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 32768 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim

	setvar xweapon 259
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -13
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 157
   	setvar yweapon 213
   	state hudcoordfix
	setvar tilenumweapon 6276
   	rotatesprite xweapon yweapon 65536 -16 tilenumweapon 0 palweapon 1 0 0 xdim ydim
    break
	case 12
	case 13
	setvar xweapon 50
    setvar yweapon 255
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 80
   	setvar yweapon 200
   	state hudcoordfix
	setvar tilenumweapon 7207
   	rotatesprite xweapon yweapon 24000 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 261
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -13
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 220
   	setvar yweapon 218
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 32768 -512 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 14
	case 15
	setvar xweapon 45
    setvar yweapon 255
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -21
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 85
   	setvar yweapon 214
   	state hudcoordfix
	setvar tilenumweapon 7204
   	rotatesprite xweapon yweapon 32768 384 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 261
    setvar yweapon 244
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -14
   	addvar yweapon -21
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 220
   	setvar yweapon 210
   	state hudcoordfix
	setvar tilenumweapon 7207
   	rotatesprite xweapon yweapon 23000 -512 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 16
	case 17
	case 18
	case 19
	setvar xweapon 48
    setvar yweapon 257
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 15
   	addvar yweapon -23
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 82
   	setvar yweapon 208
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 32768 384 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 264
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -14
   	addvar yweapon -23
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 220
   	setvar yweapon 209
   	state hudcoordfix
	setvar tilenumweapon 7208
   	rotatesprite xweapon yweapon 23000 -512 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 20
	case 21
	case 22
	setvar xweapon 51
    setvar yweapon 253
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -24
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 90
   	setvar yweapon 203
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 21000 384 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 261
    setvar yweapon 253
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -13
   	addvar yweapon -24
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 218
   	setvar yweapon 209
   	state hudcoordfix
	setvar tilenumweapon 7203
   	rotatesprite xweapon yweapon 21000 -512 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 23
	case 24
	setvar xweapon 41
    setvar yweapon 253
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 65
   	setvar yweapon 200
   	state hudcoordfix
	setvar tilenumweapon 7205
   	rotatesprite xweapon yweapon 21000 -128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	
	setvar xweapon 261
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -13
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 230
   	setvar yweapon 192
   	state hudcoordfix
	setvar tilenumweapon 7203
   	rotatesprite xweapon yweapon 21000 0 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 25
	case 26
	case 27
	setvar xweapon 41
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 83
   	setvar yweapon 203
   	state hudcoordfix
	setvar tilenumweapon 7206
   	rotatesprite xweapon yweapon 21000 384 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 260
    setvar yweapon 244
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -13
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 28
	setvar xweapon 43
    setvar yweapon 252
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -21
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
	setvar xweapon 262
    setvar yweapon 241
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -14
   	addvar yweapon -21
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon  3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break
	case 29
	case 30
	setvar xweapon 48
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 15
   	addvar yweapon -23
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
	setvar xweapon 265
    setvar yweapon 244
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -14
   	addvar yweapon -23
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	
	setvar xweapon 157
   	setvar yweapon 213
   	state hudcoordfix
	setvar tilenumweapon 6276
   	rotatesprite xweapon yweapon 65536 -16 tilenumweapon 0 palweapon 1 0 0 xdim ydim
	
    break
	case 31
	case 32
	setvar xweapon 43
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -24
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	
	setvar xweapon 260
    setvar yweapon 244
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -13
   	addvar yweapon -24
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	
	setvar xweapon 150
   	setvar yweapon 213
   	state hudcoordfix
	setvar tilenumweapon 6276
   	rotatesprite xweapon yweapon 65536 0 tilenumweapon 0 palweapon 1 0 0 xdim ydim
    break
	case 33
	case 34
	case 35
	setvar xweapon 44
    setvar yweapon 251
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	addvar xweapon 14
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
	setvar xweapon 264
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	addvar xweapon -13
   	addvar yweapon -20
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 155
   	setvar yweapon 213
   	state hudcoordfix
	setvar tilenumweapon 6276
   	rotatesprite xweapon yweapon 65536 0 tilenumweapon 0 palweapon 1 0 0 xdim ydim
    break
	case 36
	case 37
	case 38
	setvar xweapon 24
    setvar yweapon 271
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	setvar xweapon 284
    setvar yweapon 263
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 205
   	setvar yweapon 190
   	state hudcoordfix
	setvar tilenumweapon 8288
   	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade 6 1 0 0 xdim ydim
	setvar xweapon 90
   	setvar yweapon 190
   	state hudcoordfix
	setvar tilenumweapon 8288
   	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade 6 1 0 0 xdim ydim
	setvar xweapon 300
   	setvar yweapon 150
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 50000 192 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 200
   	setvar yweapon 130
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 65536 -192 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 0
   	setvar yweapon 160
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 50000 -192 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	setvar xweapon 110
   	setvar yweapon 140
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 65536 192 tilenumweapon shade palweapon 4 0 0 xdim ydim
    break
	case 39
	case 40
	case 41
	case 42
	setvar xweapon 7
    setvar yweapon 271
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    rotatesprite xweapon yweapon 65536 886 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 299
    setvar yweapon 263
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 160
   	setvar yweapon 20
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 50000 1024 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
	case 43
	setvar xweapon 51
    setvar yweapon 253
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	
	setvar xweapon 251
    setvar yweapon 255
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	setvar xweapon 160
   	setvar yweapon 20
   	state hudcoordfix
	setvar tilenumweapon 7210
   	rotatesprite xweapon yweapon 50000 1024 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
 endswitch
ends

state plasmagundisplay
ifvarn teslaalt 0 { state teslaaltdisplay break }
 switch weaponcount
    case 0
    setvar xweapon 200
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 184
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
	
    addvar PLASMACOUNT 1
    ifvarl PLASMACOUNT 90 
		{ 
		  setvar xweapon 199
   		  setvar yweapon 250
   		  state hudcoordfix
          setvar tilenumweapon 8355
		  ifvarg PLASMACOUNT 30 { addvar tilenumweapon 1 }
		  ifvarg PLASMACOUNT 60 { addvar tilenumweapon 1 }
   		  myospal xweapon yweapon tilenumweapon shade 33 palweapon
		} else setvar PLASMACOUNT 101
    break
	case 1
	setvar xweapon 221
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 192
   	setvar yweapon 205
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 205
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 2
    setvar xweapon 222
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 193
   	setvar yweapon 202
   	state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 206
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
    case 3
	setvar xweapon 223
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 194
   	setvar yweapon 204
   	state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 207
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 4
    setvar xweapon 224
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 195
   	setvar yweapon 199
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 208
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
    case 5
	setvar xweapon 225
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 196
   	setvar yweapon 201
   	state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 209
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 6
    setvar xweapon 224
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 195
    setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 208
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
    case 7
	setvar xweapon 223
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 194
   	setvar yweapon 204
   	state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 207
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 8
    setvar xweapon 222
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 193
    setvar yweapon 199
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 206
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
    case 9
	setvar xweapon 221
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    setvar PLASMACOUNT 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    setvar xweapon 192
    setvar yweapon 201
   	state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 205
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 10
    setvar xweapon 220
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 0
    setvar PLASMACOUNT 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 191
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 204
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
 endswitch
ends

state plasmaakimbogundisplay
ifvarn akimboteslaalt 0 { state akimboteslaaltdisplay break }
 switch weaponcount
    case 0
    setvar xweapon 60
    setvar yweapon 240
	state hudcoordfix
	ifvarn tsakimbo 0 ifvarn tsakimbo 1
	{
		setvarvar temp tsakimbo
		ifvarl tsakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp 6
		addvarvar yweapon temp
	}
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 13
	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	addvar xweapon 16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	setvar xweapon 120
	setvar yweapon 240
	state hudcoordfix
	addvar xweapon 120
	ifvarn tsakimbo 0 ifvarn tsakimbo 1
	{
		setvarvar temp tsakimbo
		ifvarl tsakimbo -1 
		{ 
			mulvar temp -1 
			setvar tempb 10
			subvarvar tempb temp 
			setvarvar temp tempb 
		}
		mulvar temp -6
		addvarvar xweapon temp
	}
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 13
	rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	addvar xweapon -16
    addvar yweapon -18
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    addvar PLASMACOUNT 1
    ifvarl PLASMACOUNT 90 
		{ 
		  setvar xweapon 240
   		  setvar yweapon 250
		  state hudcoordfix
          setvar tilenumweapon 8355
		  ifvarg PLASMACOUNT 30 { addvar tilenumweapon 1 }
		  ifvarg PLASMACOUNT 60 { addvar tilenumweapon 1 }
   		  myospal xweapon yweapon tilenumweapon shade 33 palweapon
		  
		  setvar xweapon 60
   		  setvar yweapon 250
		  state hudcoordfix
          setvar tilenumweapon 8355
		  ifvarg PLASMACOUNT 30 { addvar tilenumweapon 1 }
		  ifvarg PLASMACOUNT 60 { addvar tilenumweapon 1 }
   		  myospal xweapon yweapon tilenumweapon shade 33 palweapon
		} else setvar PLASMACOUNT 101
    break
	case 1
	setvar xweapon 51
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 82
   	setvar yweapon 205
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 68
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	
	setvar xweapon 251
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 222
   	setvar yweapon 205
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 234
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 2
	setvar xweapon 50
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 81
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 2
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 67
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	
	
    setvar xweapon 252
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 223
   	setvar yweapon 202
   	state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 2
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 236
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
    case 3
	setvar xweapon 49
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 80
   	setvar yweapon 204
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 66
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	
	
	setvar xweapon 253
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 224
   	setvar yweapon 204
   	state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 237
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 4
	setvar xweapon 48
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 79
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 65
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	
	
    setvar xweapon 254
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 225
   	setvar yweapon 199
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 238
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
    case 5
	setvar xweapon 47
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 78
   	setvar yweapon 201
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 64
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	
	
	setvar xweapon 255
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 226
   	setvar yweapon 201
   	state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 239
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 6
	setvar xweapon 48
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 79
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 65
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	
	
    setvar xweapon 254
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 225
    setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 238
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
    case 7
	setvar xweapon 49
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 80
   	setvar yweapon 204
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 3
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 66
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	
	

	setvar xweapon 253
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 224
   	setvar yweapon 204
   	state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 3
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 237
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 8
	setvar xweapon 50
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 81
   	setvar yweapon 199
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 4
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 67
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	
	
    setvar xweapon 252
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 223
    setvar yweapon 199
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 4
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 236
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
    case 9
	setvar xweapon 51
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 82
   	setvar yweapon 201
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 5
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 68
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	
	
	setvar xweapon 251
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    setvar PLASMACOUNT 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    setvar xweapon 222
    setvar yweapon 201
   	state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 5
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 235
    setvar yweapon 226
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
	case 10
	setvar xweapon 52
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 83
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon shade palweapon 4 0 0 xdim ydim
	setvar xweapon 69
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    ifvare invisible 1 { rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 37 0 0 xdim ydim } else rotatesprite xweapon yweapon 65536 1024 tilenumweapon 0 0 4 0 0 xdim ydim
	
	
    setvar xweapon 250
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 13
    setvar PLASMACOUNT 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 221
   	setvar yweapon 202
   	state hudcoordfix
	setvar tilenumweapon PLASMACANNON
	addvar tilenumweapon 1
   	myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
	setvar xweapon 234
    setvar yweapon 223
    state hudcoordfix
    setvar tilenumweapon PLASMACANNON
    addvar tilenumweapon 84
    myospal xweapon yweapon tilenumweapon 0 orientationweapon 0
    break
 endswitch
ends

state lifeleechdisplay
 switch weaponcount
    case 0
    setvar xweapon 59
    setvar yweapon 218
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 0
    myospal xweapon yweapon tilenumweapon shade orientationweapon palweapon
    break 
    case 1
    case 2
    case 3
    setvar xweapon 107
    setvar yweapon 235
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 64 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break 
    case 4
    case 5
    setvar xweapon 130
    setvar yweapon 253
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 96 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break 
    case 6
    case 7
    setvar xweapon 140
    setvar yweapon 249
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break 
    case 8
    case 9
    setvar xweapon 150
    setvar yweapon 249
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break 
    case 10
    case 11
    setvar xweapon 154
    setvar yweapon 247
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 12
		{
		 setvar xweapon 145
   		 setvar yweapon 195
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
                } 
    break 
    case 12
    case 13
    setvar xweapon 150
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 14
		{
		 setvar xweapon 130
   		 setvar yweapon 180
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32768 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
                } 
    break 
    case 14
    case 15
    setvar xweapon 146
    setvar yweapon 247
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 16
		{
		 setvar xweapon 125
   		 setvar yweapon 175
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32768 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 135
   		 setvar yweapon 195
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32768 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 165
   		 setvar yweapon 190
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 165
   		 setvar yweapon 190
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
                } 
    break 
    case 16
    case 17
    setvar xweapon 150
    setvar yweapon 249
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 18
		{
		 setvar xweapon 125
   		 setvar yweapon 180
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 128
   		 setvar yweapon 190
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32768 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 175
   		 setvar yweapon 186
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32768 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break 
    case 18
    case 19
    setvar xweapon 153
    setvar yweapon 247
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 20
		{
		 setvar xweapon 185
   		 setvar yweapon 176
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 125
   		 setvar yweapon 195
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 23000 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 145
   		 setvar yweapon 195
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32768 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 170
   		 setvar yweapon 195
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 145
   		 setvar yweapon 195
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
        } 
    break 
    case 20
    case 21
    setvar xweapon 151
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 22
		{
		 setvar xweapon 175
   		 setvar yweapon 166
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 25000 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 180
   		 setvar yweapon 200
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 130
   		 setvar yweapon 195
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 120
   		 setvar yweapon 210
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 16000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
                } 
    break
    case 22
    case 23
    case 24
    setvar xweapon 149
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 25
		{
		 setvar xweapon 116
   		 setvar yweapon 215
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 13000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 124
   		 setvar yweapon 199
   		 state hudcoordfix
		 setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 165
   		 setvar yweapon 190
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 165
   		 setvar yweapon 190
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 195
   		 setvar yweapon 200
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 23000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
                } 
    break 
    case 25
    case 26
    setvar xweapon 145
    setvar yweapon 247
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 27
		{
		 setvar xweapon 110
   		 setvar yweapon 210
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 24000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 160
   		 setvar yweapon 185
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 163
   		 setvar yweapon 190
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 195
   		 setvar yweapon 205
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 16000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 180
   		 setvar yweapon 190
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 23000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break 
    case 27
    case 28
    case 29
    setvar xweapon 146
    setvar yweapon 246
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 30
		{
		 setvar xweapon 115
   		 setvar yweapon 210
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 25000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 150
   		 setvar yweapon 193
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 30000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 153
   		 setvar yweapon 198
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 69000 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 185
   		 setvar yweapon 210
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 14000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 190 
   		 setvar yweapon 187
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break 
    case 30
    case 31
    setvar xweapon 149
    setvar yweapon 247
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 32
		{
		 setvar xweapon 180
   		 setvar yweapon 180
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 140
   		 setvar yweapon 210
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 48000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 125
   		 setvar yweapon 160
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break 
    case 32
    case 33
    setvar xweapon 147
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 34
		{
		 setvar xweapon 125
   		 setvar yweapon 225
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 40000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 155 
   		 setvar yweapon 165
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 135
   		 setvar yweapon 150
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 153
   		 setvar yweapon 170
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 195
   		 setvar yweapon 225
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 16000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break 
    case 34
    case 35
    setvar xweapon 143
    setvar yweapon 250 
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 36
		{
		 setvar xweapon 160
   		 setvar yweapon 170
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 115
   		 setvar yweapon 230
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 115
   		 setvar yweapon 230
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 210
   		 setvar yweapon 225
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 20000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 190
   		 setvar yweapon 200
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 16000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 120
   		 setvar yweapon 185
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break 
    case 36
    case 37
    case 38
    setvar xweapon 145
    setvar yweapon 247
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 39
		{
		 setvar xweapon 205
   		 setvar yweapon 233
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 27000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 185
   		 setvar yweapon 220
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 20000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 105
   		 setvar yweapon 245
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 165
   		 setvar yweapon 160
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 105
   		 setvar yweapon 215
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 16000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 125
   		 setvar yweapon 175
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 20000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break 
    case 39
    case 40
    setvar xweapon 147
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 41
		{
		 setvar xweapon 203
   		 setvar yweapon 235
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 22000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 183
   		 setvar yweapon 225
   		 state hudcoordfix
		 setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 24000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 105
   		 setvar yweapon 248
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 24000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 176
   		 setvar yweapon 161
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 19000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 103
   		 setvar yweapon 216
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 13000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 145
   		 setvar yweapon 175
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 16000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break
    case 41
    case 42
    case 43
    setvar xweapon 147
    setvar yweapon 253
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 44
		{
		 setvar xweapon 190 
   		 setvar yweapon 235
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 23000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 178
   		 setvar yweapon 227
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 24000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 178
   		 setvar yweapon 227
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 108 
   		 setvar yweapon 255
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 16000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 109
   		 setvar yweapon 212
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 24000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 155
   		 setvar yweapon 175
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 20000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break
    case 44
    case 45
    setvar xweapon 143
    setvar yweapon 253
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 46
		{
		 setvar xweapon 185
   		 setvar yweapon 238
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 23000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 165
   		 setvar yweapon 229
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 24000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 165
   		 setvar yweapon 229
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 112
   		 setvar yweapon 206
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 145
   		 setvar yweapon 178
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 24000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break
    case 46
    case 47
    case 48
    setvar xweapon 143
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 49
		{
		 setvar xweapon 175
   		 setvar yweapon 243
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 152
   		 setvar yweapon 232
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 132
   		 setvar yweapon 203
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 132
   		 setvar yweapon 203
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65000 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 155
   		 setvar yweapon 168
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break
    case 49
    case 50
    setvar xweapon 147
    setvar yweapon 243
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 51
		{
		 setvar xweapon 164
   		 setvar yweapon 253
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 122
   		 setvar yweapon 236
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 157
   		 setvar yweapon 203
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 157
   		 setvar yweapon 203
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65000 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 148
   		 setvar yweapon 164
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 148
   		 setvar yweapon 164
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 64000 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
                } 
    break
    case 51
    case 52
    case 53
    setvar xweapon 150
    setvar yweapon 247
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 54
		{
		 setvar xweapon 122
   		 setvar yweapon 236
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 28000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 177
   		 setvar yweapon 213
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 177
   		 setvar yweapon 213
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65000 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 143
   		 setvar yweapon 154
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
                } 
    break
    case 54
    case 55
    setvar xweapon 145
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 56
		{
		 setvar xweapon 106
   		 setvar yweapon 236
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 16000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 197
   		 setvar yweapon 223
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 137
   		 setvar yweapon 144
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 167
   		 setvar yweapon 164
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 32000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break
    case 56
    case 57
    case 58
    setvar xweapon 144
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 59
		{
		 setvar xweapon 196
   		 setvar yweapon 222
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 25000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 127
   		 setvar yweapon 134
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 22000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 175
   		 setvar yweapon 158
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 36000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 175
   		 setvar yweapon 158
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 22000 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
        } 
    break
    case 59
    case 60
    setvar xweapon 148
    setvar yweapon 252
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 61
		{
		 setvar xweapon 192
   		 setvar yweapon 221
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 18000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 139
   		 setvar yweapon 124
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 14000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 185
   		 setvar yweapon 158
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 35000 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 185
   		 setvar yweapon 158
   		 state hudcoordfix
         setvar tilenumweapon 7566
   		 rotatesprite xweapon yweapon 65000 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
        } 
    break
    case 61
    case 62
    case 63
    setvar xweapon 148
    setvar yweapon 246
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 64
		{
		 setvar xweapon 104
   		 setvar yweapon 122
   		 state hudcoordfix
         setvar tilenumweapon 8249
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon orientationweapon 0 0 xdim ydim
		 setvar xweapon 190
   		 setvar yweapon 120
   		 state hudcoordfix
         setvar tilenumweapon 8250
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon orientationweapon 0 0 xdim ydim
        } 
    break
    case 64
    case 65
    case 66
    setvar xweapon 148
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 67
		{
		 setvar xweapon 104
   		 setvar yweapon 124
   		 state hudcoordfix
         setvar tilenumweapon 8249
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
		 setvar xweapon 190
   		 setvar yweapon 122
   		 state hudcoordfix
         setvar tilenumweapon 8250
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 1 0 0 xdim ydim
        } 
    break
    case 67
    case 68
    case 69
    setvar xweapon 148
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 2
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 70
		{
		 setvar xweapon 104
   		 setvar yweapon 124
   		 state hudcoordfix
         setvar tilenumweapon 8249
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
		 setvar xweapon 190
   		 setvar yweapon 122
   		 state hudcoordfix
         setvar tilenumweapon 8250
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon -128 palweapon 33 0 0 xdim ydim
        } 
    break
    case 70
    case 71
    setvar xweapon 148
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
    case 72
    case 73
    case 74
    setvar xweapon 146
    setvar yweapon 244
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 64 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break
    case 75
    case 76
    setvar xweapon 140
    setvar yweapon 249
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 128 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break 
    case 77
    case 78
    case 79
    setvar xweapon 130
    setvar yweapon 253
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 96 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break 
    case 80
    case 81
    setvar xweapon 107
    setvar yweapon 235
    state hudcoordfix
    setvar tilenumweapon LIFELEECH
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 64 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    break 
 endswitch

ends

state voodoohitdisplay
switch voodoocount1
    case 1
    case 2
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount1 4
		{
		 setvar xweapon 265
   		 setvar yweapon 220
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break     
    case 3
    case 4
    case 5
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount1 7
		{
		 setvar xweapon 207
   		 setvar yweapon 256
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break  
    case 6
    case 7
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount1 10
		{
		 setvar xweapon 207
   		 setvar yweapon 256
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        }  
    break  
    case 8
    case 9
    case 10
    setvar xweapon 125
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount1 13
		{
		 setvar xweapon 207
   		 setvar yweapon 254
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break   
    case 11
    case 12
    setvar xweapon 120
    setvar yweapon 235
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount1 16
		{
		 setvar xweapon 260
   		 setvar yweapon 225
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break  
    case 13
    case 14
    case 15
    setvar xweapon 120
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount1 19
		{
		 setvar xweapon 280
   		 setvar yweapon 220
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break 
 endswitch
 
		ifvarg voodoocount1 3
		ifvarl voodoocount1 9
		{
 		 setvar xweapon 140
   		 setvar yweapon 236
   		 state hudcoordfix
         setvar tilenumweapon 5845
		ifvarg voodoocount1 3 ifvarl voodoocount1 6 { addvar tilenumweapon 1 }
		ifvarg voodoocount1 5 ifvarl voodoocount1 8 { addvar tilenumweapon 2 }
		ifvarg voodoocount1 7 ifvarl voodoocount1 10 { addvar tilenumweapon 3 }
		ifvarg voodoocount1 8 ifvarl voodoocount1 12 { addvar tilenumweapon 4 }
		ifvarg voodoocount1 11 ifvarl voodoocount1 14 { addvar tilenumweapon 5 }
		rotatesprite xweapon yweapon 65536 0 tilenumweapon shade 0 orientationweapon 0 0 xdim ydim
		} 
ends

state voodoohit2display
switch voodoocount2
    case 1
    case 2
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount2 3
		{
		 setvar xweapon 261
   		 setvar yweapon 217
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break     
    case 3
    case 4
	case 5
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount2 6
		{
		 setvar xweapon 203
   		 setvar yweapon 243
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break
    case 6
    case 7
	case 8
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount2 9
		{
		 setvar xweapon 203
   		 setvar yweapon 243
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		 setvar xweapon 141
   		 setvar yweapon 217
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 3
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		}
    break  
    case 9
	case 10
    setvar xweapon 125
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount2 11
		{
		 setvar xweapon 203
   		 setvar yweapon 241
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break   
    case 11
    case 12
    setvar xweapon 120
    setvar yweapon 242
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount2 13
		{
		 setvar xweapon 256
   		 setvar yweapon 212
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break  
    case 13
    case 14
	case 15
    setvar xweapon 120
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount2 16
		{
		 setvar xweapon 276
   		 setvar yweapon 207
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break 
 endswitch
ends

state voodoohit3display
switch voodoocount3
    case 1
    case 2
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount3 3
		{
		 setvar xweapon 267
   		 setvar yweapon 204
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break     
    case 3
    case 4
	case 5
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount3 6
		{
		 setvar xweapon 209
   		 setvar yweapon 230
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break
    case 6
    case 7
	case 8
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount3 9
		{
		 setvar xweapon 209
   		 setvar yweapon 230
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		 setvar xweapon 147
   		 setvar yweapon 204
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 3
   		 rotatesprite xweapon yweapon 49152 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		}
    break  
    case 9
	case 10
    setvar xweapon 125
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount3 11
		{
		 setvar xweapon 209
   		 setvar yweapon 228
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break   
    case 11
    case 12
    setvar xweapon 120
    setvar yweapon 242
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount3 13
		{
		 setvar xweapon 262
   		 setvar yweapon 199
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break  
    case 13
    case 14
	case 15
    setvar xweapon 120
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount3 16
		{
		 setvar xweapon 282
   		 setvar yweapon 194
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break 
 endswitch
ends

state voodoohit4display
switch voodoocount4
    case 1
    case 2
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount4 3
		{
		 setvar xweapon 267
   		 setvar yweapon 204
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break     
    case 3
    case 4
	case 5
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount4 6
		{
		 setvar xweapon 202
   		 setvar yweapon 217
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break
	case 6
    case 7
	setvar xweapon 125
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount4 8
		{
		 setvar xweapon 193
   		 setvar yweapon 223
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break
	case 8
    case 9
	case 10
    case 11
	case 12
    case 13
	case 14
	case 15
	setvar xweapon 122
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount4 16
		{
		 setvar xweapon 190
   		 setvar yweapon 226
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break
	case 16
    case 17
	case 18
    setvar xweapon 125
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount4 19
		{
		 setvar xweapon 209
   		 setvar yweapon 228
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break   
    case 19
    case 20
    setvar xweapon 120
    setvar yweapon 242
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount4 21
		{
		 setvar xweapon 262
   		 setvar yweapon 199
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break  
    case 21
    case 22
	case 23
    setvar xweapon 120
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount4 25
		{
		 setvar xweapon 282
   		 setvar yweapon 194
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break 
 endswitch
ends

state voodoohit5display
switch voodoocount5
    case 1
    case 2
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount5 3
		{
		 setvar xweapon 267
   		 setvar yweapon 204
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break     
    case 3
    case 4
    setvar xweapon 130
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount5 5
		{
		 setvar xweapon 232
   		 setvar yweapon 247
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break
	case 11
	case 12
	
	case 17
	case 18
	case 19
	case 20
	
	case 25
	case 26
	case 27
	
	setvar xweapon 122
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount5 28
		{
		 setvar xweapon 209
   		 setvar yweapon 273
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break
	case 5
	case 6
	case 7
	case 8
	case 9
	case 10
	
	case 13
	case 14
	case 15
	case 16
	
	case 21
	case 22
	case 23
	case 24
	
	setvar xweapon 122
    setvar yweapon 248
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount5 28
		{
		 setvar xweapon 209
   		 setvar yweapon 273
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break
	case 28
    case 29
	case 30
    setvar xweapon 125
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount5 31
		{
		 setvar xweapon 232
   		 setvar yweapon 248
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break   
    case 31
    case 32
    setvar xweapon 120
    setvar yweapon 242
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount5 33
		{
		 setvar xweapon 262
   		 setvar yweapon 199
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break  
    case 33
    case 34
	case 35
    setvar xweapon 120
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodoocount5 36
		{
		 setvar xweapon 282
   		 setvar yweapon 194
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break 
 endswitch
ends

state voodooaltdisplay
 switch voodooalt
    case 1
    case 2
	case 3
    setvar xweapon 135
    setvar yweapon 230
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodooalt 4
		{
		 setvar xweapon 295
   		 setvar yweapon 245
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break     
    case 4
    case 5
	case 6
    setvar xweapon 135
    setvar yweapon 225
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodooalt 7
		{
		 setvar xweapon 265
   		 setvar yweapon 265
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
	break
	case 7
    case 8
	case 9
    setvar xweapon 135
    setvar yweapon 225
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodooalt 10
		{
		 setvar xweapon 175
   		 setvar yweapon 280
   		 state hudcoordfix
         setvar tilenumweapon 8285
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
	break
	case 10
    case 11
	case 12
    setvar xweapon 135
    setvar yweapon 225
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodooalt 13
		{
		 setvar xweapon 125
   		 setvar yweapon 270
   		 state hudcoordfix
         setvar tilenumweapon 8285
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
	break
	case 13
    case 14
	case 15
    setvar xweapon 130
    setvar yweapon 230
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodooalt 16
		{
		 setvar xweapon 100
   		 setvar yweapon 245
   		 state hudcoordfix
         setvar tilenumweapon 8285
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
	break
	case 16
    case 17
	case 18
    setvar xweapon 130
    setvar yweapon 230
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodooalt 19
		{
		 setvar xweapon 130
   		 setvar yweapon 225
   		 state hudcoordfix
         setvar tilenumweapon 8269
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
	break
	case 19
    case 20
	case 21
    setvar xweapon 130
    setvar yweapon 230
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodooalt 22
		{
		 setvar xweapon 190
   		 setvar yweapon 210
   		 state hudcoordfix
         setvar tilenumweapon 8269
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
	break
	case 22
    case 23
	case 24
    setvar xweapon 125
    setvar yweapon 235
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodooalt 25
		{
		 setvar xweapon 230
   		 setvar yweapon 210
   		 state hudcoordfix
         setvar tilenumweapon 8269
   		 rotatesprite xweapon yweapon 65536 32 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
	break
	case 25
    case 26
	case 27
    setvar xweapon 122
    setvar yweapon 240
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim

	break
	case 28
    case 29
	case 30
    setvar xweapon 120
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl voodooalt 31
		{
		 setvar xweapon 320
   		 setvar yweapon 240
   		 state hudcoordfix
         setvar tilenumweapon 8269
   		 rotatesprite xweapon yweapon 65536 64 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
	break
 endswitch
ends

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

 switch weaponcount
    case 0
    setvar xweapon 120
    setvar yweapon 250
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 0
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
		ifvarl weaponcount 1
		{
		 setvar xweapon 300
   		 setvar yweapon 225
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
        } 
    break 
 endswitch
ends

state voodoomovedisplay
 switch weaponcount
	case 0
	setvar xweapon 120
    setvar yweapon 245
    state hudcoordfix
    setvar tilenumweapon VOODOODOLL
    addvar tilenumweapon 1
    rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
	ifvarl weaponcount 1
	{
		 setvar xweapon 290
   		 setvar yweapon 230
   		 state hudcoordfix
         setvar tilenumweapon VOODOODOLL
		 addvar tilenumweapon 2
   		 rotatesprite xweapon yweapon 65536 0 tilenumweapon shade palweapon orientationweapon 0 0 xdim ydim
    } 
	break
 endswitch
ends

onevent EVENT_WEAPKEY6
ifinwater ifvare WEAPON_VAR_TNT 1 setvar WEAPON_VAR_TNT 2
ifvare CURRWEAP 5
ifvare player[THISACTOR].kickback_pic 0
ifvare player[THISACTOR].weapon_pos 0
ifvare tntalt 0
  {  
       ifvare WEAPON_VAR_TNT 1
       {
	     ifvarg PROXIMITYMINE_AMMOAMOUNT 0 
		 { setvar changeweappos 2 setplayer[THISACTOR].weapon_pos -1 } else ifvarg REMOTETNT_AMMOAMOUNT 0 { setvar changeweappos 3 setplayer[THISACTOR].weapon_pos -1 }
		 setvar LIGHTERENABLE 0
       }
	   else ifvare WEAPON_VAR_TNT 2
       {
         ifvarg REMOTETNT_AMMOAMOUNT 0 { setvar changeweappos 3 setplayer[THISACTOR].weapon_pos -1 } else ifvarg TNT_AMMOAMOUNT 0 { setvar changeweappos 1 setplayer[THISACTOR].weapon_pos -1 }
		 setvar LIGHTERENABLE 0
       }
       else ifvare WEAPON_VAR_TNT 3
       {
	     ifvarg TNT_AMMOAMOUNT 0 { ifinwater { ifvarg PROXIMITYMINE_AMMOAMOUNT 0 { setvar changeweappos 2 setplayer[THISACTOR].weapon_pos -1 } } else { setvar changeweappos 1 setplayer[THISACTOR].weapon_pos -1 } } else ifvarg PROXIMITYMINE_AMMOAMOUNT 0 { setvar changeweappos 2 setplayer[THISACTOR].weapon_pos -1 }
		 setvar LIGHTERENABLE 0
       }
	   
  }
ifvare CURRWEAP 6 ifvarn WEAPON_VAR_TNT 1 setvar LIGHTERENABLE 0
endevent

onevent EVENT_WEAPKEY7
setvar RETURN -1
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
	{ 
	setvar changeweappos 4
	setplayer[THISACTOR].weapon_pos -1 
	}
}
endevent

onevent EVENT_DISPLAYWEAPON
getsector[THISACTOR].floorpal palweapon
getplayer[THISACTOR].weapon_pos pos
getactorvar[THISACTOR].invisible invisible

ifvare currentweapon 0
{
   setvar RETURN -1
   state pitchforkdisplay
}
ifvare currentweapon 1
{
   setvar RETURN -1
   ifvarn flakimbo -1 ifvarn flakimbo 0
   { state flareakimbodisplay } else state flaregundisplay
}
ifvare currentweapon 2
{
   setvar RETURN -1
   ifvarn sgakimbo -1 ifvarn sgakimbo 0
   { state shotgunakimbodisplay } else state shotgundisplay
}
ifvare currentweapon 3
{
   setvar RETURN -1
   ifvarn tmakimbo -1 ifvarn tmakimbo 0
   { state tommyakimbodisplay } else state tommygundisplay
}
ifvare currentweapon 4
{
   setvar RETURN -1
   getticks tmp
   ifvarn npakimbo -1 ifvarn npakimbo 0
   { state napalmakimbodisplay } else state napalmdisplay
}
ifvare currentweapon 5
{
    setvar RETURN -1
	ifvare WEAPON_VAR_TNT 1
    {
	    ifvare tntalt 0 { state lighterdisplay }
		ifvare pos 0 { setvar LIGHTERENABLE 1 }
		state dynamitedisplay
    } 
	else ifvare WEAPON_VAR_TNT 2
    { 
		state proximityminedisplay
    } 
	else ifvare WEAPON_VAR_TNT 3
	{
	     getticks tmp
	     state remotetntdisplay
	}
}
ifvare currentweapon 6
{
   getticks tmp3
   setvar RETURN -1
   ifvare sprayalt 0 { state lighterdisplay }
   ifvare pos 0 { setvar LIGHTERENABLE 1 }
   state spraycandisplay
}
ifvare currentweapon 7
{
   setvar RETURN -1
   ifvarn tsakimbo -1 ifvarn tsakimbo 0
   { state plasmaakimbogundisplay } else state plasmagundisplay
}
ifvare currentweapon 9
{
   ifp pwalking setvar temp 1 else ifp prunning setvar temp 1 else setvar temp 0
   ifvare temp 1 ifvare voodooprobability 0 ifvare voodoomovincs 0 setvar voodoomovincs 1
   ifvarn voodoomovincs 0 { getticks voodoomovincs divvar voodoomovincs 10 modvar voodoomovincs 26 }
   ifvare voodoocount1 0 ifvare voodoocount2 0 ifvare voodoocount3 0 ifvare voodoocount4 0 ifvare voodoocount5 0 ifvare voodooalt 0 { ifvarn voodoomovincs 0 state voodoomovedisplay else state voodoodisplay } else state voodoodisplay
   setvar RETURN -1
}
ifvare currentweapon 10
{
setvar RETURN -1
getticks tmp
state detonatordisplay
}
ifvare currentweapon 11
{
   setvar RETURN -1
   state lifeleechdisplay
}
endevent

onevent EVENT_GETSHOTRANGE
ifvare CURRWEAP 0
{
	setvar ANGRANGE 1
	setvar ZRANGE 1

	getplayer[THISACTOR].posx x
	getplayer[THISACTOR].posy y
	getplayer[THISACTOR].ang ang

	switch prongcount
	case 0
		getplayer[THISACTOR].posx savex
		getplayer[THISACTOR].posy savey
	case 1
		subvar ang 512
		setvarvar mx x
		addvar mx 50
		rotatepoint x y mx y ang temp my
		setplayer[THISACTOR].posx temp
		setplayer[THISACTOR].posy my
	break
	case 2
		addvar ang 512
		setvarvar mx x
		addvar mx 150
		rotatepoint x y mx y ang temp my
		setplayer[THISACTOR].posx temp
		setplayer[THISACTOR].posy my
	break
	case 3
		subvar ang 512
		setvarvar mx x
		addvar mx 50
		rotatepoint x y mx y ang temp my
		setplayer[THISACTOR].posx temp
		setplayer[THISACTOR].posy my
		
		setplayer[THISACTOR].posx savex
		setplayer[THISACTOR].posy savey
	break
	endswitch
	
	addvar prongcount 1
	ifvarg prongcount 3 setvar prongcount 0
}
ifvare CURRWEAP 2
{
	ifvarn akimboshotgunalt 0
	{
		setvar ANGRANGE 128
		setvar ZRANGE 768
	} else
	ifvare sgakimbo 1
	{
		setvar ANGRANGE 64
		setvar ZRANGE 384
	}
}
ifvare CURRWEAP 3 ifvarn tommysweep 0
{
	setvar ANGRANGE 16
	setvar ZRANGE 128
}
endevent

onevent EVENT_FIRE
ifvare CURRWEAP 1
{
	setprojectile[FLARE].spawns FLAREFIRE
	setprojectile[FLARE].sxrepeat -1
	setprojectile[FLARE].syrepeat -1
	ifvarg flakimbo 1 setvar RETURN -1
	ifvarl flakimbo -1 setvar RETURN -1
}
ifvare CURRWEAP 2
{
	ifvarg sgakimbo 1 setvar RETURN -1
	ifvarl sgakimbo -1 setvar RETURN -1
}
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
		} 
	}
}
ifvare CURRWEAP 9
{
	getplayer[THISACTOR].ammo_amount 9 tmp
	setvar RETURN -1
	ifvarg tmp 0
	{
		ifvare voodoohit 0 ifvare voodooalt 0 ifvare voodoocount1 0 ifvare voodoocount2 0 ifvare voodoocount3 0 ifvare voodoocount4 0 ifvare voodoocount5 0 { setvar voodoocount1 1 }
		ifvare voodoohit 1 ifvare voodooalt 0 ifvare voodoocount1 0 ifvare voodoocount2 0 ifvare voodoocount3 0 ifvare voodoocount4 0 ifvare voodoocount5 0 { ifrnd 80 setvar voodoocount2 1 else ifrnd 80 setvar voodoocount3 1 else ifrnd 48 setvar voodoocount4 1 else ifrnd 47 setvar voodoocount5 1 } 
	}
}
ifvarn tommysweep 0 { setvar RETURN -1 }
ifvarn akimbotommysweep 0 { setvar RETURN -1 }
ifvarn akimboshotgunalt 0 { setvar RETURN -1 }
ifvarn sprayalt 0 { setvar RETURN -1 }
endevent

onevent EVENT_DOFIRE
ifvare CURRWEAP 1
ifp palive
{
	getplayer[THISACTOR].ammo_amount 1 ammo
	ifvare flarealt 1
		ifvarg ammo 7
		{
			setprojectile[FLARE].spawns EXPLOSION6
			setprojectile[FLARE].sxrepeat 32
			setprojectile[FLARE].syrepeat 32
			subvar ammo 8
			setplayer[THISACTOR].ammo_amount 1 ammo
			sound FLAREF
			eshoot FLARE
			setactorvar[RETURN].flarefulldamage 1
			setactorvar[RETURN].flarealtproj 1
			setactorvar[RETURN].noflarefire 1
			ifvarl flakimbo 1 { setvar flarealt 0 }
			setprojectile[FLARE].spawns FLAREFIRE
			setprojectile[FLARE].sxrepeat -1
			setprojectile[FLARE].syrepeat -1
		}
}
ifvare CURRWEAP 2
{
	ifvare shotgunalt 1
	{
		getplayer[THISACTOR].ammo_amount 2 SHOTGUNAMMO
		andvar SHOTGUNAMMO 1
		ifvare SHOTGUNAMMO 0
		{
		   getplayer[THISACTOR].ammo_amount 2 SHOTGUNAMMO
		   subvar SHOTGUNAMMO 1
		   setplayer[THISACTOR].ammo_amount 2 SHOTGUNAMMO
		   setvar WEAPON2_SHOTSPERBURST 32
		   setvar WEAPON2_FIRESOUND SHOTFIR2
		}
	ifvarl sgakimbo 1 { setvar shotgunalt 0 }
    } else
    {
	  setvar WEAPON2_SHOTSPERBURST 14
      setvar WEAPON2_FIRESOUND SHOTFIRE
    }
}
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 }
	}
}
ifvare CURRWEAP 6
{
	getplayer[THISACTOR].ammo_amount 6 tmp
	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 48
		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 1280
		addvarvar zvel tmp
		setactor[RETURN].zvel zvel
	}
}
endevent

onevent EVENT_PRESSEDFIRE

getplayer[THISACTOR].kickback_pic tmp
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
{
	getplayer[THISACTOR].kickback_pic tmp
	ifvarand tmp 1 nullop else
    { 
			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
				}
		    }
    }
}
ifvare CURRWEAP 5
ifp palive
{
	ifvare WEAPON_VAR_TNT 1
	{
		ifvare player[THISACTOR].kickback_pic 14
		ifvarl TNTCOUNT 64 { addvar TNTCOUNT 1 }
		ifvarn tntalt 0 { setvar tntalt 0 setvar TNTFLOORALT 1 setplayer[THISACTOR].kickback_pic 14 }
	}
	ifvarg WEAPON_VAR_TNT 1
	{
		ifvare player[THISACTOR].kickback_pic 4
		ifvarl TNTCOUNT 64 { addvar TNTCOUNT 1 }
	}
}
ifvare CURRWEAP 6
ifp palive
{	
	ifvare sprayalt 14 
	{ 
		ifvarl TNTCOUNT 64 { addvar TNTCOUNT 1 }
		setvar sprayfire 1 
	}
	
	ifvare sprayalt 0 setvar WEAPON6_TOTALTIME 4
}

endevent