diff --git a/gamedata/configs/engine_external.ltx b/gamedata/configs/engine_external.ltx index 4348ac54df..08f3301d80 100644 --- a/gamedata/configs/engine_external.ltx +++ b/gamedata/configs/engine_external.ltx @@ -21,7 +21,7 @@ EnableWeaponCollision = false ;Shoker Mod Style EnableArtefactDegradation = false [player_hud] -;PlayerHudOmfAdditional = dynamics\weapons\hud_hands_animation\*.omf +PlayerHudOmfAdditional = dynamics\devices\dev_pda\*.omf [render] DisableLoadScreenTips = false diff --git a/gamedata/configs/misc/dev_pda.ltx b/gamedata/configs/misc/dev_pda.ltx new file mode 100644 index 0000000000..e909c821ad --- /dev/null +++ b/gamedata/configs/misc/dev_pda.ltx @@ -0,0 +1,77 @@ +;;--==========================< PDA >============================= +;;--==========================< Devices >============================= +[device_pda]:identity_immunities +GroupControlSection = spawn_group +discovery_dependency = +$spawn = "devices\pda" +$prefetch = 16 +class = D_PDA ;Change to S_PDA if you want to use se_item.se_explosive script binding! +cform = skeleton +visual = dynamics\devices\dev_pda\dev_pda.ogf +description = st_pda_descr +radius = 68 ; 50 +slot = 7 +default_to_ruck = false +sprint_allowed = true +control_inertion_factor = 1 +script_binding = bind_physic_object.init +release_on_first_update = true +inv_name = st_pda_name +inv_name_short = st_pda_name +inv_weight = 0.1 ;0.2 +inv_grid_width = 1 +inv_grid_height = 1 +inv_grid_x = 6 +inv_grid_y = 13 +cost = 0 +attach_angle_offset = -1.303,0.107,-1.702 ;onoaiaaeeaaaony a ?aaeaiao Angle*PI/180 +attach_position_offset = 0.14,0.001,0.02 +attach_bone_name = bip01_l_hand +auto_attach = false +anim_item = true +hud = pda_hud +animation_slot = 2 +joystick_bone = joystick +snd_btn_press = device\pda\pda_btn_press +snd_btn_release = device\pda\pda_btn_release +snd_draw = device\pda\pda_draw +snd_draw_empty = device\pda\pda_draw_empty +snd_holster = device\pda\pda_holster +snd_holster_empty = device\pda\pda_holster_empty +snd_empty = device\pda\pda_dead +screen_on_delay = 0.7 +screen_off_delay = 0.5 +thumb_rot_x = 1 +thumb_rot_y = -0.1 + +[pda_hud]:hud_base +inertion_offset_LRUD = 0.02, 0.02, 0.02, 0.02 +inertion_offset_LRUD_aim = 0.009, 0.009, 0.009, 0.009 +attach_place_idx = 0 +item_visual = dynamics\devices\dev_pda\dev_pda_hud.ogf +hands_position = -0.005,-0.11,0.1 +hands_position_16x9 = -0.005,-0.11,0.1 +hands_orientation = 0,0,0 +hands_orientation_16x9 = 0,0,0 +aim_hud_offset_pos = 0.001,-0.069,-0.19 +aim_hud_offset_rot = -0.4,0,0.01 +gl_hud_offset_pos = 0,0,0 +gl_hud_offset_rot = 0,0,0 +aim_hud_offset_pos_16x9 = 0.001,-0.069,-0.19 +aim_hud_offset_rot_16x9 = -0.4,0,0.01 +gl_hud_offset_pos_16x9 = 0,0,0 +gl_hud_offset_rot_16x9 = 0,0,0 +pitch_offset_right = 0 +pitch_offset_up = 0 +pitch_offset_forward = 0 +item_position = 0,0,0 +item_orientation = 0,0,0 +anm_show = kyky_smoke_pda_draw +anm_show_empty = kyky_smoke_pda_draw_empty +anm_idle = kyky_smoke_pda_idle +anm_hide = kyky_smoke_pda_holster +anm_hide_empty = kyky_smoke_pda_holster_empty +anm_idle_aim = kyky_smoke_pda_idle_aim +anm_idle_moving = kyky_smoke_pda_walk_new +anm_idle_sprint = kyky_smoke_pda_run_new +anm_empty = kyky_smoke_pda_dead diff --git a/gamedata/configs/misc/items.ltx b/gamedata/configs/misc/items.ltx index 1cf5eda2e2..e5d58fcc8f 100644 --- a/gamedata/configs/misc/items.ltx +++ b/gamedata/configs/misc/items.ltx @@ -1,3 +1,5 @@ +#include "dev_pda.ltx" + [booster]:identity_immunities GroupControlSection = spawn_group discovery_dependency = @@ -182,7 +184,7 @@ eat_satiety = -0.2 use_sound = interface\inv_vodka -[vodka_script]:vodka ; не использовать +[vodka_script]:vodka ; пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ $spawn = "food and drugs\vodka_script" inv_weight = 0 @@ -249,7 +251,7 @@ inv_grid_width = 2 inv_grid_height = 1 inv_grid_x = 16 inv_grid_y = 12 -attach_angle_offset = -1.571,-1.308,-1.458 ;устанавливаетсљ в радианах Angle*PI/180 +attach_angle_offset = -1.571,-1.308,-1.458 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ Angle*PI/180 attach_position_offset = 0.105, -0.004, 0.003 attach_bone_name = bip01_l_hand auto_attach = false @@ -595,36 +597,6 @@ use_sound = interface\inv_pills ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; DEVICES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -[device_pda]:identity_immunities -GroupControlSection = spawn_group -discovery_dependency= -$spawn = "devices\pda" -$prefetch = 16 -class = S_PDA -cform = skeleton -visual = dynamics\devices\dev_pda\dev_pda.ogf -description = st_pda_descr -radius = 68; 50 -slot = 7 -default_to_ruck = false -sprint_allowed = true -control_inertion_factor = 1 -script_binding = bind_physic_object.init - -inv_name = st_pda_name -inv_name_short = st_pda_name -inv_weight = 0.1 ;0.2 - -inv_grid_width = 1 -inv_grid_height = 1 -inv_grid_x = 6 -inv_grid_y = 13 -cost = 20 -attach_angle_offset = -1.303,0.107,-1.702 ;устанавливается в радианах Angle*PI/180 -attach_position_offset = 0.14,0.001,0.02 -attach_bone_name = bip01_l_hand -auto_attach = false - [dev_flash_1]:identity_immunities GroupControlSection = spawn_group discovery_dependency= @@ -693,7 +665,7 @@ inv_grid_height = 1 inv_grid_x = 16 inv_grid_y = 12 -;вещью нельзя торговать +;пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ can_trade = true position = 0.35,0.25,0.0 @@ -714,9 +686,9 @@ snd_night_vision_off = weapons\nv_off snd_night_vision_idle = weapons\nv_loop snd_night_vision_broken = weapons\nv_off -night_vision_recharge_time = 6 ;(c) время зарядки аккамулятора -night_vision_recharge_time_min = 2 ;(c) мин. время зарядки аккамулятора, после которого уст-во уже может работать -night_vision_discharge_time = 20 ;(c) время разрядки (работы) устройства после полной зарядки +night_vision_recharge_time = 6 ;(c) пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ +night_vision_recharge_time_min = 2 ;(c) пїЅпїЅпїЅ. пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ, пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅ-пїЅпїЅ пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ +night_vision_discharge_time = 20 ;(c) пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ (пїЅпїЅпїЅпїЅпїЅпїЅ) пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ slot = 9 default_to_ruck = false sprint_allowed = true diff --git a/gamedata/configs/system.ltx b/gamedata/configs/system.ltx index 37f2aa40c9..b2581852d5 100644 --- a/gamedata/configs/system.ltx +++ b/gamedata/configs/system.ltx @@ -84,7 +84,7 @@ ang_speed3 = 2.0 [info_portions] -;список xml файлов, содержаих info_portions +;пїЅпїЅпїЅпїЅпїЅпїЅ xml пїЅпїЅпїЅпїЅпїЅпїЅ, пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ info_portions files = info_portions, info_zaton, info_jupiter, info_pripyat, info_upgrades [dialogs] @@ -95,10 +95,10 @@ files = dialogs, dialogs_zaton, dialogs_jupiter, dialogs_pripyat files = encyclopedia_infos [profiles] -;список xml файлов, содержаих профили сталкеров и торговцев +;пїЅпїЅпїЅпїЅпїЅпїЅ xml пїЅпїЅпїЅпїЅпїЅпїЅ, пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ files = npc_profile -;список xml файлов, содержаих описаниљ конкретнvх сталкеров и торговцев +;пїЅпїЅпїЅпїЅпїЅпїЅ xml пїЅпїЅпїЅпїЅпїЅпїЅ, пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅvпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ specific_characters_files = character_desc_general, character_desc_zaton, character_desc_pripyat, character_desc_jupiter, character_desc_underpass @@ -131,7 +131,7 @@ slot_persistent_7 = false ;outfit slot_active_7 = false slot_persistent_8 = true ;pda -slot_active_8 = false +slot_active_8 = true slot_persistent_9 = true ;detector slot_active_9 = false @@ -176,37 +176,37 @@ max_count = 5 [bloody_marks] wallmarks = wm\wm_blood_1,wm\wm_blood_2,wm\wm_blood_3 -dist = 2.0 ;2.4 ;(м) max расстољние отлета крови -max_size = 0.4 ;0.3 ;(м)радиус пљтна при хите силой nominal hit по большому объекту (по маленькому *0.5) -min_size = 0.06 ;(м)минимальнvй радиус пљтна -nominal_hit = 0.5 ;величина номинального хита, при котором разлетаетсљ максимум крови (max_size) +dist = 2.0 ;2.4 ;(пїЅ) max пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ +max_size = 0.4 ;0.3 ;(пїЅ)пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅ пїЅпїЅпїЅ пїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ nominal hit пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ (пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ *0.5) +min_size = 0.06 ;(пїЅ)пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅvпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅ +nominal_hit = 0.5 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅ, пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ (max_size) -;капли крови +;пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ blood_drops = wm\wm_blood_drop_1,wm\wm_blood_drop_2,wm\wm_blood_drop_3,wm\wm_blood_drop_4 -start_blood_size = 0.4 ;размер ранv чтоб начала капать кровь -stop_blood_size = 0.025 ;размер ранv чтоб кровь остановилась (должно бvть меньше start_blood_size) +start_blood_size = 0.4 ;пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅv пїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ +stop_blood_size = 0.025 ;пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅv пїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ (пїЅпїЅпїЅпїЅпїЅпїЅ пїЅvпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ start_blood_size) blood_drop_time = 0.1 ;OBSOLETE blood_drop_time_min = 0.3 ; blood_drop_time_max = 2.0 ; -blood_drop_size = 0.1 ;размер капли (м) крови, котораљ упала +blood_drop_size = 0.1 ;пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ (пїЅ) пїЅпїЅпїЅпїЅпїЅ, пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ [entity_fire_particles] fire_particles = damage_fx\burn_creatures -start_burn_size = 0.0003 ;размер ожега после которого начать играть партиклv огнљ -stop_burn_size = 0.0001 ;размер ожега после которого остановить партиклv -min_burn_time = 10000 ;минимальное времљ отvгрvша партиклов (даже если рана уже зажила) +start_burn_size = 0.0003 ;пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅv пїЅпїЅпїЅ +stop_burn_size = 0.0001 ;пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅv +min_burn_time = 10000 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅ пїЅпїЅvпїЅпїЅvпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ (пїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅ пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ) [hud_cursor] -;все размерv в процентах от длинv экрана -cross_length = 0.015 ;длина "палочки" прицела -min_radius = 0.0 ;минимальнvй радиус прицела (при нулевой дисперсии) -max_radius = 1.0 ;максимальнvй радиус -radius_lerp_speed = 0.08 ;скорость интерполљции положений прицела -cross_color = 0.7,0.7,0.7,0.5 ;цвет прицела -disp_scale = 0.08 ;масштаб прицела (относительно радиан) +;пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅv пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ пїЅпїЅпїЅпїЅv пїЅпїЅпїЅпїЅпїЅпїЅ +cross_length = 0.015 ;пїЅпїЅпїЅпїЅпїЅ "пїЅпїЅпїЅпїЅпїЅпїЅпїЅ" пїЅпїЅпїЅпїЅпїЅпїЅпїЅ +min_radius = 0.0 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅvпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ (пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ) +max_radius = 1.0 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅvпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ +radius_lerp_speed = 0.08 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ +cross_color = 0.7,0.7,0.7,0.5 ;пїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ +disp_scale = 0.08 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ (пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ) [hud_hitmark] hit_mark_texture = ui\ui_hud_hit_mark; ui\ui_empty @@ -365,12 +365,12 @@ $spawn = "ai\graph point" ; Trade ;----------------------------------------------------------------- [trade] -;коэффициентv изменениљ ценv при торговле в зависимости от отношениљ к персонажу -;линейно апроксимируітсљ между значениљ -buy_price_factor_hostile = 1 ;коэффициент покупки при goodwill = -100 -buy_price_factor_friendly = 1 ;коэффициент покупки при goodwill = 100 -sell_price_factor_hostile = 1 ;коэффициент покупки при goodwill = -100 -sell_price_factor_friendly = 1 ;коэффициент покупки при goodwill = 100 +;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅv пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅv пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ +;пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ +buy_price_factor_hostile = 1 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅ goodwill = -100 +buy_price_factor_friendly = 1 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅ goodwill = 100 +sell_price_factor_hostile = 1 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅ goodwill = -100 +sell_price_factor_friendly = 1 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅ goodwill = 100 @@ -407,7 +407,7 @@ script_binding = xr_zones.bind object_damage_factor = 1.2f ;***************************************** -; ++=+іLT+і- Lі+= +; ++=+пїЅLT+пїЅ- LпїЅ+= ;***************************************** [stalker_names_stalker] name_cnt = 104 @@ -448,7 +448,7 @@ Human = off ; option for ALife Simulator cform = skeleton ; collision class class = SCRPTOBJ ; AI class -;параметрv показvваниљ входљих сообений PDA в главном мені +;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅv пїЅпїЅпїЅпїЅпїЅvпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ PDA пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅ [maingame_ui] pda_msgs_max_show_time = 20000 info_msgs_max_show_time = 10000 @@ -510,12 +510,12 @@ inv_grid_width = 2 inv_grid_height = 1 inv_grid_x = 16 inv_grid_y = 12 -attach_angle_offset = -1.5708,0.1919,3.1416 ;устанавливаетсљ в радианах Angle*PI/180 +attach_angle_offset = -1.5708,0.1919,3.1416 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ Angle*PI/180 attach_position_offset = 0.075, 0.066, 0.023 attach_bone_name = bip01_l_hand auto_attach = false -; рация для правой руки +; пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅ [hand_radio_r]:identity_immunities GroupControlSection = spawn_group discovery_dependency = @@ -531,7 +531,7 @@ inv_grid_width = 2 inv_grid_height = 1 inv_grid_x = 16 inv_grid_y = 12 -attach_angle_offset = 1.571,0.75,0.0 ;устанавливаетсљ в радианах Angle*PI/180 +attach_angle_offset = 1.571,0.75,0.0 ;пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ Angle*PI/180 attach_position_offset = 0.015, -0.084, 0.023 attach_bone_name = bip01_r_hand auto_attach = false @@ -658,14 +658,14 @@ shape_edge_color = 32, 32, 32, 255 bonce_damage_factor_for_objects = 1. [pkm_visual_memory] -min_view_distance = 1 ;0.4 ; коэффициент, которvй множитсљ на eye_range, в зависимости от угла -max_view_distance = 1 ;0.8 ; коэффициент, которvй множитсљ на eye_range, в зависимости от угла -visibility_threshold = 50 ;150.0 ; значение, при достижении суммой которого объект считаетсљ видимvм +min_view_distance = 1 ;0.4 ; пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ, пїЅпїЅпїЅпїЅпїЅvпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ eye_range, пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ пїЅпїЅпїЅпїЅ +max_view_distance = 1 ;0.8 ; пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ, пїЅпїЅпїЅпїЅпїЅvпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ eye_range, пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ пїЅпїЅпїЅпїЅ +visibility_threshold = 50 ;150.0 ; пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ, пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅvпїЅ always_visible_distance = 1 ;0.1 time_quant = 0.00001 -decrease_value = 0.1 ; значение, на которое уменьшаетсљ вес, если объект попал в фрустум, но отсЈксљ по каким-то причинам +decrease_value = 0.1 ; пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ, пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅ, пїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ, пїЅпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅ пїЅпїЅпїЅпїЅпїЅ-пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ velocity_factor = 0.5 -luminocity_factor = 0.5 ; фактор освеениљ (только длљ LктЈра) +luminocity_factor = 0.5 ; пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ (пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ LпїЅпїЅпїЅпїЅ) transparency_threshold = 0.4 ; view_fov_deg = 90 view_aspect = 1 @@ -686,7 +686,7 @@ swing_fast_speed = 0.5;1 [ph_capture_visuals] -;Список объектов которvе можно таскать. +;пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅvпїЅ пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ. ;NPC ;actors\stalker_bandit\stalker_bandit_1 diff --git a/gamedata/meshes/dynamics/devices/dev_pda/dev_pda.ogf b/gamedata/meshes/dynamics/devices/dev_pda/dev_pda.ogf new file mode 100644 index 0000000000..09c11ebfb1 Binary files /dev/null and b/gamedata/meshes/dynamics/devices/dev_pda/dev_pda.ogf differ diff --git a/gamedata/meshes/dynamics/devices/dev_pda/dev_pda_hud.ogf b/gamedata/meshes/dynamics/devices/dev_pda/dev_pda_hud.ogf new file mode 100644 index 0000000000..e4805d7637 Binary files /dev/null and b/gamedata/meshes/dynamics/devices/dev_pda/dev_pda_hud.ogf differ diff --git a/gamedata/meshes/dynamics/devices/dev_pda/wpn_hand_pda_hud_animation.omf b/gamedata/meshes/dynamics/devices/dev_pda/wpn_hand_pda_hud_animation.omf new file mode 100644 index 0000000000..1077164a16 Binary files /dev/null and b/gamedata/meshes/dynamics/devices/dev_pda/wpn_hand_pda_hud_animation.omf differ diff --git a/gamedata/meshes/dynamics/devices/dev_pda_2.ogf b/gamedata/meshes/dynamics/devices/dev_pda_2.ogf new file mode 100644 index 0000000000..d41a6226a6 Binary files /dev/null and b/gamedata/meshes/dynamics/devices/dev_pda_2.ogf differ diff --git a/gamedata/meshes/dynamics/devices/dev_pda_3.ogf b/gamedata/meshes/dynamics/devices/dev_pda_3.ogf new file mode 100644 index 0000000000..beefdecd38 Binary files /dev/null and b/gamedata/meshes/dynamics/devices/dev_pda_3.ogf differ diff --git a/gamedata/meshes/dynamics/devices/dev_pda_black_hud.ogf b/gamedata/meshes/dynamics/devices/dev_pda_black_hud.ogf new file mode 100644 index 0000000000..85ef6c0193 Binary files /dev/null and b/gamedata/meshes/dynamics/devices/dev_pda_black_hud.ogf differ diff --git a/gamedata/meshes/dynamics/devices/dev_pda_blue_hud.ogf b/gamedata/meshes/dynamics/devices/dev_pda_blue_hud.ogf new file mode 100644 index 0000000000..b97414fa50 Binary files /dev/null and b/gamedata/meshes/dynamics/devices/dev_pda_blue_hud.ogf differ diff --git a/gamedata/meshes/dynamics/devices/dev_pda_green_hud.ogf b/gamedata/meshes/dynamics/devices/dev_pda_green_hud.ogf new file mode 100644 index 0000000000..9f73762d25 Binary files /dev/null and b/gamedata/meshes/dynamics/devices/dev_pda_green_hud.ogf differ diff --git a/gamedata/meshes/dynamics/devices/dev_pda_hud.object b/gamedata/meshes/dynamics/devices/dev_pda_hud.object new file mode 100644 index 0000000000..4f4b813b95 Binary files /dev/null and b/gamedata/meshes/dynamics/devices/dev_pda_hud.object differ diff --git a/gamedata/shaders/d3d11/pda_overlay.lua b/gamedata/shaders/d3d11/pda_overlay.lua new file mode 100644 index 0000000000..7f6fbe99f7 --- /dev/null +++ b/gamedata/shaders/d3d11/pda_overlay.lua @@ -0,0 +1,18 @@ +function normal(shader, t_base, t_second, t_detail) + shader:begin("deffer_model", "deffer_base") + :fog(false) + :emissive(true) + shader:dx10texture("s_base", t_base) + shader:dx10sampler("smp_base") + shader:dx10stencil(true, cmp_func.always, 255, 127, stencil_op.keep, stencil_op.replace, stencil_op.keep) + shader:dx10stencil_ref(1) +end + +function l_special(shader, t_base, t_second, t_detail) + shader:begin("deffer_model", "accum_emissivel") + :zb(true, false) + :fog(false) + :emissive(true) + shader:dx10texture("s_base", "$user$ui_pda") + shader:dx10sampler("smp_base") +end diff --git a/gamedata/textures/item/item_pda2/item_pda2.dds b/gamedata/textures/item/item_pda2/item_pda2.dds new file mode 100644 index 0000000000..b802ff1710 Binary files /dev/null and b/gamedata/textures/item/item_pda2/item_pda2.dds differ diff --git a/gamedata/textures/item/item_pda2/item_pda2.thm b/gamedata/textures/item/item_pda2/item_pda2.thm new file mode 100644 index 0000000000..e2595a902c Binary files /dev/null and b/gamedata/textures/item/item_pda2/item_pda2.thm differ diff --git a/gamedata/textures/item/item_pda2/item_pda2_glass.dds b/gamedata/textures/item/item_pda2/item_pda2_glass.dds new file mode 100644 index 0000000000..1df4675141 Binary files /dev/null and b/gamedata/textures/item/item_pda2/item_pda2_glass.dds differ diff --git a/gamedata/textures/item/item_pda2/item_pda2_glass.thm b/gamedata/textures/item/item_pda2/item_pda2_glass.thm new file mode 100644 index 0000000000..5342f4e223 Binary files /dev/null and b/gamedata/textures/item/item_pda2/item_pda2_glass.thm differ diff --git a/gamedata/textures/item/item_pda2/item_pda2_label.dds b/gamedata/textures/item/item_pda2/item_pda2_label.dds new file mode 100644 index 0000000000..f1aa664655 Binary files /dev/null and b/gamedata/textures/item/item_pda2/item_pda2_label.dds differ diff --git a/gamedata/textures/item/item_pda2/item_pda2_label.thm b/gamedata/textures/item/item_pda2/item_pda2_label.thm new file mode 100644 index 0000000000..e3c1912655 Binary files /dev/null and b/gamedata/textures/item/item_pda2/item_pda2_label.thm differ diff --git a/gamedata/textures/item/item_pda2/item_pda2_label_bump#.dds b/gamedata/textures/item/item_pda2/item_pda2_label_bump#.dds new file mode 100644 index 0000000000..ea33c7ec5f Binary files /dev/null and b/gamedata/textures/item/item_pda2/item_pda2_label_bump#.dds differ diff --git a/gamedata/textures/item/item_pda2/item_pda2_label_bump.dds b/gamedata/textures/item/item_pda2/item_pda2_label_bump.dds new file mode 100644 index 0000000000..3d33c93731 Binary files /dev/null and b/gamedata/textures/item/item_pda2/item_pda2_label_bump.dds differ diff --git a/gamedata/textures/item/item_pda2/item_pda2_label_bump.thm b/gamedata/textures/item/item_pda2/item_pda2_label_bump.thm new file mode 100644 index 0000000000..a177e8ab06 Binary files /dev/null and b/gamedata/textures/item/item_pda2/item_pda2_label_bump.thm differ diff --git a/gamedata/textures/item/item_pda2/item_pda_screendisplay.dds b/gamedata/textures/item/item_pda2/item_pda_screendisplay.dds new file mode 100644 index 0000000000..ab50a54fed Binary files /dev/null and b/gamedata/textures/item/item_pda2/item_pda_screendisplay.dds differ diff --git a/gamedata/textures/item/item_pda2/item_pda_screendisplay.thm b/gamedata/textures/item/item_pda2/item_pda_screendisplay.thm new file mode 100644 index 0000000000..1914d0a9dd Binary files /dev/null and b/gamedata/textures/item/item_pda2/item_pda_screendisplay.thm differ diff --git a/gamedata/textures/item/item_pda_lp/item_pda.dds b/gamedata/textures/item/item_pda_lp/item_pda.dds new file mode 100644 index 0000000000..02a4c54b4a Binary files /dev/null and b/gamedata/textures/item/item_pda_lp/item_pda.dds differ diff --git a/src/Layers/xrRender/r__types.h b/src/Layers/xrRender/r__types.h index e40797acb7..09cf5ad423 100644 --- a/src/Layers/xrRender/r__types.h +++ b/src/Layers/xrRender/r__types.h @@ -56,9 +56,11 @@ #define r2_jitter_mipped "$user$jitter_mipped" // --- dither #define r2_sunmask "shaders\\shaders_sunmask" -#define r2_RT_smaa_edgetex "$user$edgetex" +#define r2_RT_smaa_edgetex "$user$edgetex" #define r2_RT_smaa_blendtex "$user$blendtex" +#define r_ui_pda "$user$ui_pda" + #define JITTER(a) r2_jitter #a const float SMAP_near_plane = .1f ; diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget.cpp index 96bb55c5b6..9f9bd8b7c3 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget.cpp @@ -434,6 +434,7 @@ CRenderTarget::CRenderTarget() DisplayRT(rt_Position); DisplayRT(rt_ssao_temp); DisplayRT(rt_Velocity); + DisplayRT(rt_ui_pda); #undef DisplayRT @@ -503,6 +504,8 @@ CRenderTarget::CRenderTarget() rt_Back_Buffer.create(r2_RT_backbuffer_final, get_target_width(), get_target_height(), DxgiFormat::DXGI_FORMAT_R16G16B16A16_FLOAT); rt_Generic.create(r2_RT_generic, get_target_width(), get_target_height(), DxgiFormat::DXGI_FORMAT_R16G16B16A16_FLOAT, 1, RFeatureLevel >= D3D_FEATURE_LEVEL_11_0); + + rt_ui_pda.create(r_ui_pda, get_target_width(), get_target_height(), DxgiFormat::DXGI_FORMAT_R8G8B8A8_UNORM); } init_fsr(); diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget.h b/src/Layers/xrRenderPC_R4/r4_rendertarget.h index 0ff0788df9..829bfb2f56 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget.h +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget.h @@ -72,6 +72,9 @@ class CRenderTarget : public IRender_Target ref_rt rt_Accumulator; // 64bit (r,g,b,specular) ref_rt rt_Generic_0; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. ref_rt rt_Generic_1; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. + + ref_rt rt_ui_pda; + // Igor: for volumetric lights ref_rt rt_Generic_2; // 32bit (r,g,b,a) // post-process, intermidiate results, etc. ref_rt rt_Bloom_1; // 32bit, dim/4 (r,g,b,?) diff --git a/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_combine.cpp b/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_combine.cpp index 11d19fb9fa..1cb1378f24 100644 --- a/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_combine.cpp +++ b/src/Layers/xrRenderPC_R4/r4_rendertarget_phase_combine.cpp @@ -483,6 +483,8 @@ void CRenderTarget::phase_combine () dbg_lines.clear (); dbg_planes.clear (); #endif + + u_setrt(rt_ui_pda, 0, 0); } void CRenderTarget::phase_wallmarks () diff --git a/src/xrEngine/IGame_Persistent.h b/src/xrEngine/IGame_Persistent.h index b1e6a68b34..cef5c82c3e 100644 --- a/src/xrEngine/IGame_Persistent.h +++ b/src/xrEngine/IGame_Persistent.h @@ -18,15 +18,19 @@ class ENGINE_API IGame_Persistent : public pureFrame { public: - union params { - struct { + union params + { + struct + { string256 m_game_or_spawn; string256 m_game_type; string256 m_alife; string256 m_new_or_load; EGameIDs m_e_game_type; }; + string256 m_params[4]; + params () { reset(); } void reset () { @@ -43,12 +47,21 @@ class ENGINE_API IGame_Persistent : } } }; + params m_game_params; + public: xr_set ps_active; xr_vector ps_destroy; xr_vector ps_needtoplay; + struct pda_data + { + float pda_display_factor; + float pda_psy_influence; + float pda_displaybrightness; + } pda_shader_data; + public: void destroy_particles (const bool &all_particles); diff --git a/src/xrGame/ActorInput.cpp b/src/xrGame/ActorInput.cpp index 9d0c4d0d99..ecb897408e 100644 --- a/src/xrGame/ActorInput.cpp +++ b/src/xrGame/ActorInput.cpp @@ -598,15 +598,17 @@ BOOL CActor::HUDview ( )const ((!m_holder) || (m_holder && m_holder->allowWeapon() && m_holder->HUDView() ) ); } -static u16 SlotsToCheck [] = { +static u16 SlotsToCheck[] = +{ KNIFE_SLOT , // 0 INV_SLOT_2 , // 1 INV_SLOT_3 , // 2 GRENADE_SLOT , // 3 ARTEFACT_SLOT , // 10 + PDA_SLOT , }; -void CActor::OnNextWeaponSlot() +void CActor::OnNextWeaponSlot() { u32 ActiveSlot = inventory().GetActiveSlot(); if (ActiveSlot == NO_ACTIVE_SLOT) @@ -634,6 +636,10 @@ void CActor::OnNextWeaponSlot() { IR_OnKeyboardPress(kARTEFACT); } + else if (SlotsToCheck[i] == PDA_SLOT) + { + IR_OnKeyboardPress(kACTIVE_JOBS); + } else IR_OnKeyboardPress(kWPN_1 + i); return; @@ -641,7 +647,7 @@ void CActor::OnNextWeaponSlot() } }; -void CActor::OnPrevWeaponSlot() +void CActor::OnPrevWeaponSlot() { u32 ActiveSlot = inventory().GetActiveSlot(); if (ActiveSlot == NO_ACTIVE_SLOT) diff --git a/src/xrGame/HudItem.cpp b/src/xrGame/HudItem.cpp index 2de5c56f32..fc36cbaca9 100644 --- a/src/xrGame/HudItem.cpp +++ b/src/xrGame/HudItem.cpp @@ -657,6 +657,19 @@ void CHudItem::PlayAnimIdleSprint() PlayHUDMotion("anm_idle_sprint", TRUE, nullptr,GetState()); } +bool CHudItem::ParentIsActor() const +{ + if (CObject* O = object().H_Parent()) + { + if (CEntityAlive* EA = smart_cast(O)) + { + return !!EA->cast_actor(); + } + } + + return false; +} + void CHudItem::OnMovementChanged(ACTOR_DEFS::EMoveCommand cmd) { if(GetState()==eIdle && !m_bStopAtEndAnimIsRunning) diff --git a/src/xrGame/HudItem.h b/src/xrGame/HudItem.h index 034026903a..b48a34ffa9 100644 --- a/src/xrGame/HudItem.h +++ b/src/xrGame/HudItem.h @@ -100,6 +100,7 @@ class CHudItem :public CHUDState bool IsHidden () const { return GetState() == eHidden;} // Does weapon is in hidden state bool IsHiding () const { return GetState() == eHiding;} bool IsShowing () const { return GetState() == eShowing;} + virtual bool ParentIsActor () const; virtual void SwitchState (u32 S); virtual void OnStateSwitch (u32 S); diff --git a/src/xrGame/Inventory.cpp b/src/xrGame/Inventory.cpp index c3b1c47a11..8339d69f14 100644 --- a/src/xrGame/Inventory.cpp +++ b/src/xrGame/Inventory.cpp @@ -707,6 +707,23 @@ bool CInventory::Action(u16 cmd, u32 flags) } } }break; + + + case kACTIVE_JOBS: + { + b_send_event = true; + if (flags & CMD_START) + { + if (GetActiveSlot() == PDA_SLOT && ActiveItem()) + { + Activate(NO_ACTIVE_SLOT); + } + else + { + Activate(PDA_SLOT); + } + } + }break; } if(b_send_event && g_pGameLevel && OnClient() && pActor) diff --git a/src/xrGame/Level_input.cpp b/src/xrGame/Level_input.cpp index bbc4abae76..89ecdce717 100644 --- a/src/xrGame/Level_input.cpp +++ b/src/xrGame/Level_input.cpp @@ -18,6 +18,7 @@ #include "huditem.h" #include "UIGameCustom.h" #include "../../xrUI/Widgets/UIDialogWnd.h" +#include "ui/UIPdaWnd.h" #include "../xrEngine/xr_input.h" #include "saved_game_wrapper.h" @@ -127,6 +128,10 @@ void CLevel::IR_OnKeyboardPress (int key) if (g_actor) g_actor->callback(GameObject::eKeyPress)(key); + + CUIPdaWnd* pda = b_ui_exist ? &CurrentGameUI()->PdaMenu() : nullptr; + if (pda && CurrentGameUI()->TopInputReceiver() == pda) // Fix PDA hotkey input for disabled state + if (pda->IsShown() && !pda->IsEnabled() && pda->OnKeyboardAction(key, WINDOW_KEY_PRESSED)) return; switch ( _curr ) { diff --git a/src/xrGame/PDA.cpp b/src/xrGame/PDA.cpp index bced955cc3..d4b5287d37 100644 --- a/src/xrGame/PDA.cpp +++ b/src/xrGame/PDA.cpp @@ -13,6 +13,9 @@ #include "alife_registry_wrappers.h" #include "../xrScripts/script_engine.h" +#include "player_hud.h" +#include "UIGameCustom.h" +#include "ui/UIPdaWnd.h" CPda::CPda(void) { @@ -44,12 +47,93 @@ void CPda::net_Destroy() UpdateActiveContacts (); } +void CPda::OnStateSwitch(u32 S) +{ + inherited::OnStateSwitch(S); + if (!ParentIsActor()) + return; + + switch (S) + { + case eShowing: + { + g_player_hud->attach_item(this); + g_pGamePersistent->pda_shader_data.pda_display_factor = 0.f; + m_sounds.PlaySound("sndShow", Position(), H_Root(), !!GetHUDmode(), false); + PlayHUDMotion("anm_show", FALSE, this, GetState()); + + SetPending(TRUE); + } + break; + case eIdle: + { + PlayAnimIdle(); + } + break; + case eHiding: + { + m_sounds.PlaySound("sndHide", Position(), H_Root(), !!GetHUDmode(), false); + PlayHUDMotion("anm_hide", FALSE, this, GetState()); + SetPending(TRUE); + + m_bZoomed = false; + CurrentGameUI()->PdaMenu().Enable(false); + + } + break; + case eHidden: + { + m_bZoomed = false; + m_fZoomfactor = 0.f; + + CUIPdaWnd* pda = &CurrentGameUI()->PdaMenu(); + if (pda->IsShown()) + { + pda->Enable(true); + } + + SetPending(FALSE); + } + break; + break; + } +} + +void CPda::OnAnimationEnd(u32 state) +{ + inherited::OnAnimationEnd(state); + switch (state) + { + case eShowing: + { + SetPending(FALSE); + SwitchState(eIdle); + } + break; + case eHiding: + { + SetPending(FALSE); + SwitchState(eHidden); + g_player_hud->detach_item(this); + } + break; + } +} + void CPda::Load(LPCSTR section) { inherited::Load(section); m_fRadius = pSettings->r_float(section,"radius"); m_functor_str = READ_IF_EXISTS(pSettings,r_string,section,"play_function",""); + + m_sounds.LoadSound(section, "snd_draw", "sndShow", true); + m_sounds.LoadSound(section, "snd_holster", "sndHide", true); + m_sounds.LoadSound(section, "snd_draw_empty", "sndShowEmpty", true); + m_sounds.LoadSound(section, "snd_holster_empty", "sndHideEmpty", true); + m_sounds.LoadSound(section, "snd_btn_press", "sndButtonPress"); + m_sounds.LoadSound(section, "snd_btn_release", "sndButtonRelease"); + m_sounds.LoadSound(section, "snd_empty", "sndEmptyBattery", true); } void CPda::shedule_Update(u32 dt) @@ -236,3 +320,89 @@ void CPda::PlayScriptFunction() m_functor(); } } + +void CPda::UpdateXForm() +{ + CInventoryItem::UpdateXForm(); +} + +void CPda::OnMoveToRuck(const SInvItemPlace& prev) +{ + inherited::OnMoveToRuck(prev); + + if (!ParentIsActor()) + return; + + if (prev.type == eItemPlaceSlot) + { + SwitchState(eHidden); + g_player_hud->detach_item(this); + } + + CUIPdaWnd* pda = &CurrentGameUI()->PdaMenu(); + if (pda->IsShown()) pda->HideDialog(); + StopCurrentAnimWithoutCallback(); + SetPending(FALSE); +} + +void CPda::UpdateCL() +{ + inherited::UpdateCL(); + + if (!ParentIsActor()) + return; + + bool b_main_menu_is_active = (g_pGamePersistent->m_pMainMenu && g_pGamePersistent->m_pMainMenu->IsActive()); + // For battery icon + float condition = GetCondition(); + CUIPdaWnd* pda = &CurrentGameUI()->PdaMenu(); + + u32 state = GetState(); + + if (pda->IsShown()) + { + // Force update PDA UI if it's disabled (no input) and check for deferred enable or zoom in. + if (!pda->IsEnabled()) + { + pda->Update(); + pda->Enable(true); + m_bZoomed = true; + } + // Disable PDA UI input if player is sprinting and no deferred input enable is expected. + else + { + CEntity::SEntityState st; + Actor()->g_State(st); + if (st.bSprint && !st.bCrouch) + { + pda->Enable(false); + m_bZoomed = false; + } + } + } + else + { + // Show PDA UI if possible + if (!b_main_menu_is_active && state != eHiding && state != eHidden) + { + pda->ShowDialog(false); // Don't hide indicators + pda->Enable(false); + } + } +} + +void CPda::OnActiveItem() +{ + if (!ParentIsActor()) + return; + + SwitchState(eShowing); +} + +void CPda::OnHiddenItem() +{ + if (!ParentIsActor()) + return; + + SwitchState(eHiding); +} \ No newline at end of file diff --git a/src/xrGame/PDA.h b/src/xrGame/PDA.h index ae772bcc01..04f84aec96 100644 --- a/src/xrGame/PDA.h +++ b/src/xrGame/PDA.h @@ -1,7 +1,7 @@ #pragma once #include "../xrEngine/feel_touch.h" -#include "inventory_item_object.h" +#include "hud_item_object.h" #include "InfoPortionDefs.h" #include "character_info_defs.h" @@ -15,10 +15,10 @@ using PDA_LIST = xr_vector; using PDA_LIST_it = PDA_LIST::iterator; class CPda : - public CInventoryItemObject, + public CHudItemObject, public Feel::Touch { - typedef CInventoryItemObject inherited; + typedef CHudItemObject inherited; public: CPda (); virtual ~CPda (); @@ -27,6 +27,7 @@ class CPda : virtual void Load (LPCSTR section); virtual void net_Destroy (); + virtual void OnH_A_Chield (); virtual void OnH_B_Independent (bool just_before_destroy); @@ -41,6 +42,8 @@ class CPda : virtual CInventoryOwner* GetOriginalOwner (); virtual CObject* GetOwnerObject (); + virtual void OnStateSwitch (u32 S) override; + virtual void OnAnimationEnd (u32 state) override; void TurnOn () {m_bTurnedOff = false;} void TurnOff () {m_bTurnedOff = true;} @@ -55,12 +58,22 @@ class CPda : u32 ActiveContactsNum () {return (u32)m_active_contacts.size();} void PlayScriptFunction (); bool CanPlayScriptFunction () {if(!xr_strcmp(m_functor_str, "")) return false; return true;}; + virtual void UpdateXForm(); + + virtual void OnMoveToRuck (const SInvItemPlace& prev) override; + virtual void UpdateCL (); + + virtual void OnHiddenItem () override; + virtual void OnActiveItem () override; virtual void save (NET_Packet &output_packet); virtual void load (IReader &input_packet); //* virtual LPCSTR Name (); +public: + bool m_bZoomed = false; + float m_fZoomfactor = 0.f; protected: void UpdateActiveContacts (); diff --git a/src/xrGame/ShootingObject.h b/src/xrGame/ShootingObject.h index 5a98f7316f..1279c858ce 100644 --- a/src/xrGame/ShootingObject.h +++ b/src/xrGame/ShootingObject.h @@ -60,7 +60,7 @@ class CShootingObject : public IAnticheatDumpable public: IC BOOL IsWorking () const {return bWorking;} virtual BOOL ParentMayHaveAimBullet() {return FALSE;} - virtual BOOL ParentIsActor() {return FALSE;} + virtual bool ParentIsActor () const {return false;} float getFireDistance(void) const { return fireDistance; } void setFireDistance(float value); diff --git a/src/xrGame/UIGameSP.cpp b/src/xrGame/UIGameSP.cpp index 7453b2f685..8df2ef3dde 100644 --- a/src/xrGame/UIGameSP.cpp +++ b/src/xrGame/UIGameSP.cpp @@ -110,8 +110,8 @@ bool CUIGameSP::IR_UIOnKeyboardPress(int dik) { case kACTIVE_JOBS: { - if ( !pActor->inventory_disabled() ) - ShowPdaMenu(); + //if ( !pActor->inventory_disabled() ) + // ShowPdaMenu(); break; } diff --git a/src/xrGame/Weapon.cpp b/src/xrGame/Weapon.cpp index 7598316233..93d662d869 100644 --- a/src/xrGame/Weapon.cpp +++ b/src/xrGame/Weapon.cpp @@ -2337,13 +2337,13 @@ BOOL CWeapon::ParentMayHaveAimBullet () return EA->cast_actor()!=0; } -BOOL CWeapon::ParentIsActor () +bool CWeapon::ParentIsActor() const { - CObject* O = H_Parent(); + CObject* O = Parent; if (!O) return FALSE; - CEntityAlive* EA = smart_cast(O); + CEntityAlive* EA = smart_cast(O); if (!EA) return FALSE; diff --git a/src/xrGame/Weapon.h b/src/xrGame/Weapon.h index 9ea645a7fe..849faf4bcb 100644 --- a/src/xrGame/Weapon.h +++ b/src/xrGame/Weapon.h @@ -534,7 +534,7 @@ class CWeapon : public CHudItemObject, bool show_crosshair (); bool show_indicators (); virtual BOOL ParentMayHaveAimBullet (); - virtual BOOL ParentIsActor (); + virtual bool ParentIsActor () const override; private: virtual bool install_upgrade_ammo_class ( LPCSTR section, bool test );