-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
As the /sim/multiplayer/generic/float[0] to /sim/multiplayer/generic/float[9]
were recently added I decided to make use of this to make the nozzles of the
harrier correctly show the current thrust vector over multiplayer.
Attached is a patch to do this.
Also attached is mpsend.nas that should be placed in DATA/Aircraft/harrier/
(where DATA is the data checkout). As any Nasal subdirectory wasn't used before
I decided to follow the current standard for the harrier.
I have tested that the patch works as it should both locally and over mp.
Regards,
Arvid Norlander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFHWoODWmK6ng/aMNkRCo8ZAKCD2r/mby8sHIZVib9dJY5ysv+dSgCeNcma
U+yJf7zFwQ7K4J/PdF0uT2I=
=fR/z
-----END PGP SIGNATURE-----
? harrier-thrust-vector.patch
? mpsend.nas
Index: harrier-set.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/harrier/harrier-set.xml,v
retrieving revision 1.9
diff -u -p -r1.9 harrier-set.xml
--- harrier-set.xml 16 Jun 2007 00:48:31 -0000 1.9
+++ harrier-set.xml 8 Dec 2007 11:41:27 -0000
@@ -274,6 +274,18 @@
<hud>
<file>Aircraft/harrier/Panel/Hud/hud.nas</file>
</hud>
+ <mpsend>
+ <file>Aircraft/harrier/mpsend.nas</file>
+ </mpsend>
</nasal>
-
+
+ <!-- Extra properties for MP -->
+ <sim n="0">
+ <multiplay>
+ <generic>
+ <!-- Thrust vector -->
+ <float n="0" type="double">0.0</float>
+ </generic>
+ </multiplay>
+ </sim>
</PropertyList>
Index: Models/harrier-model.xml
===================================================================
RCS file:
/var/cvs/FlightGear-0.9/data/Aircraft/harrier/Models/harrier-model.xml,v
retrieving revision 1.3
diff -u -p -r1.3 harrier-model.xml
--- Models/harrier-model.xml 24 Aug 2006 22:29:17 -0000 1.3
+++ Models/harrier-model.xml 8 Dec 2007 11:41:28 -0000
@@ -460,7 +460,7 @@
<type>rotate</type>
<object-name>LFNozzle</object-name>
<object-name>RFNozzle</object-name>
- <property>/controls/engines/engine/mixture</property>
+ <property>sim/multiplay/generic/float[0]</property>
<factor>-100</factor>
<offset-deg>98</offset-deg>
<center>
@@ -478,7 +478,7 @@
<type>rotate</type>
<object-name>LRNozzle</object-name>
<object-name>RRNozzle</object-name>
- <property>/controls/engines/engine/mixture</property>
+ <property>sim/multiplay/generic/float[0]</property>
<factor>-100</factor>
<offset-deg>98</offset-deg>
<center>
@@ -608,7 +608,7 @@
<animation>
<type>rotate</type>
<object-name>VectorLever</object-name>
- <property>controls/engines/engine/mixture</property>
+ <property>sim/multiplay/generic/float[0]</property>
<factor>45</factor>
<offset-deg>-25</offset-deg>
<center>
@@ -631,7 +631,7 @@
<condition>
<or>
<equals>
-
<property>/sim/weight[7]/selected</property>
+
<property>sim/weight[7]/selected</property>
<value>Refueling Boom Attached</value>
</equals>
<not>
@@ -667,7 +667,7 @@
<object-name>intakeDoor</object-name>
<condition>
<greater-than>
-
<property>/controls/engines/engine/mixture</property>
+
<property>sim/multiplay/generic/float[0]</property>
<value>0.7</value>
</greater-than>
</condition>
# This file is used to copy some properties to send over mp.
# Copy the thrust vectory to a property that can be sent over MP.
setlistener("/controls/engines/engine/mixture", func(n) {
setprop("/sim/multiplay/generic/float[0]", n.getValue());
});
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel