------Copyright DEXXX-------

snd_obj = {}
snd_obj = xr_sound.get_safe_sound_object([[soundtrack\escape_theme]])

function save_var(var, value)
xr_logic.pstor_store(db.actor, var, value)
end

function get_var(var, value)
return xr_logic.pstor_retrieve(db.actor, var, value)
end

function s_stop()
if snd_obj:playing()==true then snd_obj:stop() end
end

function s_play(path)
s_stop()
snd_obj = xr_sound.get_safe_sound_object(path)
snd_obj:play_at_pos(db.actor, vector ():set (0, 0, 0), 0, sound_object.s2d)
end

-------------------

function escape_bandits_assault()
s_play([[soundtrack\escape_bandits_assault]])
end

function escape_flash_done()
s_play([[soundtrack\escape_flash_done]])
end

function escape_electra_tunnel()
if has_alife_info("esc_tutorial_dead_novice") then
	if get_var("snd1", 0) == 0 then
		s_play([[soundtrack\escape_electra_tunnel]]) 
		save_var("snd1", 1)
	end
end
end

function tension()
s_play([[soundtrack\escape_electra_tunnel]])
end

function escape_fox_dogs_attack()
s_play([[soundtrack\escape_fox_dogs_attack]])
end

function escape_fox_thnx()
s_play([[soundtrack\escape_fox_thnx]])
end

function garbage_help_novice()
s_play([[soundtrack\garbage_help_novice]])
end

function garbage_help_bes()
s_play([[soundtrack\garbage_help_bes]])
end

function garbage_help_seryi()
s_play([[soundtrack\garbage_help_seryi]])
end

function agroprom_ambush()
s_play([[soundtrack\agroprom_ambush]])
end

function agroprom_following_krot()
s_play([[soundtrack\agroprom_following_krot]])
end

function borov_key()
if has_alife_info("val_actor_has_borov_key") then
	if get_var("snd2", 0) == 0 then
	s_play([[soundtrack\agroprom_following_krot]])
	save_var("snd2", 1)
	end
end
end

function agro_u_cache_enter()
s_play([[soundtrack\agro_u_cache_enter]])
end

function agro_u_controller_meet()
s_play([[soundtrack\agro_u_controller_meet]])
end

function agro_u_bloodsucker_meet()
s_play([[soundtrack\agro_u_bloodsucker_meet]])
end

function agroprom_alarm()
s_play([[soundtrack\agroprom_alarm]])
end

function bar_arena_battle()
s_play([[soundtrack\bar_arena_battle]])
end

function bar_arena_battle2()
s_play([[soundtrack\escape_bandits_assault]])
end

function bar_arena_battle3()
s_play([[soundtrack\bar_arena_battle2]])
end

function bar_arena_battle4()
s_play([[soundtrack\bar_arena_battle3]])
end

function darkvalley_bloodsucker_meet()
s_play([[soundtrack\darkvalley_bloodsucker_meet]])
end

function darkvalley_x18_open()
s_play([[soundtrack\darkvalley_x18_open]])
end

function x18_laugh()
s_play([[soundtrack\x18_laugh]])
end

function x18_code1()
if has_alife_info("dar_password_info1") then
	if get_var("snd3", 0) == 0 then
	s_play([[soundtrack\x18_code1]])
	save_var("snd3", 1)
	end
end
end

function x18_code2()
if has_alife_info("dar_password_info2") then
	if get_var("snd4", 0) == 0 then
	s_play([[soundtrack\x18_code2]])
	save_var("snd4", 1)
	end
end
end

function x18_docs_done()
s_play([[soundtrack\x18_docs_done]])
end

function escape_killer_raid()
s_play([[soundtrack\escape_killer_raid]])
end

function rostok_gordon()
if has_alife_info("rostok_tunel_gordon_diary") then
	if get_var("snd5", 0) == 0 then
		s_play([[soundtrack\rostok_gordon]])
		save_var("snd5", 1)
	end
end
end

function rostok_action()
s_play([[soundtrack\rostok_action]])
end

function yantar_help_scientist()
s_play([[soundtrack\yantar_help_scientist]])
end

function yantar_vasiliev_found()
if has_alife_info("yan_find_vasilyev_end") then s_play([[soundtrack\yantar_vasiliev_found]]) end
end

function x16_giant_meet()
s_play([[soundtrack\x16_giant_meet]])
end

function x16_ghost_found()
s_play([[soundtrack\x16_ghost_found]])
end

function x16_timer_start()
s_play([[soundtrack\x16_timer_start]])
end

function mil_dolg_attack()
s_play([[soundtrack\mil_dolg_attack]])
end

function mil_notice()
s_play([[soundtrack\mil_notice]])
end

function mil_dolg_prepare()
s_play([[soundtrack\mil_dolg_prepare]])
end

function mil_freedom_attack()
s_play([[soundtrack\mil_freedom_attack]])
end

function mil_barrier_rush()
s_play([[soundtrack\mil_barrier_rush]])
end

function mil_courier_quest()
s_play([[soundtrack\mil_courier_quest]])
end

function mil_after_barrier()
s_play([[soundtrack\agroprom_following_krot]])
end

function mil_blood_village()
s_play([[soundtrack\mil_blood_village]])
end

function radar_monolith()
s_play([[soundtrack\radar_monolith]])
end

function bunker_monolith()
s_play([[soundtrack\bunker_monolith]])
end


function stanciya_true_ending()
s_play([[soundtrack\stanciya_true_ending]])
end


------Copyright DEXXX-------