Index: branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc	(revision 8026)
+++ branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc	(revision 8050)
@@ -31,12 +31,4 @@
 	this->setClassID(CL_LIGHTENING_EFFECT, "LighteningEffect");
   
-  
-  billboard = new Billboard(NULL);
-  billboard->setTexture("maps/lightning_bolt.png");
-  billboard->setSize(10, 20);
-  //billboard->setAbsCoor2D(10,10);
-  //billboard->setVisibility(true);
-  
-  
 	this->init();
 
@@ -60,5 +52,39 @@
 bool LighteningEffect::init()
 {
-	//Default values
+  this->time = 0.0;
+  this->flashFrequency = 0.6f;
+  this->flashConstTime = 0.07f;
+
+  //this->material = new Material();
+  //this->material->setDiffuseMap("maps/lightning_bolt.png");
+  //this->offset = Vector(-1440.00, 100.00, 280.00);
+
+//  this->billboard->setAbsCoor(50, 0, 0);
+  this->width = 20.0f;
+  this->height = 5.0f;
+  this->bNewCoordinate = false;
+
+  this->seedX = 20.f;
+  this->seedZ = 50.0f;
+  this->seedTime = 4.0f;
+
+  this->billboard = new Billboard(NULL);
+  this->billboard->setTexture("maps/lightning_bolt.png");
+  this->billboard->setSize(this->width, this->height);
+  this->billboard->setAbsCoor(50, 0, 0);
+  this->billboard->setVisibiliy(false);
+  //this->billboard->setAbsCoor(50, 0, 0);
+  //this->billboard->setVisibiliy(true);
+
+/*
+  this->soundSource = NULL;
+  this->thunderBuffer = NULL;
+
+  this->soundSource.setSourceNode(this);
+
+  //load sound
+  if (this->thunderBuffer != NULL)
+    ResourceManager::getInstance()->unload(this->thunderBuffer);
+  this->thunderBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/thunder.wav", WAV);*/
 }
 
@@ -78,4 +104,24 @@
 void LighteningEffect::tick (float dt)
 {
+  this->time += dt;
 
+  if( this->time > this->flashFrequency)
+  {
+    this->billboard->setVisibiliy(true);
+    this->time = 0.0f;
+    //this->soundSource.play(this->thunderBuffer);
+  }
+  else if( this->billboard->isVisible() && this->time > this->flashConstTime)
+  {
+    this->billboard->setVisibiliy(false);
+    this->time = 0.0f;
+    this->bNewCoordinate = true;
+  }
+
+  if( this->bNewCoordinate)
+  {
+    //this->flashFrequency = this->seedTime * (float)rand()/(float)RAND_MAX + 0.1;
+    //this->billboard>setAbsCoor( - 800.0f - this->seedX * (float)rand()/(float)RAND_MAX, 250.00, -200.0f + this->seedZ * (float)rand()/(float)RAND_MAX);
+    this->bNewCoordinate = false;
+  }
 }
Index: branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h	(revision 8026)
+++ branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h	(revision 8050)
@@ -35,4 +35,25 @@
     Billboard* billboard;
 
+    float flashFrequency;                   //!< frequency to activate itself
+    float flashRisingTime;                  //!< time to rise
+    float flashConstTime;                   //!< time to be drawn
+    float flashFallTime;                    //!< time to fall
+
+    float time;                             //!< time
+
+    //bool  bRender;
+    bool  bNewCoordinate;
+    //Material*      material;
+    //Vector         offset;
+    float width;
+    float height;
+
+    float seedX;
+    float seedZ;
+    float seedTime;
+
+    //OrxSound::SoundSource    soundSource;
+    //OrxSound::SoundBuffer*   thunderBuffer;
+
 };
 
Index: branches/atmospheric_engine/src/world_entities/effects/billboard.cc
===================================================================
--- branches/atmospheric_engine/src/world_entities/effects/billboard.cc	(revision 8026)
+++ branches/atmospheric_engine/src/world_entities/effects/billboard.cc	(revision 8050)
@@ -64,5 +64,5 @@
   this->material = new Material();
   this->setAbsCoor(0, 0, 0);
-  this->setVisibiliy(true);
+  //this->setVisibiliy(true);
   this->setSize(5, 5);
 }
@@ -140,8 +140,9 @@
   v.normalize();
   
-  float radius = 5;
-  v *= .5 * sizeX;
-  h *= .5 * sizeY;
-  
+  v *= sizeX;
+  h *= sizeY;
+
+//v += this->getAbsCoor();
+    //PRINTF(0)("sizeX: %f sizeY: %f\n", sizeX, sizeY);
   glBegin(GL_QUADS);
   glTexCoord2f(0.0f, 0.0f);
