From 321f9f6bbd5d7ff67f0c637f4edd3b5cf87d5f69 Mon Sep 17 00:00:00 2001 From: Gijs de Rooy <gijsrooy@hotmail.com> Date: Thu, 22 Sep 2011 16:48:19 +0200 Subject: [PATCH 1/2] Issue #203: fix white light cones. Still no fix for night-lighting though. --- Effects/light-cone.eff | 1 + 1 file changed, 1 insertion(+) diff --git a/Effects/light-cone.eff b/Effects/light-cone.eff index a6396ef7f..5fcc3a3db 100644 --- a/Effects/light-cone.eff +++ b/Effects/light-cone.eff @@ -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> From 4cdc3a64aa1bf4feec447f6a336f633543dda2db Mon Sep 17 00:00:00 2001 From: Melchior FRANZ <mfranz@aon.at> Date: Thu, 22 Sep 2011 18:10:51 +0200 Subject: [PATCH 2/2] warthog: don't attach listener again on "Reload Input"; fix overlay path --- Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml | 9 ++++++--- .../Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml index 614cb4d44..c589a5a29 100644 --- a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml +++ b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml @@ -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; diff --git a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml index 3a81acb99..79dc23f2f 100644 --- a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml +++ b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml @@ -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];