;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[wpn_ak74]:weapon_base
GroupControlSection		= spawn_group
$spawn					= "weapons\ak-74"	; name and section in level editor
$npc					= on
$prefetch 				= 8

class					= WP_AK74			; class of the weapon that corresponding to CPP class
min_radius				= 30				; [] for AI
max_radius				= 100				; [] for AI
description				= enc_weapons1_wpn-ak74

ef_main_weapon_type		= 2
ef_weapon_type			= 6

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

cost					= 2000				; the price of the item
weapon_class			= assault_rifle		; the type of the box that will be used in buy-menu in multiplayer mode

ammo_class				= class_545
ammo_mag_size			= 30				; clip (magazine) size
fire_modes				= 1, -1

launch_speed			= 0

hand_dependence			= 1									; how many hands (1 or 2) we used to hold weapon in
single_handed			= 0

slot					= 2,1								; number of slot in inventory we put weapon in (1 - knife slot, 2 - pistol, 3 - rifle, 4 - grenade, 5 - apparatus)
animation_slot			= 2									; type of the animation that will be used

inv_name				= wpn-ak74							; name in inventory
inv_name_short			= wpn-ak74
inv_weight				= 3.3								; weight in inventory
inv_volume				= 10								; volume in inventory

inv_grid_width			= 5	 ; position and size of the icon that will be used to display weapon in the inventory menu
inv_grid_height			= 2	 ; all icons are on the texture ui_icon_equipment.dds,
inv_grid_x				= 5  ; position and size are in terms of 64x64 squares
inv_grid_y				= 5

;kill_msg_x			= 0
;kill_msg_y			= 28
;kill_msg_width		= 84
;kill_msg_height		= 28

;-----------------------------------------------------------------------------------
; base dispersion
;
; === Setting of the weapon shooting dispersal parameter ===
;Dispersal consists from to basic constituents – dispersal of the weapon (relatively small). In fact, this is a dispersal of a weapon griped in a vice; - dispersal of the weapon behavior in the hands of the host (if he running, or walking or shoots in single shots or in a burst) is another, more significant factor of dispersal.
;Dispersal of the weapon depends only from basic dispersal, basket case factor ant time of the ammo.
;Dispersal of the way the host shooting (standing, running and etc.)
;Two types of shooting modes can be defined: - usual mode and zoomed mode.
;Usual mode: - depends from the position of the player while shooting (standing, sitting, walking and running)
;Zoomed mode – depends from the dispersal of the weapon and do NOT depends from the position of the shooter. In that mode, dispersal of the weapon &laquo switches to;&raquo;  sight swinging (created be effector).
;Weapon recoil in the game also created by recoil effector.
;
;-----------------------------------------------------------------------------------
;params of weapon recoil
fire_dispersion_base		= 0.6	;угол (в градусах) базовой дисперсии оружия (оружия зажатого в тисках)
;const_deviation_pitch		= 0.01	; отклонение вверх
;const_deviation_yaw		= 0.0	; отклонение вправо
control_inertion_factor		= 1.25f

;parent dispersion modifiers
PDM_disp_base				= 1.0
PDM_disp_vel_factor			= 1.3
PDM_disp_accel_factor		= 1.0
PDM_disp_crouch				= 1.0
PDM_disp_crouch_no_acc		= 1.0

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


;увеличение дисперсии в процентах при максимальном износе
fire_dispersion_condition_factor = 4
;изношенность, при которой появляется шанс осечки
misfire_start_condition		= 0.65
;изношеность при которой шанс осечки становится константным
misfire_end_condition		= 0.15
;шанс осечки при изношености больше чем misfireStartCondition
misfire_start_prob			= 0
;шанс осечки при изношености больше чем misfireEndCondition
misfire_end_prob			= 0.1
;увеличение изношености при одиночном выстреле
condition_shot_dec			= 0.00025
;увеличение изношености при выстреле очередью
condition_queue_shot_dec	= 0.0002
;-----------------------------------------------------------------------------------

fire_point					= 0,0.216,0.608			; position (3rd person view) for particles of fire
fire_point2					= 0,0.162,0.490			; position (3rd person view) for particles of fire (when shooting with secondary fire)

flame_particles				= weapons\generic_weapon05	; particles for shooting effects
smoke_particles				= weapons\generic_shoot_00
grenade_flame_particles		= weapons\generic_weapon01

