Vivian Meazza:
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.
This commit is contained in:
parent
7aa1cd9b5a
commit
be6936be80
1 changed files with 6 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue