From: ehofman <ehofman>
Date: Mon, 31 Jan 2005 18:21:12 +0000 (+0000)
Subject: Jim Wilson:
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e39e6893e0c99ad9e21230715630d1033f015769;p=simgear.git

Jim Wilson:

Fix a couple of loose ends and missed edits on the earlier patch.  For the
most part no change in functionality.
---

diff --git a/simgear/scene/model/animation.cxx b/simgear/scene/model/animation.cxx
index 917e2b36..b17b1438 100644
--- a/simgear/scene/model/animation.cxx
+++ b/simgear/scene/model/animation.cxx
@@ -1117,14 +1117,14 @@ void SGAlphaTestAnimation::setAlphaClampToBranch(ssgBranch *b, float clamp)
 
 SGEmissionAnimation::SGEmissionAnimation( SGPropertyNode *prop_root, SGPropertyNode_ptr props)
   : SGAnimation(props, new ssgBranch),
-   _prop((SGPropertyNode *)prop_root->getNode(props->getStringValue("property", "/null"), true))
+   _prop((SGPropertyNode *)prop_root->getNode(props->getStringValue("property", "/null"), true)),
+  _color0(props->getFloatValue("emiss-red", 0.0)),
+  _color1(props->getFloatValue("emiss-green", 0.0)),
+  _color2(props->getFloatValue("emiss-blue", 0.0)),
+  _old_brightness(0.0),
+  _cached_material(0),
+  _cloned_material(0)
 {
-  _color0 = props->getFloatValue("emiss-red", 0.0);
-  _color1 = props->getFloatValue("emiss-green", 0.0);
-  _color2 = props->getFloatValue("emiss-blue", 0.0);
-  _old_brightness = 0;
-  ssgSimpleState* _cached_material;
-  ssgSimpleState* _cloned_material;
 }
 
 SGEmissionAnimation::~SGEmissionAnimation ()
@@ -1193,7 +1193,6 @@ void SGEmissionAnimation::setEmissionBranch(ssgBranch *b, float color0, float co
     ssgEntity *e = b->getKid(i);
     if (e->isAKindOf(ssgTypeLeaf())) {
       ssgSimpleState*s = (ssgSimpleState*)((ssgLeaf*)e)->getState();
-      s->enable( GL_ALPHA_TEST );
       s->setMaterial( GL_EMISSION, color0, color1, color2, 0.0 );
     } else if (e->isAKindOf(ssgTypeBranch())) {
       setEmissionBranch((ssgBranch*)e, color0, color1, color2);