diff --git a/data/aircrafts/ec145.3d b/data/aircrafts/ec145.3d index dac6766..f743aab 100644 --- a/data/aircrafts/ec145.3d +++ b/data/aircrafts/ec145.3d @@ -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 diff --git a/data/aircrafts/hh60.3d b/data/aircrafts/hh60.3d index 6c75eb7..c1c3518 100644 --- a/data/aircrafts/hh60.3d +++ b/data/aircrafts/hh60.3d @@ -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 @@ -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 diff --git a/data/aircrafts/hh65.3d b/data/aircrafts/hh65.3d index 545a0bb..bfe4f37 100644 --- a/data/aircrafts/hh65.3d +++ b/data/aircrafts/hh65.3d @@ -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 diff --git a/data/aircrafts/ka27.3d b/data/aircrafts/ka27.3d index dda95e8..5741e9c 100644 --- a/data/aircrafts/ka27.3d +++ b/data/aircrafts/ka27.3d @@ -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 @@ -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 diff --git a/data/aircrafts/s64.3d b/data/aircrafts/s64.3d index d5e855a..cdd7b44 100644 --- a/data/aircrafts/s64.3d +++ b/data/aircrafts/s64.3d @@ -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 diff --git a/data/aircrafts/uh1d.3d b/data/aircrafts/uh1d.3d index 3493dd0..0597ad6 100644 --- a/data/aircrafts/uh1d.3d +++ b/data/aircrafts/uh1d.3d @@ -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 @@ -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 diff --git a/data/aircrafts/v22.3d b/data/aircrafts/v22.3d index d1dda1c..eaa3d8a 100644 --- a/data/aircrafts/v22.3d +++ b/data/aircrafts/v22.3d @@ -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 @@ -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 diff --git a/data/aircrafts/yf22.3d b/data/aircrafts/yf22.3d index 36dcc95..83860ef 100644 --- a/data/aircrafts/yf22.3d +++ b/data/aircrafts/yf22.3d @@ -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 @@ -2202,6 +2202,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 diff --git a/data/sounds/rotating_door_close.wav b/data/sounds/rotating_door_close.wav new file mode 100644 index 0000000..b488753 Binary files /dev/null and b/data/sounds/rotating_door_close.wav differ diff --git a/data/sounds/rotating_door_open.wav b/data/sounds/rotating_door_open.wav new file mode 100644 index 0000000..7ec5c6f Binary files /dev/null and b/data/sounds/rotating_door_open.wav differ diff --git a/data/sounds/sliding_door_close.wav b/data/sounds/sliding_door_close.wav new file mode 100644 index 0000000..9c36a52 Binary files /dev/null and b/data/sounds/sliding_door_close.wav differ diff --git a/src/simutils.c b/src/simutils.c index f2f694e..c492212 100644 --- a/src/simutils.c +++ b/src/simutils.c @@ -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,