shell_point					= 0,0.222,0.120				; position (3rd person view) for shell to throw out
shell_particles				= weapons\545x39			; name of the particles for shells

; ttc
hit_power					= 1.0		; size of damage by bullet
hit_impulse					= 1.0		; size of physic impulse by bullet

fire_distance				= 1.0		; maximum fire distance that bullet can fly
bullet_speed				= 1.0		; starting bullet speed

rpm							= 600		; max round per minute

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

hud							= wpn_ak74_hud				; name of the section of the hud

position					= -0.026,-0.172,-0.005		; position (offset) and orientation of the weapon in the hands of character
orientation					= 0,0,0						; (3rd person view)

;--STRAP PARAMETERS-----------------------------------------------------------------
strap_position				= -0.16,-0.40,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

visual						= dynamics\weapons\wpn_aks74\wpn_aks74		; name of the model for 3rd person view

light_color					= 0.75,0.62,0.38			; params for light during the fire
light_range					= 7.5						; radius
light_var_color				= 0.05
light_var_range				= 0.5
light_time					= 0.2

ph_mass						= 5							; physic mass (kg)

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

zoom_enabled				= true						; (on,off)zoom mode (right mouse button)

scopes_sect					= scope_ak74, scope_x27_ak74, scope_detector_ak74, scope_nv_ak74, scope_dz_ak74, scope_pso1_m2, scope_pso1_m201
;scope_name					= wpn_addon_scope			; section name for the attachable scope
scope_x						= 28						; offset in inventory icon
scope_y						= 0
silencer_name				= wpn_addon_silencer		; section name for the attachable silencer
silencer_x					= 228						; offset in inventory icon
silencer_y					= 13
grenade_launcher_name		= wpn_addon_grenade_launcher; section name for the attachable grenade launcher
grenade_launcher_x			= 119						; offset in inventory icon
grenade_launcher_y			= 22

;sounds (name of the sound, volume (0.0 - 1.0), delay (sec))
snd_draw					= weapons\ak\ak_draw
snd_holster					= weapons\rifle_holster
snd_empty					= weapons\ak_empty
snd_shoot_grenade			= weapons\gp30\GP30_grenshoot
snd_reload_grenade			= weapons\gp30\gp30_grenload,	1.0, 0.97
;snd_bore					= $no_sound
snd_shoot					= weapons\ak74\ak74_shoot
snd_reload					= weapons\aks74\aks74_reload
;snd_reload_empty			= weapons\aks74\aks74_reload
snd_reload_misfire			= weapons\ak74\ak74_misfire
;snd_switch					= $no_sound
snd_silncer_shot			= weapons\ak74\ak74_shot_sil
snd_zoominc					= weapons\binoculars_zoominc
snd_zoomdec					= weapons\binoculars_zoomdec

;params when silencer is attached
;similar to corresponding params without prefix silencer_

;silencer_flame_particles	= weapons\generic_weapon01
silencer_smoke_particles	= weapons\generic_shoot_00

silencer_light_color		= 0.3,0.25,0.15
silencer_light_range		= 0.01
silencer_light_var_color	= 0.05
silencer_light_var_range	= 0.01
silencer_light_time			= 0.1

;-----------------------------------------------------------------------------
;-- HUD DESCRIPTION
;-----------------------------------------------------------------------------

[wpn_ak74_hud]:hud_base_wpn
item_visual					= dynamics\weapons\wpn_aks74\wpn_aks74_hud

hands_position				= -0.059,-0.1655,0.1
hands_orientation			= -0.25,2,0

item_position				= 0,0,0
item_orientation			= 0,0,0

aim_hud_offset_pos			= -0.09237,0.07517,-0.11706
aim_hud_offset_rot			= 0.03073,-0.00440,-0.00121

aim_alt_hud_offset_pos		= -0.0719,0.0342,-0.0371
aim_alt_hud_offset_rot		= 0.0257,-0.0044,-0.0012
;aim_alt_hud_offset_pos		= -0.1189,0.0467,-0.1016
;aim_alt_hud_offset_rot		= 0.0457,-0.0119,0.2938

scope_hud_offset_pos		= -0.08137,0.05917,-0.09206
scope_hud_offset_rot		= 0.03073,-0.00440,-0.00121

gl_hud_offset_pos			= -0.05408,0.03263,0.00134
gl_hud_offset_rot			= -0.07196,-0.00717,0.00282

