Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doors sound modification #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/aircrafts/ec145.3d
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ sound_source_new land_ski_skid_inside 600.0 400.0 0 0 0 0.0 0 0 0 11025 sou

sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav

#sound_source_new stall 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/stall.wav
sound_source_new overspeed 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/overspeed.wav
Expand Down
10 changes: 5 additions & 5 deletions data/aircrafts/hh60.3d
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ sound_source_new gear_down 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_do
sound_source_new gear_up_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav
sound_source_new gear_up 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav

sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav

sound_source_new stall 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/stall.wav
sound_source_new overspeed 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/overspeed.wav
Expand Down Expand Up @@ -2395,7 +2395,7 @@ end_quads
end_model shadow
# Rescue Door
# closed_x y z opened_x y z h p b thres_x y z rate opened?
rescue_door_new 0.0 0.0 0.0 0.1 -1.2 0.0 0.0 0.0 0.0 1.6 0.5 -1.8 25000 0
rescue_door_new 0.0 0.0 0.0 0.1 -1.2 0.0 0.0 0.0 0.0 1.6 0.5 -1.8 40000 0
begin_model door
#$model_flags
color 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 0.800000 0.200000 0.000000
Expand Down
8 changes: 4 additions & 4 deletions data/aircrafts/hh65.3d
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ sound_source_new gear_down 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_do
sound_source_new gear_up_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav
sound_source_new gear_up 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav

sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav

sound_source_new stall 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/stall.wav
sound_source_new overspeed 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/overspeed.wav
Expand Down
10 changes: 5 additions & 5 deletions data/aircrafts/ka27.3d
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ sound_source_new gear_down 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_do
sound_source_new gear_up_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav
sound_source_new gear_up 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav

sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav

sound_source_new stall 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/stall.wav
sound_source_new overspeed 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/overspeed.wav
Expand Down Expand Up @@ -5389,7 +5389,7 @@ end_quads
end_model shadow
# Rescue door
# closed_x y z opened_x y z h p b thres x y z rate opened?
rescue_door_new 0.0 0.0 0.0 -0.1 -1.0 0.0 0.0 0.0 0.0 -0.85 -1.42 -1.40 25000 0
rescue_door_new 0.0 0.0 0.0 -0.1 -1.0 0.0 0.0 0.0 0.0 -0.85 -1.42 -1.40 38000 0
begin_model door
#$model_flags
translate 0.000000 0.000000 0.000000
Expand Down
8 changes: 4 additions & 4 deletions data/aircrafts/s64.3d
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ sound_source_new gear_down 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_do
sound_source_new gear_up_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav
sound_source_new gear_up 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav

sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/rotating_door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/rotating_door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/rotating_door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/rotating_door_close.wav

sound_source_new stall 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/stall.wav
sound_source_new overspeed 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/overspeed.wav
Expand Down
10 changes: 5 additions & 5 deletions data/aircrafts/uh1d.3d
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ sound_source_new gear_down 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_do
sound_source_new gear_up_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav
sound_source_new gear_up 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav

sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav

sound_source_new stall 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/stall.wav
sound_source_new overspeed 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/overspeed.wav
Expand Down Expand Up @@ -5636,7 +5636,7 @@ end_quads
end_model shadow
# Rescue Door
# closed x y z opened x y z h p b thres x y z rate opened?
rescue_door_new 0.0 0.0 0.0 0.0 -1.5 0.0 0.0 0.0 0.0 0.95 0.2 -1.3 28000 0
rescue_door_new 0.0 0.0 0.0 0.0 -1.5 0.0 0.0 0.0 0.0 0.95 0.2 -1.3 38000 0
begin_model door
#$model_flags
# Left Door
Expand Down
10 changes: 5 additions & 5 deletions data/aircrafts/v22.3d
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ sound_source_new gear_down 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_do
sound_source_new gear_up_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav
sound_source_new gear_up 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav

sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/sliding_door_close.wav

sound_source_new stall 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/stall.wav
sound_source_new overspeed 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/overspeed.wav
Expand Down Expand Up @@ -2220,7 +2220,7 @@ end_quads
end_model shadow
# Rescue door
# closed_x y z opened_x y z h p b thres x y z rate opened?
rescue_door_new 0.0 0.0 0.0 0.1 -1.2 0.0 0.0 0.0 0.0 1.2 2.4 -2.5 25000 0
rescue_door_new 0.0 0.0 0.0 0.1 -1.2 0.0 0.0 0.0 0.0 1.2 2.4 -2.5 37000 0
begin_model door
#$model_flags
color 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 0.500000 0.200000 0.000000
Expand Down
132 changes: 112 additions & 20 deletions data/aircrafts/yf22.3d
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ sound_source_new gear_down 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_do
sound_source_new gear_up_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav
sound_source_new gear_up 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/gear_up.wav

sound_source_new door_open_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_open 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_open.wav
sound_source_new door_close_inside 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_close 300.0 150.0 0 0 0 0.0 0 0 0 11025 sounds/door_close.wav
sound_source_new door_open_inside 30.0 3.0 0.0 4.5 0.9 0.0 0 0 0 11025 sounds/flap_up.wav
sound_source_new door_open 30.0 3.0 0.0 4.5 0.9 0.0 0 0 0 11025 sounds/flap_up.wav
sound_source_new door_close_inside 30.0 3.0 0.0 4.5 0.9 0.0 0 0 0 11025 sounds/flap_down.wav
sound_source_new door_close 30.0 3.0 0.0 4.5 0.9 0.0 0 0 0 11025 sounds/flap_down.wav

sound_source_new stall 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/stall.wav
sound_source_new overspeed 100.0 50.0 0 0 0 0.0 0 0 0 11025 sounds/overspeed.wav
Expand Down Expand Up @@ -565,22 +565,6 @@ begin_quads
0.000000 5.900000 0.950000
end_quads
texture_off
# Cockpit outline
color 0.700000 0.700000 0.700000 1.000000 1.000000 1.000000 1.000000 0.500000 0.000000
begin_lines
normal 0.000000 0.707107 0.707107
0.000000 6.900000 0.700000
0.000000 6.400000 1.000000
normal 0.000000 0.287348 0.957826
0.000000 6.400000 1.000000
0.000000 5.800000 1.150000
normal 0.000000 -0.111657 0.993747
0.000000 5.800000 1.150000
0.000000 5.100000 1.100000
normal 0.000000 -0.447214 0.894427
0.000000 5.100000 1.100000
0.000000 4.500000 0.900000
end_lines
# Intake blocks
color 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000
begin_quads
Expand Down Expand Up @@ -2202,6 +2186,114 @@ begin_quads
0.100000 -0.450000 -0.550000
end_quads
end_model air_brake

# Canopy (as a door).
# Let canopy closed at startup: as it is created as a door and as there is no flying
# speed limit with canopy opened, player can forgot to close it before flight.
# closed_x y z opened_x y z h p b thres_x y z rate opened?
rescue_door_new 0.0 4.5 0.9 0.0 4.5 0.9 0.0 -25.0 0.0 0.0 5.62 0.76 17500 0
begin_model door
translate 0.0 4.5 0.9
color 0.600000 0.600000 0.600000 1.000000 1.000000 1.000000 1.000000 0.500000 0.000000
# Canopy base, exterior
begin_quads
normal -0.880000 0.034000 0.473700
-0.402823 1.701496 -0.298533
-0.363676 1.723504 -0.227967
-0.364215 0.338989 -0.129042
-0.402285 0.298512 -0.197458
normal -0.610400 -0.412000 0.676600
-0.000000 0.002980 -0.005048
-0.402285 0.298512 -0.197458
-0.364215 0.338989 -0.129042
-0.000000 0.081020 0.033048
normal 0.610400 -0.412000 0.676600
0.364215 0.338989 -0.129042
0.402285 0.298512 -0.197458
-0.000000 0.002980 -0.005048
-0.000000 0.081020 0.033048
normal 0.880000 0.034000 0.473700
0.364215 0.338989 -0.129042
0.363677 1.723504 -0.227967
0.402824 1.701496 -0.298533
0.402285 0.298512 -0.197458
normal 0.800900 0.416500 0.430200
-0.000000 2.397006 -0.202970
0.402824 1.701496 -0.298533
0.363677 1.723504 -0.227967
-0.000000 2.319470 -0.146914
normal -0.800900 0.416500 0.430200
-0.000000 2.397006 -0.202970
-0.000000 2.319470 -0.146914
-0.363676 1.723504 -0.227967
-0.402823 1.701496 -0.298533
end_quads
# Canopy base, interior
begin_quads
normal 0.880100 -0.034000 -0.473700
-0.364215 0.338989 -0.129042
-0.363676 1.723504 -0.227967
-0.402823 1.701496 -0.298533
-0.402285 0.298512 -0.197458
normal 0.610400 0.412000 -0.676600
-0.364215 0.338989 -0.129042
-0.402285 0.298512 -0.197458
-0.000000 0.002980 -0.005048
-0.000000 0.081020 0.033048
normal -0.610400 0.412000 -0.676600
-0.000000 0.002980 -0.005048
0.402285 0.298512 -0.197458
0.364215 0.338989 -0.129042
-0.000000 0.081020 0.033048
normal -0.880000 -0.034000 -0.473700
0.402824 1.701496 -0.298533
0.363677 1.723504 -0.227967
0.364215 0.338989 -0.129042
0.402285 0.298512 -0.197458
normal -0.800900 -0.416500 -0.430200
0.363677 1.723504 -0.227967
0.402824 1.701496 -0.298533
-0.000000 2.397006 -0.202970
-0.000000 2.319470 -0.146914
normal 0.800900 -0.416500 -0.430200
-0.363676 1.723504 -0.227967
-0.000000 2.319470 -0.146914
-0.000000 2.397006 -0.202970
-0.402823 1.701496 -0.298533
end_quads
# Canopy top lines
color 0.700000 0.700000 0.700000 1.000000 1.000000 1.000000 1.000000 0.500000 0.000000
begin_lines
-0.000000 2.319470 -0.146914
-0.000000 1.900000 0.100000
-0.000000 1.900000 0.100000
-0.000000 1.300000 0.250000
-0.000000 1.300000 0.250000
-0.000000 0.600000 0.200000
-0.000000 0.600000 0.200000
-0.000000 0.081020 0.033048
end_lines
# Canopy intermediate left and right lines
#begin_lines
# -0.266000 1.800000 -0.006000
# -0.000000 1.900000 0.100000
# -0.266000 0.450000 0.094000
# -0.000000 0.600000 0.200000
# 0.266000 1.800000 -0.006000
# -0.000000 1.900000 0.100000
# 0.266000 0.450000 0.094000
# -0.000000 0.600000 0.200000
# -0.363676 1.723504 -0.227967
# -0.266000 1.800000 -0.006000
# -0.364215 0.338989 -0.129042
# -0.266000 0.450000 0.094000
# 0.363677 1.723504 -0.227967
# 0.266000 1.800000 -0.006000
# 0.364215 0.338989 -0.129042
# 0.266000 0.450000 0.094000
#end_lines
end_model door

# Cockpit
# x y z
cockpit_offset 0.0 5.0 0.8
Expand Down
Binary file added data/sounds/rotating_door_close.wav
Binary file not shown.
Binary file added data/sounds/rotating_door_open.wav
Binary file not shown.
Binary file added data/sounds/sliding_door_close.wav
Binary file not shown.
4 changes: 2 additions & 2 deletions src/simutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,8 @@ void SARSimUpdatePart(
0
);

/* Play sound if just closed? */
if(play_sound && (part_ptr->anim_pos == 0))
/* Play sound if starting to close? */
if(play_sound && (prev_pos == (sar_grad_anim_t)-1))
SARSoundSourcePlayFromList(
recorder,
obj_ptr->sndsrc, obj_ptr->total_sndsrcs,
Expand Down
Loading