1
0
Fork 0

Merge branch 'work' of D:\Git_New\fgdata

This commit is contained in:
Vivian Meazza 2011-09-24 11:17:42 +01:00
commit 0ad3c1b6ac
3 changed files with 12 additions and 5 deletions

View file

@ -116,6 +116,7 @@ Uses stencil buffer.
have ambient & diffuse AND alpha should be around 0.2 or something -->
<blend>
<active>true</active>
<source-rgb>dst-color</source-rgb>
<source>dst-alpha</source>
<destination>one</destination>
</blend>

View file

@ -16,6 +16,7 @@
<command>nasal</command>
<script>
var this = cmdarg().getParent();
var init = !contains(caller(0)[0], "init");
var popup = func gui.popupTip(call(sprintf, arg));
var is_helicopter = (var _ = props.globals.getNode("rotors", 0)) != nil and _.getAttribute("children");
var aircraft_type = getprop("/sim/type");
@ -23,7 +24,7 @@
var load_overlay = func(name) {
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) {
printlog("info", "WARTHOG: loading overlay " ~ file);
cmdarg().getNode("script").setValue("");
@ -42,8 +43,10 @@
}
var mod = 0;
var _ = props.globals.initNode("/devices/status/joysticks/warthog/modifier", mod, "INT");
setlistener(_, func(n) mod = n.getValue());
if (init) {
var _ = props.globals.initNode("/devices/status/joysticks/warthog/modifier", mod, "INT");
setlistener(_, func(n) mod = n.getValue());
}
var trimstep = 0.75;
var viewstep = 0.5;

View file

@ -12,6 +12,7 @@
<command>nasal</command>
<script>
var this = cmdarg().getParent();
var init = !contains(caller(0)[0], "init");
var popup = func gui.popupTip(call(sprintf, arg));
var is_helicopter = (var _ = props.globals.getNode("rotors", 0)) != nil and _.getAttribute("children");
var aircraft_type = getprop("/sim/type");
@ -38,8 +39,10 @@
}
var mod = 0;
var _ = props.globals.initNode("/devices/status/joysticks/warthog/modifier", mod, "INT");
setlistener(_, func(n) mod = n.getValue());
if (init) {
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 right_engines = [1, 3, 5, 7, 9, 11];