; Heckler-Koch USP .45ACP
;-(TrickSR)-----------------------------------------
; калибр 							11.43x23 мм (.45ACP)
; длина ствола 						97 мм
; магазин							12
; вес без магазина					0.726
; максимальная дальность стрельбы	430 м
; эффективная дальность стрельбы	60 м
; прицельная дальность				---
; дульная скорость пули				290 м/с
; темп стрельбы						30 в/м
;---------------------------------------------------

[wpn_usp]:weapon_probability,default_weapon_params,wpn_usp_sounds
GroupControlSection					= spawn_group
discovery_dependency 				=
$spawn								= "weapons\usp"			; option for Level Editor
$npc								= on					; option for Level Editor
$prefetch							= 8
scheduled							= off					; option for ALife Simulator
cform								= skeleton
class								= WP_LR300
description							= st_wpn_usp_descr

ef_main_weapon_type					= 0
ef_weapon_type						= 5

;-------------------------------------------------------------------------------
inv_name							= st_wpn_usp			; name in inventory
inv_name_short						= st_wpn_usp

inv_grid_width						= 2
inv_grid_height						= 1
inv_grid_x							= 2
inv_grid_y							= 25

upgr_icon_x							= 720
upgr_icon_y							= 270
upgr_icon_width						= 255
upgr_icon_height 					= 109

kill_msg_x							= 134
kill_msg_y							= 177
kill_msg_width						= 31
kill_msg_height						= 25

;-------------------------------------------------------------------------------
cost								= 1400					; the price of the item
inv_weight							= 0.726
weapon_class						= 
hud 								= wpn_usp_hud
visual								= dynamics\weapons\wpn_usp45\wpn_usp45.ogf

upgrades							= up_gr_firstab_usp, up_gr_seconab_usp, up_gr_thirdab_usp, up_gr_fourtab_usp, up_gr_fifthab_usp
installed_upgrades					=
upgrade_scheme						= upgrade_scheme_usp

ph_mass			 					= 1

;-------------------------------------------------------------------------------
ammo_class							= ammo_11.43x23_fmj, ammo_11.43x23_hydro

startup_ammo						= 90
ammo_current						= 72
ammo_elapsed					 	= 12
ammo_limit							= 84
ammo_mag_size		 				= 12					; clip (magazine) size

fire_modes							= 1

grenade_class						= ammo_vog-25			; name of the ltx-section of used grenades

launch_speed						= 0
hand_dependence		 				= 1
single_handed						= 1

;----TTX--------------------------------------------------------------------------
hit_power 							= 0.65, 0.65, 0.65, 0.65
;hit_impulse		 				= 10
hit_type 							= fire_wound
fire_distance 						= 430
bullet_speed		 				= 290
rpm 								= 200
rpm_empty_click 	 				= 250

use_aim_bullet						= false					; Поддерживается ли первая суппер пуля
time_to_aim							= 1.0

misfire_probability        			= 0.005 ;вероятность осечки при максимальном износе  !!!old - now not working
;изношенность, при которой появляется шанс осечки
misfire_start_condition				= 0.6
;изношеность при которой шанс осечки становится константным
misfire_end_condition				= 0.1
;шанс осечки при изношености больше чем misfireStartCondition
misfire_start_prob	     			= 0.0055
;шанс осечки при изношености больше чем misfireEndCondition
misfire_end_prob	     			= 0.055
;увеличение изношености при одиночном выстреле
condition_shot_dec      			= 0.0025
;увеличение изношености при выстреле очередью
condition_queue_shot_dec			= 0.0025

;-DOF---------------------------------------------------------------------------
zoom_dof							= -1000, 1.0, 1000
reload_dof							= 0.0, 0.5, 5, 1.7

;-дисперсия---------------------------------------------------------------------
fire_dispersion_base				= 0.25	;0.7 			; угол (в градусах) базовой дисперсии оружия (оружия зажатого в тисках)
fire_dispersion_condition_factor	= 8						; увеличение дисперсии в процентах при максимальном износе
control_inertion_factor				= 1.0
crosshair_inertion 					= 3.65

