Merge branch 'work' of D:\Git_New\fgdata
This commit is contained in:
commit
0ad3c1b6ac
3 changed files with 12 additions and 5 deletions
|
@ -116,6 +116,7 @@ Uses stencil buffer.
|
||||||
have ambient & diffuse AND alpha should be around 0.2 or something -->
|
have ambient & diffuse AND alpha should be around 0.2 or something -->
|
||||||
<blend>
|
<blend>
|
||||||
<active>true</active>
|
<active>true</active>
|
||||||
|
<source-rgb>dst-color</source-rgb>
|
||||||
<source>dst-alpha</source>
|
<source>dst-alpha</source>
|
||||||
<destination>one</destination>
|
<destination>one</destination>
|
||||||
</blend>
|
</blend>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
var this = cmdarg().getParent();
|
var this = cmdarg().getParent();
|
||||||
|
var init = !contains(caller(0)[0], "init");
|
||||||
var popup = func gui.popupTip(call(sprintf, arg));
|
var popup = func gui.popupTip(call(sprintf, arg));
|
||||||
var is_helicopter = (var _ = props.globals.getNode("rotors", 0)) != nil and _.getAttribute("children");
|
var is_helicopter = (var _ = props.globals.getNode("rotors", 0)) != nil and _.getAttribute("children");
|
||||||
var aircraft_type = getprop("/sim/type");
|
var aircraft_type = getprop("/sim/type");
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
|
|
||||||
var load_overlay = func(name) {
|
var load_overlay = func(name) {
|
||||||
foreach (var dir; [getprop("/sim/fg-home"), getprop("/sim/fg-root")]) {
|
foreach (var dir; [getprop("/sim/fg-home"), getprop("/sim/fg-root")]) {
|
||||||
var file = dir ~ "/Input/Joysticks/ThrustMaster/Warthog/Joystick/" ~ name ~ ".xml";
|
var file = dir ~ "/Input/Joysticks/ThrustMaster/Warthog/Stick/" ~ name ~ ".xml";
|
||||||
if (io.stat(file) != nil) {
|
if (io.stat(file) != nil) {
|
||||||
printlog("info", "WARTHOG: loading overlay " ~ file);
|
printlog("info", "WARTHOG: loading overlay " ~ file);
|
||||||
cmdarg().getNode("script").setValue("");
|
cmdarg().getNode("script").setValue("");
|
||||||
|
@ -42,8 +43,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var mod = 0;
|
var mod = 0;
|
||||||
var _ = props.globals.initNode("/devices/status/joysticks/warthog/modifier", mod, "INT");
|
if (init) {
|
||||||
setlistener(_, func(n) mod = n.getValue());
|
var _ = props.globals.initNode("/devices/status/joysticks/warthog/modifier", mod, "INT");
|
||||||
|
setlistener(_, func(n) mod = n.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
var trimstep = 0.75;
|
var trimstep = 0.75;
|
||||||
var viewstep = 0.5;
|
var viewstep = 0.5;
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
var this = cmdarg().getParent();
|
var this = cmdarg().getParent();
|
||||||
|
var init = !contains(caller(0)[0], "init");
|
||||||
var popup = func gui.popupTip(call(sprintf, arg));
|
var popup = func gui.popupTip(call(sprintf, arg));
|
||||||
var is_helicopter = (var _ = props.globals.getNode("rotors", 0)) != nil and _.getAttribute("children");
|
var is_helicopter = (var _ = props.globals.getNode("rotors", 0)) != nil and _.getAttribute("children");
|
||||||
var aircraft_type = getprop("/sim/type");
|
var aircraft_type = getprop("/sim/type");
|
||||||
|
@ -38,8 +39,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var mod = 0;
|
var mod = 0;
|
||||||
var _ = props.globals.initNode("/devices/status/joysticks/warthog/modifier", mod, "INT");
|
if (init) {
|
||||||
setlistener(_, func(n) mod = n.getValue());
|
var _ = props.globals.initNode("/devices/status/joysticks/warthog/modifier", mod, "INT");
|
||||||
|
setlistener(_, func(n) mod = n.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
var left_engines = [0, 2, 4, 6, 8, 10];
|
var left_engines = [0, 2, 4, 6, 8, 10];
|
||||||
var right_engines = [1, 3, 5, 7, 9, 11];
|
var right_engines = [1, 3, 5, 7, 9, 11];
|
||||||
|
|
Loading…
Add table
Reference in a new issue