Make backup cabin light also light up the cabin.

parent 78d91094
......@@ -3514,16 +3514,22 @@ pos-norm MlgDoor{0,1} MlgBase MlgStrut MlgHinge
<animation>
<type>material</type>
<object-name>Cabin</object-name>
<!-- FGBUG Have to use an int instead of simply 2 bools because emission doesn't support expression either. -->
<emission>
<factor-prop>sim/multiplay/generic/bool[16]</factor-prop>
<red>0.5</red>
<green>0.5</green>
<blue>0.382</blue>
<!-- SIC Fluorescent colour used for incandescent as well, is ok at low brightness. -->
<factor-prop>sim/multiplay/generic/short[0]</factor-prop>
<!-- = 0.5 / (0.8 * 32767) -->
<red>0.0000191</red>
<!-- = 0.5 / (0.8 * 32767) -->
<green>0.0000191</green>
<!-- = 0.382 / (0.8 * 32767) -->
<blue>0.0000146</blue>
</emission>
</animation>
<animation>
<type>textranslate</type>
<object-name>CabinWindowDummy</object-name>
<!-- FGBUG Still have to use that bool because testranslate doesn't support expression. -->
<property>sim/multiplay/generic/bool[16]</property>
<!-- = 86/8192 -->
<factor>0.0105</factor>
......
......@@ -140,15 +140,44 @@
</input>
</logic>
<!-- FGBUG Still have to use that bool because testranslate doesn't support expression. -->
<logic>
<output type="bool">
<property>/sim/multiplay/generic/bool[16]</property>
</output>
<input>
<property>/fdm/jsbsim/systems/lighting/lightsrc_noauto/cabin</property>
<or>
<property>/fdm/jsbsim/systems/lighting/lightsrc_noauto/cabin</property>
<property>/fdm/jsbsim/systems/lighting/lightsrc_noauto/cabin_backup</property>
</or>
</input>
</logic>
<!-- FGBUG Have to use an int instead of simply 2 bools because emission doesn't support expression either. -->
<filter>
<output type="int">
<property>/sim/multiplay/generic/short[0]</property>
</output>
<type>gain</type>
<gain>32767.0</gain>
<input>
<expression>
<sum>
<product>
<!-- = (2000 * 5) / (2000 * 5 + 2000) -->
<property>/fdm/jsbsim/systems/lighting/lightsrc_noauto/cabin</property>
<value>0.8</value>
</product>
<product>
<!-- = 2000 / (2000 * 5 + 2000) -->
<property>/fdm/jsbsim/systems/lighting/lightsrc_noauto/cabin_backup</property>
<value>0.2</value>
</product>
</sum>
</expression>
</input>
</filter>
<logic>
<output type="bool">
<property>/sim/multiplay/generic/bool[17]</property>
......
......@@ -77,6 +77,8 @@
<signal><property type="string">/sim/multiplay/generic/bool[23]</property><type>bool</type><interpolation>discrete</interpolation></signal>
-->
<signal><property type="string">/sim/multiplay/generic/short[0]</property><type>int</type><interpolation>discrete</interpolation></signal>
<signal><property type="string">/sim/multiplay/generic/bool[61]</property><type>bool</type><interpolation>discrete</interpolation></signal>
<signal><property type="string">/sim/multiplay/generic/bool[62]</property><type>bool</type><interpolation>discrete</interpolation></signal>
<signal><property type="string">/sim/multiplay/generic/bool[63]</property><type>bool</type><interpolation>discrete</interpolation></signal>
......
......@@ -140,8 +140,8 @@
</product>
<product>
<p>systems/lighting/lightsrc_noauto/cabin_backup</p>
<!-- 500 W -->
<v>18.5</v>
<!-- 2000 W -->
<v>74.1</v>
</product>
<product>
<p>systems/lighting/lightsrc_noauto/cargo</p>
......
......@@ -1279,6 +1279,7 @@
<multiplay>
<!-- XXX The rest of multiplay is in PRules. -->
<generic>
<short n="0" type="int"/>
<!-- TODO Enable when we have radar.
<string n="14" alias="/mpclash/output/catches-str"/>
<string n="15" alias="/mpclash/output/obj0-str"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment