Allow control of whether 'b' key also cancels parking brake.
Uses new property /sim/controls/brake-cancels-parking-brake. Default is true; it is expected that some aircraft (e.g. p51d) will set this to false so they can implement their own brake/parking-brake interaction. Should address bug 2589.
This commit is contained in:
parent
9a9ece5054
commit
4b4410becf
2 changed files with 6 additions and 1 deletions
|
@ -489,7 +489,9 @@ var fullBrakeTime = 0.5;
|
|||
var applyBrakes = func(v, which = 0) {
|
||||
if (which <= 0) { interpolate("/controls/gear/brake-left", v, fullBrakeTime); }
|
||||
if (which >= 0) { interpolate("/controls/gear/brake-right", v, fullBrakeTime); }
|
||||
setprop("/controls/gear/brake-parking", 0);
|
||||
if (v and props.globals.getNode("/sim/controls/brake-cancels-parking-brake", 1).getBoolValue()) {
|
||||
setprop("/controls/gear/brake-parking", 0);
|
||||
}
|
||||
}
|
||||
var applyPickle = func(v) {
|
||||
setprop("/controls/armament/pickle", v);
|
||||
|
|
|
@ -35,6 +35,9 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
<presets preserve="y">
|
||||
<trim type="bool">true</trim>
|
||||
</presets>
|
||||
<controls>
|
||||
<brake-cancels-parking-brake>true</brake-cancels-parking-brake>
|
||||
</controls>
|
||||
<startup>
|
||||
<xsize type="int" preserve="y" userarchive="y">1024</xsize>
|
||||
<ysize type="int" preserve="y" userarchive="y">768</ysize>
|
||||
|
|
Loading…
Add table
Reference in a new issue