;-отдача------------------------------------------------------------------------
cam_return							= 0
cam_relax_speed						= 7						; скорость возврата в исходное положение
cam_dispersion						= 1.5					; увеличения угла (в градусах) с каждым выстрелом
cam_dispersion_inc					= 1.5					; увеличениe cam_dispersion с каждым выстрелом
cam_dispersion_frac					= 1.0					; ствол будет подыматься на cam_dispersion*cam_dispersion_frac +- cam_dispersion*(1-cam_dispersion_frac)
cam_max_angle						= 10.0					; максимальный угол отдачи
cam_max_angle_horz					= 10.0					; (degree) maximum shot horizontal degree
cam_step_angle_horz					= 1.0					; (degree) size of step camera moved in horizontal position while shooting

zoom_cam_relax_speed				= 10					; scope & ironsight
zoom_cam_relax_speed_ai				= 120.75
zoom_cam_dispersion					= 0.2
zoom_cam_dispersion_inc				= 0.5
zoom_cam_dispersion_frac			= 0.7
zoom_cam_max_angle					= 5.0
zoom_cam_max_angle_horz				= 10.0
zoom_cam_step_angle_horz			= 1.5

PDM_disp_base 						= 0.5
PDM_disp_vel_factor 				= 1.1
PDM_disp_accel_factor 				= 1.1
PDM_disp_crouch	 					= 1.0
PDM_disp_crouch_no_acc 				= 1.0

;- for AI ----------------------------------------------------------------------
min_radius							= 0
max_radius							= 40

holder_range_modifier				= 1.00					; во сколько раз увеличивается eye_range
holder_fov_modifier					= 1.00					; во сколько раз увеличивается eye_fov

;-------------------------------------------------------------------------------
slot 			 					= 1
animation_slot						= 1						; type of the animation that will be used

position							= -0.021, -0.085, 0.0
orientation 						= 0, 0, 0

fire_point							= 0.0, 0.133, 0.161
fire_point2							= 0.0, 0.133, 0.161

flame_particles		 				= weapons\generic_weapon03
smoke_particles		 				= weapons\generic_shoot_00
grenade_flame_particles				= weapons\generic_weapon01

shell_point		 					= 0.0, 0.133, 0.047
shell_dir		 					= 0.0, 0.0, 0.4
shell_particles	 					= weapons\generic_shells

;-STRAP PARAMETERS--------------------------------------------------------------
;strap_position 					= -0.16,-0.36,0.15		; position (offset) and orientation of the weapon when it is strapped
;strap_orientation					= -10,-5,10				; (3rd person view in degrees)
;strap_bone0						= bip01_spine2
;strap_bone1						= bip01_spine1

light_disabled						= false
light_color		 					= 0.6,0.5,0.3
light_range		 					= 3.0
light_var_color		 				= 0.05
light_var_range		 				= 0.5
light_time 		 					= 0.2

;-addons------------------------------------------------------------------------
scope_status						= 0						; 0 - no addon
silencer_status						= 2						; 1 - permanent
grenade_launcher_status				= 0						; 2 - attachable

zoom_enabled						= true
zoom_rotate_time					= 0.25
scope_zoom_factor					= 55					; fov for zoom mode

scope_name							= wpn_addon_scope		; section name for the attachable scope
scope_x								= 47					; offset in inventory icon
scope_y								= 0

grenade_launcher_name				= wpn_addon_grenade_launcher	; section name for the attachable grenade launcher
grenade_launcher_x					= 126							; offset in inventory icon
grenade_launcher_y					= 24

silencer_name						= wpn_addon_silencer	; section name for the attachable silencer
silencer_x 							= 48					; offset in inventory icon
silencer_y 							= -15

silencer_hit_power 					= 0.60, 0.60, 0.60, 0.60
;silencer_hit_impulse	 			= 10
silencer_fire_distance 				= 420
silencer_bullet_speed	 			= 285

;silencer_flame_particles			= weapons\generic_weapon01
silencer_smoke_particles 			= weapons\generic_shoot_00

silencer_light_color				= 0.6,0.5,0.3
silencer_light_range				= 0.01
silencer_light_var_color			= 0.05
silencer_light_var_range			= 0.5
silencer_light_time 				= 0.2

[wpn_usp_hud]:hud_base
zoom_hide_crosshair					= true

attach_place_idx					= 0
item_visual 						= dynamics\weapons\wpn_usp45\wpn_usp45_hud.ogf