gl_scope_hud_offset_pos		= -0.0541,0.0233,0.0013
gl_scope_hud_offset_rot		= -0.0830,-0.0072,0.0028

sprint_hud_offset_pos		= 0.2165,0.0320,0.1650
sprint_hud_offset_rot		= -0.0200,-0.7613,0.3737

shell_point					= 0,0,0
;shell_dir					= 0,1,0
shell_bone					= gilza

fire_point					= 0,0,0
fire_bone					= muzzle
fire_point2					= 0,0,0
fire_bone2					= muzzle_gl

anm_show						= ak74_draw
anm_hide						= ak74_holster			;DUR 0.79
anm_idle						= ak74_idle
anm_idle_sprint					= ak74_idle_sprint
anm_idle_moving					= ak74_idle_moving
anm_idle_moving_walk			= ak74_idle_moving, 0.85
anm_idle_moving_aim				= ak74_idle_moving, 0.85
anm_shots						= ak74_shoot
anm_reload						= ak74_reload_empty; ak74_reload
;anm_reload_empty				= ak74_reload_empty
anm_reload_misfire				= aks74_misfire, misfire, 1, 1.25
anm_idle_aim					= ak74_idle_aim
;anm_switch						= ak74_idle_aim_w_gl
;anm_switch_g					= ak74_idle_aim_w_gl
;anm_bore						= ak74_idle_aim
anm_hide_w_gl					= ak74_holster_w_gl
anm_show_w_gl					= ak74_draw_w_gl
anm_idle_w_gl					= ak74_idle_w_gl
anm_shots_w_gl					= ak74_shoot_w_gl
anm_reload_w_gl					= ak74_reload_empty_w_gl ;ak74_reload_w_gl
;anm_reload_empty_w_gl			= ak74_reload_empty_w_gl
anm_reload_misfire_w_gl			= ak74_misfire_w_gl, misfire, 1, 1.25
anm_idle_w_gl_aim				= ak74_idle_aim_w_gl
anm_idle_sprint_w_gl			= ak74_idle_sprint_w_gl
anm_idle_moving_w_gl			= ak74_idle_moving_w_gl
anm_idle_moving_walk_w_gl		= ak74_idle_moving_w_gl, 0.85
anm_idle_moving_w_gl_aim		= ak74_idle_moving_w_gl, 0.85
;anm_bore_w_gl					= ak74_idle_aim_w_gl
anm_show_g						= ak74_draw_w_gl
anm_hide_g						= ak74_holster_w_gl
anm_idle_g						= ak74_idle_w_gl
anm_reload_g					= ak74_reload_grenade
anm_idle_g_aim					= ak74_idle_w_gl	;ak74_idle_aim_w_gl
anm_shots_g						= ak74_shoot_grenade
anm_idle_sprint_g				= ak74_idle_sprint_w_gl
anm_idle_moving_g				= ak74_idle_moving_w_gl
anm_idle_moving_walk_g			= ak74_idle_moving_w_gl, 0.85
anm_idle_moving_g_aim			= ak74_idle_moving_w_gl, 0.85
;anm_bore_g						= ak74_idle_aim_w_gl

prm_idle_sprint				= 0			; disable sprint offset wo gl

mrk_show					= 0.75
mrk_show_w_gl				= 0.75
mrk_show_g					= 0.75
mrk_reload					= 0.44, 0.88
mrk_reload_misfire			= 0.45, 0.95
mrk_reload_w_gl				= 0.44, 0.88
mrk_reload_misfire_w_gl		= 0.45, 0.95
mrk_reload_g				= 0.5, 0.9

[scope_ak74]
scope_name 			= wpn_addon_scope
scope_x				= 0		; offset in inventory icon
scope_y				= 0

[scope_x27_ak74]
scope_name			= wpn_addon_scope_x27
scope_x				= 0		; offset in inventory icon
scope_y				= 0

[scope_detector_ak74]
scope_name			= wpn_addon_scope_detector
scope_x				= 0		; offset in inventory icon
scope_y				= 0

[scope_nv_ak74]
scope_name			= wpn_addon_scope_night
scope_x				= 0		; offset in inventory icon
scope_y				= 0

[scope_dz_ak74]
scope_name			= wpn_addon_scope_dynamic_zoom
scope_x				= 0		; offset in inventory icon
scope_y				= 0
