Decane / SRP

Sky Reclamation Project for S.T.A.L.K.E.R.: Clear Sky
http://www.moddb.com/mods/srp
124 stars 20 forks source link

Audio bugs in FM's basement #59

Closed SurDno closed 5 years ago

SurDno commented 5 years ago

Flea Market's basement may still play click and blow-up sound and flash the screen a little (not as much as during the actual sequence) even when player has already seen the basement robbery cutscene. Here's the save where you can reproduce it.

More than that, while this thing plays only once at the end of the stairs, there is also a click sound happening when you cross this line. This one may play all over and over again.

image

Decane commented 5 years ago

Regression from 3f2ff00. Until I figure out why deleting the tripwire sometimes makes the game corrupt itself, I won't revert that commit, and hence this audio bug will remain unfixed.

A small price to pay for a fixed game, IMO, but I of course agree that the audio bug is not ideal.

SurDno commented 5 years ago

Yep, obviously, savegame corruption is more of a problem than some audio bugs.

Decane commented 5 years ago

A work-around to simulate the trip-wire explosion without actually spawning it, nor (hence) necessitating its deletion to prevent it from activating subsequently:

(1) Delete the section named "gar_zone_mine_field_no_damage" from alife_l02_garbage.ltx.

(2) Define in xr_effects.script:

function play_fake_explosion(actor)
    local actor_pos = vector():set(0,0,0)
    local mine_click_snd = sound_object("weapons\\mine_on")
    local explosion_snd = sound_object("weapons\\f1_explode")
    mine_click_snd:play_at_pos(actor, actor_pos, 0, sound_object.s2d)
    explosion_snd:play_at_pos(actor, actor_pos, 0, sound_object.s2d)
    level.add_cam_effector("camera_effects\\shell_shock.anm", 25, false, "")
    level.add_cam_effector("camera_effects\\head_shot.anm", 26, false, "")
    level.add_cam_effector("camera_effects\\fusker.anm", 27, false, "")
    level.add_pp_effector("gar_ambush_hit.ppe", 500, false)
end

(3) Replace =run_postprocess(gar_ambush_hit) in gar_space_restrictor_fang_pda_cellar.ltx with =play_fake_explosion.

New game required for effect. Needs testing.

Decane commented 5 years ago

Fixed in https://github.com/Decane/SRP/commit/54ce5660d5e89cca95eb68e466f049f05466db62. I ended up implementing the solution described above, but with the following line commented out because it caused the camera to sometimes clip into the wall:

    level.add_cam_effector("camera_effects\\fusker.anm", 27, false, "")
SurDno commented 5 years ago

IIRC, the original solution with an actual tripwire could cause the camera to clip as well.

Good to know.