Index: branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc	(revision 8247)
+++ branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc	(revision 8251)
@@ -74,6 +74,8 @@
   this->flashRisingTime = 0.5f;
 
-  this->width = 40.0f;
-  this->height = 10.0f;
+  this->width = 400.0f;
+  this->height = 100.0f;
+  this->seedWidth = 5;
+  this->seedHeight = 5;
   this->bNewCoordinate = false;
 
@@ -81,8 +83,4 @@
   this->seedZ = 10.0f;
   this->seedTime = 4.0f;
-  
-  lightening1 = 1;
-  lightening2 = 2;
-  lightening3 = 3;
 
   this->billboard[0] = new Billboard(NULL);
@@ -130,6 +128,19 @@
   this->mainPosY = y;
   this->mainPosZ = z;
-  
-}
+}
+
+
+void LighteningEffect::setFlashSize(float width, float height, float seedWidth, float seedHeight)
+{
+  this->width = width;
+  this->height = height;
+  this->seedWidth = seedWidth;
+  this->seedHeight = seedHeight;
+  this->billboard[0]->setSize(this->width, this->height);
+  this->billboard[1]->setSize(this->width, this->height);
+  this->billboard[2]->setSize(this->width, this->height);
+  this->billboard[3]->setSize(this->width, this->height);
+}
+
 
 bool LighteningEffect::activate()
@@ -158,31 +169,55 @@
   this->time += dt;
 
+  /*if( flashLight != NULL)
+  {
+    if((int)(100*time)%2)
+      this->flashLight->setDiffuseColor(0,0,0);
+    else
+      this->flashLight->setDiffuseColor(100,100,100);
+    
+    //PRINTF(0)("100*time: %f %i\n", 100*time, (int)(100*time));
+}*/
+  
   if( this->time > this->flashFrequency)
   {
     this->billboard[0]->setVisibiliy(true);
     this->time = 0.0f;
+    
+    this->flashLight = new Light();
+    this->flashLight->setAbsCoor(this->billboard[0]->getAbsCoor().x, this->billboard[0]->getAbsCoor().y, this->billboard[0]->getAbsCoor().z);
+    this->flashLight->setDiffuseColor(100,100,100);
+    
     //this->soundSource.play(this->thunderBuffer);
   }
-  else if( this->billboard[lightening3]->isVisible() && this->time > this->flashConstTime)
-  {
-    this->billboard[lightening3]->setVisibiliy(false);
+  else if( this->billboard[3]->isVisible() && this->time > this->flashConstTime)
+  {
+    this->billboard[3]->setVisibiliy(false);
     this->time = 0.0f;
     this->bNewCoordinate = true;
-  }
-
-  if( this->billboard[lightening2]->isVisible() && this->time > this->flashRisingTime)
-  {
-    this->billboard[lightening2]->setVisibiliy(false);
-    this->billboard[lightening3]->setVisibiliy(true);
-  }
-  else if( this->billboard[lightening1]->isVisible() && this->time > this->flashRisingTime*2/3 )
-  {
-    this->billboard[lightening1]->setVisibiliy(false);
-    this->billboard[lightening2]->setVisibiliy(true);
+    
+    if(flashLight != NULL)
+    {
+      delete this->flashLight;
+      flashLight = NULL;
+    }
+  }
+
+  if( this->billboard[2]->isVisible() && this->time > this->flashRisingTime)
+  {
+    this->billboard[2]->setVisibiliy(false);
+    this->billboard[3]->setVisibiliy(true);
+    //this->flashLight->setDiffuseColor(0,0,0);
+  }
+  else if( this->billboard[1]->isVisible() && this->time > this->flashRisingTime*2/3 )
+  {
+    this->billboard[1]->setVisibiliy(false);
+    this->billboard[2]->setVisibiliy(true);
+   // this->flashLight->setDiffuseColor(0,0,0);
   }
   else if( this->billboard[0]->isVisible() && this->time > this->flashRisingTime*1/3 )
   {
     this->billboard[0]->setVisibiliy(false);
-    this->billboard[lightening1]->setVisibiliy(true);
+    this->billboard[1]->setVisibiliy(true);
+   // this->flashLight->setDiffuseColor(100,100,100);
   }
 
@@ -194,5 +229,5 @@
     this->billboard[1]->setAbsCoor(posX, this->mainPosY, posZ);
     this->billboard[2]->setAbsCoor(posX, this->mainPosY, posZ);
-    this->billboard[3]->setAbsCoor(posX, this->mainPosY, posZ);    
+    this->billboard[3]->setAbsCoor(posX, this->mainPosY, posZ);
     this->bNewCoordinate = false;
   }
