//----------------------------------------------------------------
// hyperblaster.def
//
// Copyright 2002-2004 Raven Software
//----------------------------------------------------------------

export hyperblaster
{
	options -prefix HYPR_BLASTER_ -scale .4 -keep barrel 
	//-keep flashlight -parent lft_wrst body	

	addoptions -skipmesh rt_strogg_arm_mesh 
	addoptions -skipmesh lft_strogg_arm_mesh 

	mesh	work/models/weapons/marine_hyper_blaster/animations/hyper_blaster_idle.ma 		-dest models/weapons/hyperblaster/mesh
	anim	work/models/weapons/marine_hyper_blaster/animations/hyper_blaster_idle.ma 		-dest models/weapons/hyperblaster/idle
	anim	work/models/weapons/marine_hyper_blaster/animations/hyper_blaster_fire.ma 		-dest models/weapons/hyperblaster/fire
	anim	work/models/weapons/marine_hyper_blaster/animations/hyper_blaster_raise.ma		-dest models/weapons/hyperblaster/raise
	anim	work/models/weapons/marine_hyper_blaster/animations/hyper_blaster_lower.ma		-dest models/weapons/hyperblaster/lower
	anim	work/models/weapons/marine_hyper_blaster/animations/hyper_blaster_reload.ma		-dest models/weapons/hyperblaster/reload
}

export hyperblaster_strogg
{
	options -prefix HYPR_BLASTER_ -scale .4 -keep barrel 
	addoptions -skipmesh rt_arm_mesh 
	addoptions -skipmesh lft_arm_mesh 
	mesh	work/models/weapons/marine_hyper_blaster/animations/hyper_blaster_idle.ma 		-dest models/weapons/hyperblaster/mesh_strogg
}

export hyperblaster
{
	options -prefix PLAYER_HB_ -scale .4 -keep muzzle_flash ATTACHER -sourcedir work/models/characters/marine/multiplayer -destdir models/weapons/hyperblaster/world -rename ATTACHER origin -clearorigin
	mesh	hyperblaster_idle.ma			-dest hyperblaster
	anim	hyperblaster_idle.ma			-dest idle
}

entityDef viewStyle_shouldered_hyperblaster {
	"viewoffset"				"-6.75 2.5 1.5"
	"viewangles"				"-1.6 2 6.2"
}

entityDef viewStyle_q3_hyperblaster {
	"viewoffset"				"-5.4 0.6 1.5"
  	"viewangles"				"-1.6 2.5 6.2"
}

//--------------------------------------------------------------------------------------------------------------------
// Weapon Definition
//--------------------------------------------------------------------------------------------------------------------

