[Orxonox-commit 1418] r6136 - code/branches/presentation2/src/orxonox/graphics

landauf at orxonox.net landauf at orxonox.net
Tue Nov 24 02:35:25 CET 2009


Author: landauf
Date: 2009-11-24 02:35:24 +0100 (Tue, 24 Nov 2009)
New Revision: 6136

Modified:
   code/branches/presentation2/src/orxonox/graphics/BlinkingBillboard.cc
Log:
BlinkingBillboard now blinks properly also with ogre 1.6 (which doesn't like negative scales anymore)

Modified: code/branches/presentation2/src/orxonox/graphics/BlinkingBillboard.cc
===================================================================
--- code/branches/presentation2/src/orxonox/graphics/BlinkingBillboard.cc	2009-11-24 01:17:38 UTC (rev 6135)
+++ code/branches/presentation2/src/orxonox/graphics/BlinkingBillboard.cc	2009-11-24 01:35:24 UTC (rev 6136)
@@ -80,7 +80,7 @@
             if (this->bQuadratic_)
                 this->setScale(this->amplitude_ * static_cast<float>(square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_))));
             else
-                this->setScale(this->amplitude_ * static_cast<float>(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)));
+                this->setScale(this->amplitude_ * static_cast<float>(fabs(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_))));
         }
     }
 }




More information about the Orxonox-commit mailing list