hands_position						= -0.021000, -0.160000,  0.002500
hands_orientation					= -0.500000,  1.000000,  1.149999

hands_position_16x9					=  0.033000, -0.189500,  0.039000
hands_orientation_16x9				=  2.349998,  2.749999,  2.849998

aim_hud_offset_pos					= -0.105600,  0.029400,  0.000000
aim_hud_offset_rot					= -0.006200,  0.005250, -0.024000

aim_hud_offset_pos_16x9				= -0.166100,  0.060800,  0.000000
aim_hud_offset_rot_16x9				=  0.024700,  0.055450,  0.002500

gl_hud_offset_pos					=  0.000000,  0.000000,  0.000000
gl_hud_offset_rot					=  0.000000,  0.000000,  0.000000

lean_hud_offset_pos					=  0.000000,  0.000000,  0.000000
lean_hud_offset_rot					=  0.000000,  0.000000,  0.000000

item_position						=  0.000746, -0.000321,  0.003479
item_orientation					=  1.239378, -0.134046, -2.052052

shell_point							= 0.015,0.048,0.481
shell_bone							= wpn_body

fire_point							= 0,0.048,0.163
fire_bone 							= wpn_body

anm_show							= usp45_draw
anm_show_empty						= usp45_draw, usp45_opened

anm_hide 							= usp45_holster
anm_hide_empty 						= usp45_holster, usp45_opened

anm_idle 							= usp45_idle
anm_idle_empty 						= usp45_idle, usp45_opened

anm_shots							= usp45_shoot
anm_shot_l							= usp45_shoot, usp45_open

anm_idle_aim						= usp45_idle_aim
anm_idle_aim_empty					= usp45_idle_aim, usp45_opened

anm_reload							= usp45_reload
anm_reload_empty					= usp45_reload, usp45_close

anm_idle_moving 					= usp45_idle_moving
anm_idle_moving_empty 				= usp45_idle_moving, usp45_opened

anm_idle_sprint						= usp45_idle_sprint
anm_idle_sprint_empty				= usp45_idle_sprint, usp45_opened

anm_bore							= usp45_idle_bore
anm_bore_empty						= usp45_idle_bore, usp45_opened

;-----------------------------------------------------------------------------
; Уникальнvе
;-----------------------------------------------------------------------------

[wpn_usp_nimble]:wpn_usp
$spawn								= "weapons\wpn_usp_nimble"	; name and section in level editor
inv_name							= st_wpn_usp_nimble
description							= st_wpn_usp_nimble_descr

cost								= 3000

rpm 								= 240

;-дисперсия---------------------------------------------------------------------
fire_dispersion_base				= 0.22					; угол (в градусах) базовой дисперсии оружия (оружия зажатого в тисках)
control_inertion_factor				= 1.0
crosshair_inertion 					= 3.25

;-отдача------------------------------------------------------------------------
cam_return							= 0
cam_relax_speed						= 7						; скорость возврата в исходное положение
cam_dispersion						= 1.35					; увеличения угла (в градусах) с каждым выстрелом
cam_dispersion_inc					= 1.35					; увеличениe cam_dispersion с каждым выстрелом
cam_dispersion_frac					= 0.8					; ствол будет подыматься на cam_dispersion*cam_dispersion_frac +- cam_dispersion*(1-cam_dispersion_frac)
cam_max_angle						= 8.0					; максимальный угол отдачи
cam_max_angle_horz					= 8.0					; (degree) maximum shot horizontal degree
cam_step_angle_horz					= 0.9					; (degree) size of step camera moved in horizontal position while shooting

zoom_cam_relax_speed				= 11					; scope & ironsight
zoom_cam_relax_speed_ai				= 120.75
zoom_cam_dispersion					= 0.15
zoom_cam_dispersion_inc				= 0.4
zoom_cam_dispersion_frac			= 0.6
zoom_cam_max_angle					= 4.0
zoom_cam_max_angle_horz				= 8.0
zoom_cam_step_angle_horz			= 1.3

PDM_disp_base 						= 0.4
PDM_disp_vel_factor 				= 1
PDM_disp_accel_factor 				= 1
PDM_disp_crouch	 					= 1.0
PDM_disp_crouch_no_acc 				= 1.0