@@ -201,13 +236,3 @@
 void LighteningEffect::draw() const
 {
-  /*if(!this->billboard->isVisible())
-    return;
-  
-  LightManager* lightMan = LightManager::getInstance();
-  
-  (new Light())->setAbsCoor(this->billboard->getAbsCoor().x, this->billboard->getAbsCoor().y, this->billboard->getAbsCoor().z);
-  (new Light())->setDiffuseColor(1,1,1);
-  LightManager::getInstance()->draw();
-  
-  delete lightMan;*/
-}
+}
Index: branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h	(revision 8247)
+++ branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h	(revision 8251)
@@ -16,4 +16,5 @@
 
 class Billboard;
+class Light;
 
 class LighteningEffect : public WeatherEffect
@@ -34,4 +35,5 @@
     
     void coord(float x, float y, float z);
+    void setFlashSize(float width, float height, float seedWidth, float seedHeight);
     
     inline void setLighteningOption(const std::string& option) { if (option == "activate") this->lighteningActivate = true;}
@@ -39,12 +41,10 @@
     inline void setFlashConstTime(float flashConstTime) { this->flashConstTime = flashConstTime; }
     inline void setFlashRisingTime(float flashRisingTime) { if(flashRisingTime > this->flashConstTime)
-                                                              this->flashRisingTime = this->flashConstTime/2;
-                                                            else
-                                                              this->flashRisingTime = flashRisingTime; }
-    inline void setFlashSize(float width, float height) { this->width = width;
-                                                          this->height = height; }
+                                                                                        this->flashRisingTime = this->flashConstTime/2;
+                                                                                      else
+                                                                                        this->flashRisingTime = flashRisingTime; }
     inline void setFlashSeed(float seedX, float seedZ, float seedTime) { this->seedX = seedX;
-                                                                         this->seedZ = seedZ;
-                                                                         this->seedTime = seedTime; }
+                                                                                                         this->seedZ = seedZ;
+                                                                                                         this->seedTime = seedTime; }
 
     void activateLightening() { this->activate(); }
@@ -54,7 +54,4 @@
     Billboard* billboard[4];
     bool lighteningActivate;
-    int lightening1;
-    int lightening2;
-    int lightening3;
 
     float flashFrequency;
@@ -67,4 +64,6 @@
     float width;
     float height;
+    float seedWidth;
+    float seedHeight;
 
     float seedX;
@@ -76,4 +75,6 @@
     float mainPosZ;
 
+    Light* flashLight;
+    
     //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 8247)
+++ branches/atmospheric_engine/src/world_entities/effects/billboard.cc	(revision 8251)
@@ -75,9 +75,9 @@
 void Billboard::loadParams(const TiXmlElement* root)
 {
-  LoadParam(root, "texture", this->material, Material, setDiffuseMap)
+  /*LoadParam(root, "texture", this->material, Material, setDiffuseMap)
       .describe("the texture-file to load onto the Billboard");
 
   LoadParam(root, "size", this, Billboard, setSize)
-      .describe("the size of the Billboard in Pixels");
+  .describe("the size of the Billboard in Pixels");*/
 }
 
@@ -91,6 +91,4 @@
   this->sizeX = sizeX;
   this->sizeY = sizeY;
-
-  PRINTF(0)("sizeX: %f sizeY: %f\n", sizeX, sizeY);
 }
 
