Index: branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc	(revision 8070)
+++ branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc	(revision 8071)
@@ -23,4 +23,9 @@
 #include "parser/tinyxml/tinyxml.h"
 
+#include "shell_command.h"
+
+SHELL_COMMAND(activate, LighteningEffect, activateLightening);
+SHELL_COMMAND(deactivate, LighteningEffect, deactivateLightening);
+
 using namespace std;
 
@@ -36,5 +41,6 @@
 		this->loadParams(root);
 
-	this->activate();
+  if(this->lighteningActivate)
+	 this->activate();
 }
 
@@ -47,4 +53,7 @@
 {
 	WeatherEffect::loadParams(root);
+  
+  LoadParam(root, "coord", this, LighteningEffect, coord);
+  LoadParam(root, "option", this, LighteningEffect, setLighteningOption);
 }
 
@@ -52,19 +61,16 @@
 bool LighteningEffect::init()
 {
+  lighteningActivate = false;
+  
   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->width = 40.0f;
+  this->height = 10.0f;
   this->bNewCoordinate = false;
 
-  this->seedX = 20.f;
-  this->seedZ = 50.0f;
+  this->seedX = 10.f;
+  this->seedZ = 10.0f;
   this->seedTime = 4.0f;
 
@@ -72,8 +78,6 @@
   this->billboard->setTexture("maps/lightning_bolt.png");
   this->billboard->setSize(this->width, this->height);
-  this->billboard->setAbsCoor(50, 0, 0);
+  this->billboard->setAbsCoor(0.0f, 50.0f, 0.0f);
   this->billboard->setVisibiliy(false);
-  //this->billboard->setAbsCoor(50, 0, 0);
-  //this->billboard->setVisibiliy(true);
 
 /*
@@ -89,9 +93,18 @@
 }
 
+void LighteningEffect::coord(float x, float y, float z)
+{
+  this->billboard->setAbsCoor(x, y, z);
+  this->mainPosX = x;
+  this->mainPosY = y;
+  this->mainPosZ = z;
+  
+}
 
 bool LighteningEffect::activate()
 {
 	PRINTF(0)( "Activating LighteningEffect\n" );
-
+  this->billboard->setVisibiliy(true);
+  lighteningActivate = true;
 }
 
@@ -100,8 +113,13 @@
 {
 	PRINTF(0)("Deactivating LighteningEffect\n");
+  this->billboard->setVisibiliy(false);
+  lighteningActivate = false;
 }
 
 void LighteningEffect::tick (float dt)
 {
+  if(!lighteningActivate)
+    return;
+  
   this->time += dt;
 
@@ -121,6 +139,6 @@
   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->flashFrequency = this->seedTime * (float)rand()/(float)RAND_MAX + 0.1;
+    this->billboard->setAbsCoor(this->mainPosX - this->seedX * (float)rand()/(float)RAND_MAX, this->mainPosY, this->mainPosZ + 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 8070)
+++ branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h	(revision 8071)
@@ -31,7 +31,16 @@
 
 		virtual void tick(float dt);
+    
+    void coord(float x, float y, float z);
+    
+    inline void setLighteningOption(const std::string& option) { if (option == "activate") this->lighteningActivate = true;
+                                                                                  /*if (option == "activate") this->snowActivate = true; */}
 
+    void activateLightening() { this->activate(); }
+    void deactivateLightening() { this->deactivate(); }
+    
 	private:
     Billboard* billboard;
+    bool lighteningActivate;
 
     float flashFrequency;                   //!< frequency to activate itself
@@ -52,4 +61,8 @@
     float seedZ;
     float seedTime;
+    
+    float mainPosX;
+    float mainPosY;
+    float mainPosZ;
 
     //OrxSound::SoundSource    soundSource;
