]> git.mxchange.org Git - flightgear.git/commitdiff
Vivian Meazza:
authorehofman <ehofman>
Mon, 23 Aug 2004 17:22:55 +0000 (17:22 +0000)
committerehofman <ehofman>
Mon, 23 Aug 2004 17:22:55 +0000 (17:22 +0000)
Well here's some tracer stuff. If fiddled around with submodel.cxx. It now
does what it says - you need to put this:

<!-- trial gun system -->
    <systems>
      <submodel>
        <serviceable type="bool">true</serviceable>
        <amount type="int">120</amount>
      </submodel>
    </systems>

In the *-set.xml file NOT within <sim></sim>. Trouble is it still defaults
to serviceable=true, but it also defaults to amount=0. Unless this bit of
code is included it wont run, so other models can't fire inappropriate
tracer. Revised submodel.cxx file attached.

I've changed to a non-billboard solution. I tried to make the viewing angle
of the tracer less than 180 degs, but failed. Close enough I think. It's
still a bit big, but a reasonable compromise. .AC file attached.

I remain concerned about the tracer colour. In practice, red is better (and
it's what I am used to) but David seems set on white, and I don't want to
upset him. I'm going to adjust the texture a bit more tomorrow.

src/Systems/submodel.cxx

index a1a3e5fae274a0805386f9827b6cbc444ef3a2e3..228a01a2d21842e82e7237599ddc3df1ee65c27c 100644 (file)
@@ -26,12 +26,14 @@ void
 SubmodelSystem::init ()
 {
     _serviceable_node = fgGetNode("/systems/submodel/serviceable", true);
-    _serviceable_node->setBoolValue(true);
+    _serviceable_node->setBoolValue(false);
+       
     _trigger_node = fgGetNode("/systems/submodel/trigger", true);
     _trigger_node->setBoolValue(false);
+       
     _amount_node = fgGetNode("/systems/submodel/amount", true);
-    _amount_node->setIntValue(60);
-
+    _amount_node->setIntValue(0);
+        
     _user_lat_node = fgGetNode("/position/latitude-deg", true);
     _user_lon_node = fgGetNode("/position/longitude-deg", true);
     _user_alt_node = fgGetNode("/position/altitude-ft", true);
@@ -85,7 +87,7 @@ SubmodelSystem::release (double dt)
   if (elapsed_time < 0.25) return false;
   elapsed_time = 0.0;
 
-  int rval = ai->createBallistic( "Models/Geometry/tracer.xml",
+  int rval = ai->createBallistic( "Models/Geometry/tracer.ac",
         _user_lat_node->getDoubleValue(),
         _user_lon_node->getDoubleValue(),
         _user_alt_node->getDoubleValue() + z_offset,