entityDef weapon_hyperblaster
{
	"editor_menu"				"pickup"
	"editor_color"				".3 .3 1"
	"editor_mins"				"-16 -16 0"
	"editor_maxs"				"16 16 32"

	"editor_usage"				"HyperBlaster"

	"spawnclass"				"idItem"
	"weaponclass"				"rvWeaponHyperblaster"
	"size"						"32 32 32"
  	"model_view"				"weapon_hyperblaster_view"
  	"model_view_strogg"			"weapon_hyperblaster_view_strogg"
  	"model_world"				"weapon_hyperblaster_world"
	"model"						"models/weapons/hyperblaster/w_hb.lwo"
	"def_dropItem"				"weapon_hyperblaster"
	"def_projectile"			"projectile_hyperblaster"

	"joint_attach"				"HB_ATTACHER"
	"joint_view_guiLight"		"body"
	"joint_view_flash"			"barrel"
	"joint_world_flash"			"muzzle_flash"
	"joint_view_battery"		"ammo_can"

	"mtr_crosshair"				"gfx/guis/crosshairs/crosshair_blaster"
	"crosshairOffsetX"			"0"
	"crosshairOffsetY"			"0"

	"fireRate"					".08"
	"spread"					"2"
	"spread_mp"					"0"

	"inv_weapon"				"weapon_hyperblaster"
	"inv_item"					"1"
	"inv_icon"					"gfx/guis/hud/icons/item_hyperblaster.tga"
	"inv_name"					"#str_107404"	

	"weaponname"				"HyperBlaster"
	"ammoType"					"ammo_hyperblaster"
	"inv_start_ammo_hyperblaster"		"60"
	"ammoRegenStep"				"5"
	"ammoRegenTime"				"1500"
	"clipSize"					"60"									// large for smooth regen
	"ammoRequired"				"1"										// ammo is handled in the script file
	"gui"						"guis/weapons/hyperblaster_ammo.gui"
	"mtr_icon"					"gfx/guis/hud/icons/gun_hyperblaster"
	
	"muzzle_kick_time"			"0.1"
	"muzzle_kick_maxtime"		"0.15"
	"muzzle_kick_angles"		"-1 0 0"
	"muzzle_kick_offset"		"1 .15 0"

	"recoilTime"				"100"
	"recoilAngles"				"1 0 0"
	
	"mtr_flashShader"			"lights/muzzleflash"
	"flashColor"				"0.7 0.8 1"
	"flashRadius"				"200"
	"flashPointLight"			"1"
	"flashTime"					".1"
	"flashViewOffset"			"15 -2 5"

	"mtr_guiLightShader"		"lights/viewWeaponGuiLight"
	"glightRadius"				"1.3"
	"glightOffset"				"0 2 0"

	"snd_quaddamage"			"weapon_quaddamage_fire"
	"snd_acquire"				"pickup_weapon"
	"snd_battery_spinup"		"weapon_hyperblaster_spinup"
	"snd_battery_spindown"		"weapon_hyperblaster_spindown"
	"snd_battery_spin"			"weapon_hyperblaster_spinfast"
	"snd_noAmmo"				"weapon_hyperblaster_dryfire"

 	"fx_muzzleflash"			"effects/weapons/hyperblaster/muzzleflash.fx"
 	"fx_muzzleflash_world"		"effects/weapons/hyperblaster/muzzleflash.fx"
	"fx_respawn"				"effects/mp/itemrespawn.fx"

	"def_viewStyle"				"viewStyle_q3_hyperblaster"
	"def_viewStyle1"			"viewStyle_shouldered_hyperblaster"
	
	"weaponAngleOffsetAverages" "10"
	"weaponAngleOffsetScale" 	".05"
	"weaponAngleOffsetMax"		"1"
	"weaponOffsetTime"			"600"
	"weaponOffsetScale"			"0.001"

//	"launchFromBarrel"			"1"
	"foreshorten"				".65"
	"hidesurface"				"models/weapons/hyperblaster/battery1"

  	"def_mod1"					"wpmod_hyperblaster_bounce1"

	"net_syncPhysics"			"1"
}

entityDef weapon_hyperblaster_mp
{
	"inherit"				"weapon_hyperblaster"
	"clipsize"				"0"
	"editor_ignore"				"1"
	"inv_icon"				"gfx/guis/hud/icons/item_hyperblaster_colored"
	"triggerSize"				"32"
	
	"muzzle_kick_time"			"0"
	"muzzle_kick_maxtime"			"0"
	"muzzle_kick_angles"			"0 0 0"
	"muzzle_kick_offset"			"0 0 0"
	"recoilTime"				"0"
	"recoilAngles"				"0 0 0"
	
	"respawn_Team DM"			"30"
	"respawn_Tourney"			"15"

}

entityDef moveable_item_hyperblaster
{
	"inherit"					"weapon_hyperblaster"

	"editor_rotatable"			"1"
	
	"itemclipmodel"					"models/weapons/hyperblaster/w_hb_clip.lwo"

	"spawnclass"				"idMoveableItem"
	"mass"					"3000"
	"density"					"0.05"
	"friction"					"0.2"
	"bouncyness"				"0"
}

//--------------------------------------------------------------------------------------------------------------------
// Models
//--------------------------------------------------------------------------------------------------------------------

model weapon_hyperblaster_view
{
	mesh						models/weapons/hyperblaster/mesh.md5mesh
	
	skin						skins/weapons/hyperblaster/nobounce
	
	anim idle 					models/weapons/hyperblaster/idle.md5anim	
	anim fire 					models/weapons/hyperblaster/fire.md5anim	
	{
		frame 1					sound_weapon	weapon_hyperblaster_fire
		frame 1					sound_item		weapon_hyperblaster_fire_stereo
	}
	anim reload 				models/weapons/hyperblaster/reload.md5anim	
	{
		frame 1					sound_weapon	weapon_hyperblaster_cell_out
		frame 21				sound_item		weapon_hyperblaster_cell_in
		frame 34				sound_weapon	weapon_hyperblaster_close
	}
	anim raise					models/weapons/hyperblaster/raise.md5anim
	anim putaway				models/weapons/hyperblaster/lower.md5anim
	{
		frame 1					sound_weapon	weapon_switch
	}
}

model weapon_hyperblaster_view_strogg
{
	inherit						weapon_hyperblaster_view
	mesh						models/weapons/hyperblaster/mesh_strogg.md5mesh
}

model weapon_hyperblaster_world 
{
	mesh					models/weapons/hyperblaster/world/hyperblaster.md5mesh
	anim idle				models/weapons/hyperblaster/world/idle.md5anim
}

//--------------------------------------------------------------------------------------------------------------------
// Mods
//--------------------------------------------------------------------------------------------------------------------

entityDef wpmod_hyperblaster_bounce1
{
	"weapon"					"weapon_hyperblaster"
	"def_projectile"			"projectile_hyperblaster_bounce1"
	"mod_showsurface"			"models/weapons/hyperblaster/battery2"
	"mod_hidesurface"			"models/weapons/hyperblaster/battery3"
}

entityDef weaponmod_hyperblaster_bounce1
{
	"editor_color"				".3 .3 1"
	"editor_mins"				"-16 -16 0"
	"editor_maxs"				"16 16 32"
	"editor_menu"				"pickup"
	"editor_usage"				"HyperBlaster Bounce I Modification"

	"spawnclass"				"idItem"
	"size"						"32 32 32"
	"inv_weaponmod"				"wpmod_hyperblaster_bounce1"
	"inv_ammo_hyperblaster"		"40"
	"inv_item"					"1"
	"inv_icon"					"gfx/guis/hud/icons/item_hyperblaster.tga"
	"inv_name"					"#str_107432"
	"model"						"models/items/ammo/ammo_box.lwo"

	"net_syncPhysics"			"1"
}

entityDef weaponmod_hyperblaster_bounce2
{
	"inherit"					"weaponmod_hyperblaster_bounce1"
}

//--------------------------------------------------------------------------------------------------------------------
// Projectile
//--------------------------------------------------------------------------------------------------------------------

entityDef damage_hyperblaster
{
	"inherit"					"damage_blaster"
	"damage"					"14"

	"deathPush"					"100"
	"deathPushMin"				"3000 350"
	"deathPushMax"				"5000 500"
}

entityDef damage_hyperblaster_mp
{
	"inherit"				"damage_hyperblaster"
	"knockback"				"14"
}

entityDef damage_hyperblaster_splash
{
	"damage"					"10"
	"radius"					"35"
	"knockback"					"5"
	"push"						"0"
	"gib"						"0"

	"deathPush"					"100"
	"deathPushMin"				"2000 350"
	"deathPushMax"				"4000 500"
}

entityDef damage_hyperblaster_splash_mp
{
	"inherit"				"damage_hyperblaster_splash"
	"knockback" 				"10"
}

entityDef projectile_hyperblaster
{
	"inherit"					"projectile_blaster"

	"size"						"3 3 3"
	"cone"						"2"
	"clipmask_largeshot"		"0"
	"def_damage"				"damage_hyperblaster"
	
	"speed"						"1800"
	"orient_towards_motion"		"1"

	"fx_impact"			"effects/weapons/hyperblaster/impact_default.fx"
	"fx_fly"			"effects/weapons/hyperblaster/fly.fx"
	"fx_impact_concrete"		"effects/weapons/hyperblaster/impact_concrete.fx"
	"fx_impact_rock"		"effects/weapons/hyperblaster/impact_concrete.fx"
	"fx_impact_glass"		"effects/weapons/hyperblaster/impact_glass.fx"					
	"fx_impact_bpglass"		"effects/weapons/hyperblaster/impact_bpglass.fx"
	"fx_impact_electronics"		"effects/weapons/hyperblaster/impact_electronics.fx"	
	"fx_impact_flesh"		"effects/weapons/hyperblaster/impact_flesh.fx"
	"fx_impact_monstermetal"	"effects/weapons/hyperblaster/impact_flesh.fx"	
	"fx_trail"			""
	"fx_impact_mp"			"effects/weapons/hyperblaster/impact_default_mp.fx"
	"fx_impact_concrete_mp"		"effects/weapons/hyperblaster/impact_default_mp.fx"
	"fx_impact_rock_mp"		"effects/weapons/hyperblaster/impact_default_mp.fx"
	"fx_impact_glass_mp"		"effects/weapons/hyperblaster/impact_default_mp.fx"
	"fx_impact_bpglass_mp"		"effects/weapons/hyperblaster/impact_default_mp.fx"
	"fx_impact_electronics_mp"	"effects/weapons/hyperblaster/impact_default_mp.fx"
}

entityDef projectile_hyperblaster_mp
{
	"inherit"					"projectile_hyperblaster"
	"def_splash_damage"			"damage_hyperblaster_splash"	
}

entityDef projectile_hyperblaster_bounce1
{
	"inherit"					"projectile_hyperblaster"
	"detonate_on_world"			"0"
	"bounce"					"1"
	"bounce_count"				"1"
	"bounce_center"				"1"

	"fx_bounce"					"effects/weapons/hyperblaster/bounce_default.fx"
}
