1
0
Fork 0

- use brake wrappers

- use Vasilii method to reset FOV (F4+F1+F2)
This commit is contained in:
mfranz 2006-03-01 18:42:37 +00:00
parent b6a99130dd
commit ca9feebd38

View file

@ -105,9 +105,15 @@ ________________________________________________________________________________
data = props.globals.getNode(this).getNode("data"); data = props.globals.getNode(this).getNode("data");
mode = data.getNode("mode"); mode = data.getNode("mode");
modifier = data.getNode("modifier"); modifier = data.getNode("modifier");
f1 = f2 = 0;
get_mode = func { modifier.getValue() + mode.getValue() * 4 } get_mode = func { modifier.getValue() + mode.getValue() * 4 }
resetFOV = func {
setprop("/sim/current-view/field-of-view",
getprop("/sim/current-view/config/default-field-of-view-deg"));
}
harrier = func { harrier = func {
if (getprop("/sim/aero") == "harrier") { if (getprop("/sim/aero") == "harrier") {
thv = getprop("/controls/engines/engine[0]/mixture"); thv = getprop("/controls/engines/engine[0]/mixture");
@ -173,11 +179,9 @@ ________________________________________________________________________________
<script> <script>
m = get_mode(); m = get_mode();
if (m == 0) { if (m == 0) {
interpolate("/controls/gear/brake-left", 1, 0.075); controls.applyBrakes(1);
interpolate("/controls/gear/brake-right", 1, 0.075);
} elsif (m == 1) { } elsif (m == 1) {
setprop("/controls/gear/brake-left", 1); controls.applyBrakes(1);
setprop("/controls/gear/brake-right", 1);
} elsif (m == 2) { } elsif (m == 2) {
# #
} elsif (m == 3) { } elsif (m == 3) {
@ -191,14 +195,11 @@ ________________________________________________________________________________
<script> <script>
m = get_mode(); m = get_mode();
if (m == 0) { if (m == 0) {
interpolate("/controls/gear/brake-left", 0, 0.075); controls.applyBrakes(0);
interpolate("/controls/gear/brake-right", 0, 0.075);
} elsif (m == 1) { } elsif (m == 1) {
i = !getprop("/controls/gear/brake-parking"); i = controls.applyParkingBrake(1);
setprop("/controls/gear/brake-parking", i);
gui.popupTip("Parking Brake " ~ ["OFF", "ON"][i]); gui.popupTip("Parking Brake " ~ ["OFF", "ON"][i]);
setprop("/controls/gear/brake-left", 0); controls.applyBrakes(0);
setprop("/controls/gear/brake-right", 0);
} elsif (m == 2) { } elsif (m == 2) {
i = !getprop("/controls/flight/speedbrake"); i = !getprop("/controls/flight/speedbrake");
setprop("/controls/flight/speedbrake", i); setprop("/controls/flight/speedbrake", i);
@ -318,13 +319,14 @@ ________________________________________________________________________________
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
f1 = 1;
m = get_mode(); m = get_mode();
if (m == 0) { if (m == 0) {
interpolate("/controls/gear/brake-left", 1, 0.075); controls.applyBrakes(1, -1);
} elsif (m == 1) { } elsif (m == 1) {
# #
} elsif (m == 2) { } elsif (m == 2) {
view.increase(); f2 ? resetFOV() : view.increase();
} elsif (m == 3) { } elsif (m == 3) {
# #
} }
@ -334,9 +336,10 @@ ________________________________________________________________________________
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
f1 = 0;
m = get_mode(); m = get_mode();
if (m == 0) { if (m == 0) {
interpolate("/controls/gear/brake-left", 0, 0.075); controls.applyBrakes(0, -1);
} elsif (m == 1) { } elsif (m == 1) {
# #
} elsif (m == 2) { } elsif (m == 2) {
@ -355,13 +358,14 @@ ________________________________________________________________________________
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
f2 = 1;
m = get_mode(); m = get_mode();
if (m == 0) { if (m == 0) {
interpolate("/controls/gear/brake-right", 1, 0.075); controls.applyBrakes(1, 1);
} elsif (m == 1) { } elsif (m == 1) {
# #
} elsif (m == 2) { } elsif (m == 2) {
view.decrease(); f1 ? resetFOV() : view.decrease();
} elsif (m == 3) { } elsif (m == 3) {
# #
} }
@ -371,9 +375,10 @@ ________________________________________________________________________________
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
f2 = 0;
m = get_mode(); m = get_mode();
if (m == 0) { if (m == 0) {
interpolate("/controls/gear/brake-right", 0, 0.075); controls.applyBrakes(0, 1);
} elsif (m == 1) { } elsif (m == 1) {
# #
} elsif (m == 2) { } elsif (m == 2) {