Tweak how tire squeal volume is calculated ... probably needs some more work.
This commit is contained in:
parent
75478ea4f7
commit
01d13f797a
1 changed files with 4 additions and 1 deletions
|
@ -315,9 +315,12 @@ FGFX::update ()
|
||||||
if (cur_fdm_state->get_gear_unit(i)->GetWoW()) {
|
if (cur_fdm_state->get_gear_unit(i)->GetWoW()) {
|
||||||
gearOnGround++;
|
gearOnGround++;
|
||||||
if (!_gear_on_ground[i]) {
|
if (!_gear_on_ground[i]) {
|
||||||
double squeal_volume = cur_fdm_state->get_V_down() / 5.0;
|
// 3 parts horizontal velocity + 1 part vertical velocity
|
||||||
|
double squeal_volume = 0.75 * cur_fdm_state->get_V_equiv_kts() / 90.0 +
|
||||||
|
0.25 * cur_fdm_state->get_V_down() / 5.0;
|
||||||
if (squeal_volume > 0.1) {
|
if (squeal_volume > 0.1) {
|
||||||
_squeal->set_volume(squeal_volume);
|
_squeal->set_volume(squeal_volume);
|
||||||
|
_squeal->set_pitch(1.25);
|
||||||
mgr->play_once("squeal");
|
mgr->play_once("squeal");
|
||||||
}
|
}
|
||||||
_gear_on_ground[i] = true;
|
_gear_on_ground[i] = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue