Index: branches/mountain_lake/src/lib/graphics/Makefile.am
===================================================================
--- branches/mountain_lake/src/lib/graphics/Makefile.am	(revision 8826)
+++ branches/mountain_lake/src/lib/graphics/Makefile.am	(revision 8835)
@@ -29,5 +29,5 @@
 		effects/snow_effect.cc \
 		effects/cloud_effect.cc \
-		effects/lightening_effect.cc \
+		effects/lightning_effect.cc \
 		effects/lense_flare.cc
 
@@ -58,5 +58,5 @@
 		effects/snow_effect.h \
 		effects/cloud_effect.h \
-		effects/lightening_effect.h \
+		effects/lightning_effect.h \
 		effects/lense_flare.h
 
Index: branches/mountain_lake/src/lib/graphics/effects/lightening_effect.cc
===================================================================
--- branches/mountain_lake/src/lib/graphics/effects/lightening_effect.cc	(revision 8826)
+++ 	(revision )
@@ -1,302 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-### File Specific:
-   main-programmer: hdavid, amaechler
-*/
-
-#include "lightening_effect.h"
-
-#include "state.h"
-
-#include "util/loading/load_param.h"
-#include "util/loading/factory.h"
-#include "util/loading/resource_manager.h"
-
-#include "effects/billboard.h"
-
-#include "glincl.h"
-#include "parser/tinyxml/tinyxml.h"
-
-#include "shell_command.h"
-#include "light.h"
-
-SHELL_COMMAND(activate, LighteningEffect, activateLightening);
-SHELL_COMMAND(deactivate, LighteningEffect, deactivateLightening);
-
-using namespace std;
-
-CREATE_FACTORY(LighteningEffect, CL_LIGHTENING_EFFECT);
-
-LighteningEffect::LighteningEffect(const TiXmlElement* root)
-{
-  this->setClassID(CL_LIGHTENING_EFFECT, "LighteningEffect");
-
-  this->init();
-
-  if (root != NULL)
-    this->loadParams(root);
-
-  if(this->lighteningActivate)
-    this->activate();
-}
-
-LighteningEffect::~LighteningEffect()
-{
-  this->deactivate();
-}
-
-void LighteningEffect::loadParams(const TiXmlElement* root)
-{
-  WeatherEffect::loadParams(root);
-
-  LoadParam(root, "coord", this, LighteningEffect, coord);
-  LoadParam(root, "frequency", this, LighteningEffect, setFlashFrequency);
-  LoadParam(root, "const-time", this, LighteningEffect, setFlashConstTime);
-  LoadParam(root, "rising-time", this, LighteningEffect, setFlashRisingTime);
-  LoadParam(root, "size", this, LighteningEffect, setFlashSize);
-  LoadParam(root, "seed", this, LighteningEffect, setFlashSeed);
-
-  LOAD_PARAM_START_CYCLE(root, element);
-  {
-    LoadParam_CYCLE(element, "option", this, LighteningEffect, setLighteningOption);
-  }
-  LOAD_PARAM_END_CYCLE(element);
-}
-
-
-void LighteningEffect::init()
-{
-  //default values
-  this->lighteningActivate = false;
-
-  this->flashFrequency = 4.0f;
-  this->flashFrequencyBase = 4.0f;
-  this->flashFrequencySeed = 2.0f;
-
-  this->flashHoldTime = 0.1f;
-  this->flashRisingTime = 0.03f;
-
-  this->seedX = 500.f;
-  this->seedZ = 1000.0f;
-
-  this->width = 700.0f;
-  this->height = 250.0f;
-  this->seedWidth = 50.0f;
-  this->seedHeight = 50.0f;
-
-  this->lighteningMove = false;
-
-  this->mainPosX = 1200;
-  this->mainPosY = 900;
-  this->mainPosZ = 0;
-
-  this->time = 0.0;
-
-  // initialize lightening textures
-  this->billboard[0] = new Billboard(NULL);
-  this->billboard[0]->setTexture("maps/lightning_bolt1.png");
-  this->billboard[0]->setSize(this->width, this->height);
-  this->billboard[0]->setVisibiliy(false);
-
-  this->billboard[1] = new Billboard(NULL);
-  this->billboard[1]->setTexture("maps/lightning_bolt2.png");
-  this->billboard[1]->setSize(this->width, this->height);
-  this->billboard[1]->setVisibiliy(false);
-
-  this->billboard[2] = new Billboard(NULL);
-  this->billboard[2]->setTexture("maps/lightning_bolt3.png");
-  this->billboard[2]->setSize(this->width, this->height);
-  this->billboard[2]->setVisibiliy(false);
-
-  this->billboard[3] = new Billboard(NULL);
-  this->billboard[3]->setTexture("maps/lightning_bolt4.png");
-  this->billboard[3]->setSize(this->width, this->height);
-  this->billboard[3]->setVisibiliy(false);
-
-  if (this->lighteningMove)
-  {
-    this->cameraCoor = State::getCameraNode()->getAbsCoor();
-    this->billboard[0]->setAbsCoor(this->cameraCoor.x+1200,900,this->cameraCoor.z+0);
-    this->billboard[1]->setAbsCoor(this->cameraCoor.x+1200,900,this->cameraCoor.z+0);
-    this->billboard[2]->setAbsCoor(this->cameraCoor.x+1200,900,this->cameraCoor.z+0);
-    this->billboard[3]->setAbsCoor(this->cameraCoor.x+1200,900,this->cameraCoor.z+0);
-  }
-  else
-  {
-    this->billboard[0]->setAbsCoor(1200,900,0);
-    this->billboard[1]->setAbsCoor(1200,900,0);
-    this->billboard[2]->setAbsCoor(1200,900,0);
-    this->billboard[3]->setAbsCoor(1200,900,0);
-  }
-
-  this->flashLight = new Light();
-  this->flashLight->setDiffuseColor(0,0,0);
-  this->flashLight->setSpecularColor(0,0,0);
-
-  //load sound
-  if (this->thunderBuffer != NULL)
-    ResourceManager::getInstance()->unload(this->thunderBuffer);
-  this->thunderBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/thunder.wav", WAV);
-
-}
-
-void LighteningEffect::coord(float x, float y, float z)
-{
-  if (this->lighteningMove)
-  {
-    this->cameraCoor = State::getCameraNode()->getAbsCoor();
-    this->billboard[0]->setAbsCoor(this->cameraCoor.x+x, y, this->cameraCoor.z+z);
-    this->billboard[1]->setAbsCoor(this->cameraCoor.x+x, y, this->cameraCoor.z+z);
-    this->billboard[2]->setAbsCoor(this->cameraCoor.x+x, y, this->cameraCoor.z+z);
-    this->billboard[3]->setAbsCoor(this->cameraCoor.x+x, y, this->cameraCoor.z+z);
-  }
-  else
-  {
-    this->billboard[0]->setAbsCoor(x, y, z);
-    this->billboard[1]->setAbsCoor(x, y, z);
-    this->billboard[2]->setAbsCoor(x, y, z);
-    this->billboard[3]->setAbsCoor(x, y, z);
-  }
-
-  this->mainPosX = x;
-  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);
-}
-
-
-void LighteningEffect::activate()
-{
-  PRINTF(0)( "Activating LighteningEffect\n" );
-  this->lighteningActivate = true;
-
-  this->time = 0;
-}
-
-
-void LighteningEffect::deactivate()
-{
-  PRINTF(0)("Deactivating LighteningEffect\n");
-  this->lighteningActivate = false;
-
-  this->billboard[0]->setVisibiliy(false);
-  this->billboard[1]->setVisibiliy(false);
-  this->billboard[2]->setVisibiliy(false);
-  this->billboard[3]->setVisibiliy(false);
-}
-
-void LighteningEffect::tick (float dt)
-{
-  if(!lighteningActivate)
-    return;
-
-  this->time += dt;
-
-  float x;
-  x = (float)rand()/(float)RAND_MAX;
-
-  // TODO: Make random flashing with short light dingsda:)
-
-  if( this->time > this->flashFrequency)
-  {
-    // Reset timer
-    this->time = 0.0f;
-
-    // Move billboard to start position
-    this->flashLight->setAbsCoor(this->billboard[0]->getAbsCoor().x, this->billboard[0]->getAbsCoor().y, this->billboard[0]->getAbsCoor().z);
-
-    // Start a flash & lightening cycle
-    this->billboard[0]->setVisibiliy(true);
-
-    // Lighten up environment
-    this->flashLight->setDiffuseColor(1,1,1);
-    this->flashLight->setSpecularColor(1,1,1);
-
-    // Play thunder sound
-    this->soundSource.play(this->thunderBuffer);
-  }
-
-  if( this->billboard[0]->isVisible() && this->time > this->flashRisingTime*1/3 )
-  {
-    this->billboard[0]->setVisibiliy(false);
-    this->billboard[1]->setVisibiliy(true);
-  }
-  else if( this->billboard[1]->isVisible() && this->time > this->flashRisingTime*2/3 )
-  {
-    this->billboard[1]->setVisibiliy(false);
-    this->billboard[2]->setVisibiliy(true);
-
-  }
-  else if( this->billboard[2]->isVisible() && this->time > this->flashRisingTime)
-  {
-    this->billboard[2]->setVisibiliy(false);
-    this->billboard[3]->setVisibiliy(true);
-  }
-
-  if( this->billboard[3]->isVisible() && this->time > this->flashHoldTime)
-  {
-    this->billboard[3]->setVisibiliy(false);
-    this->time = 0.0f;
-    this->flashLight->setDiffuseColor(0,0,0);
-    this->flashLight->setSpecularColor(0,0,0);
-
-    this->newCoordinates();
-  }
-}
-
-void LighteningEffect::newCoordinates() {
-
-    float posX, posZ;
-
-    if(this->lighteningMove)
-    {
-
-      this->cameraCoor = State::getCameraNode()->getAbsCoor();
-      posX = this->mainPosX - this->seedX * (float)rand()/(float)RAND_MAX + this->cameraCoor.x;
-      posZ = this->mainPosZ + this->seedZ * (float)rand()/(float)RAND_MAX + this->cameraCoor.z;
-
-    }
-    else
-    {
-
-      posX = this->mainPosX - this->seedX * (float)rand()/(float)RAND_MAX;
-      posZ = this->mainPosZ + this->seedZ * (float)rand()/(float)RAND_MAX;
-
-    }
-
-    this->billboard[0]->setAbsCoor(posX, this->mainPosY, posZ);
-    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->flashFrequency = this->flashFrequencyBase + this->flashFrequencySeed * (float)rand()/(float)RAND_MAX;
-
-    float w = this->width + this->seedWidth * (float)rand()/(float)RAND_MAX;
-    float h = this->height + this->seedHeight * (float)rand()/(float)RAND_MAX;
-
-    this->billboard[0]->setSize(w, h);
-    this->billboard[1]->setSize(w, h);
-    this->billboard[2]->setSize(w, h);
-    this->billboard[3]->setSize(w, h);
-}
Index: branches/mountain_lake/src/lib/graphics/effects/lightening_effect.h
===================================================================
--- branches/mountain_lake/src/lib/graphics/effects/lightening_effect.h	(revision 8826)
+++ 	(revision )
@@ -1,102 +1,0 @@
-/**
-* @file lightening_effect.h
-*/
-
-#ifndef _LIGHTENING_EFFECT
-#define _LIGHTENING_EFFECT
-
-#include "vector.h"
-#include "vector2D.h"
-
-#include "weather_effect.h"
-
-#include "sound_buffer.h"
-#include "sound_source.h"
-
-class Billboard;
-class Light;
-
-class LighteningEffect : public WeatherEffect
-{
-	public:
-		LighteningEffect(const TiXmlElement* root = NULL);
-		virtual ~LighteningEffect();
-
-		virtual void loadParams(const TiXmlElement* root);
-
-		virtual void init();
-
-		virtual void activate();
-		virtual void deactivate();
-
-		inline  void activateLightening() { this->activate(); }
-		inline  void deactivateLightening() { this->deactivate(); }
-
-		virtual void tick(float dt);
-
-		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;
-			if (option == "movelightening") this->lighteningMove = true;
-		}
-
-		inline void setFlashFrequency(float baseFrequency, float seedTime) {
-			this->flashFrequencyBase = baseFrequency;
-			this->flashFrequency = baseFrequency;
-			this->flashFrequencySeed = seedTime;
-		}
-
-		inline void setFlashConstTime(float holdTime) { this->flashHoldTime = holdTime; }
-
-		inline void setFlashRisingTime(float flashRisingTime) {
-			if(flashRisingTime > this->flashHoldTime)
-				this->flashRisingTime = this->flashHoldTime * 0.5;
-			else
-				this->flashRisingTime = flashRisingTime;
-		}
-
-		inline void setFlashSeed(float seedX, float seedZ) {
-			this->seedX = seedX;
-			this->seedZ = seedZ;
-		}
-
-
-	private:
-		Billboard* billboard[4];
-		bool lighteningActivate;
-		bool lighteningMove;
-
-		float flashFrequency;
-		float flashFrequencyBase;
-		float flashHoldTime;
-		float flashRisingTime;
-
-		float time;
-
-		float width;
-		float height;
-		float seedWidth;
-		float seedHeight;
-
-		float seedX;
-		float seedZ;
-		float flashFrequencySeed;
-
-		float mainPosX;
-		float mainPosY;
-		float mainPosZ;
-
-    void newCoordinates();
-
-		Vector cameraCoor;
-
-		Light* flashLight;
-
-		OrxSound::SoundSource    soundSource;
-		OrxSound::SoundBuffer*   thunderBuffer;
-
-};
-
-#endif  /* _LIGHTENING_EFFECT */
Index: branches/mountain_lake/src/lib/graphics/effects/lightning_effect.cc
===================================================================
--- branches/mountain_lake/src/lib/graphics/effects/lightning_effect.cc	(revision 8835)
+++ branches/mountain_lake/src/lib/graphics/effects/lightning_effect.cc	(revision 8835)
@@ -0,0 +1,281 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: hdavid, amaechler
+*/
+
+#include "lightning_effect.h"
+
+#include "state.h"
+
+#include "util/loading/load_param.h"
+#include "util/loading/factory.h"
+#include "util/loading/resource_manager.h"
+
+#include "effects/billboard.h"
+
+#include "glincl.h"
+#include "parser/tinyxml/tinyxml.h"
+
+#include "shell_command.h"
+#include "light.h"
+
+SHELL_COMMAND(activate, LightningEffect, activateLightning);
+SHELL_COMMAND(deactivate, LightningEffect, deactivateLightning);
+
+using namespace std;
+
+CREATE_FACTORY(LightningEffect, CL_LIGHTNING_EFFECT);
+
+LightningEffect::LightningEffect(const TiXmlElement* root) {
+    this->setClassID(CL_LIGHTNING_EFFECT, "LightningEffect");
+
+    this->init();
+
+    if (root != NULL)
+        this->loadParams(root);
+
+    if(this->lightningActivate)
+        this->activate();
+}
+
+LightningEffect::~LightningEffect() {
+    this->deactivate();
+}
+
+void LightningEffect::loadParams(const TiXmlElement* root) {
+    WeatherEffect::loadParams(root);
+
+    LoadParam(root, "coord", this, LightningEffect, coord);
+    LoadParam(root, "frequency", this, LightningEffect, setFlashFrequency);
+    LoadParam(root, "const-time", this, LightningEffect, setFlashConstTime);
+    LoadParam(root, "rising-time", this, LightningEffect, setFlashRisingTime);
+    LoadParam(root, "size", this, LightningEffect, setFlashSize);
+    LoadParam(root, "seed", this, LightningEffect, setFlashSeed);
+
+    LOAD_PARAM_START_CYCLE(root, element);
+    {
+        LoadParam_CYCLE(element, "option", this, LightningEffect, setLightningOption);
+    }
+    LOAD_PARAM_END_CYCLE(element);
+}
+
+
+void LightningEffect::init() {
+    //default values
+    this->lightningActivate = false;
+
+    this->flashFrequency = 4.0f;
+    this->flashFrequencyBase = 4.0f;
+    this->flashFrequencySeed = 2.0f;
+
+    this->flashHoldTime = 0.1f;
+    this->flashRisingTime = 0.03f;
+
+    this->seedX = 500.f;
+    this->seedZ = 1000.0f;
+
+    this->width = 640.0f;
+    this->height = 400.0f;
+    this->seedWidth = 100.0f;
+    this->seedHeight = 100.0f;
+
+    this->lightningMove = false;
+
+    this->mainPosX = 0;
+    this->mainPosY = 100;
+    this->mainPosZ = 5;
+
+    this->time = 0.0;
+
+    // initialize thunder billboard
+    int i;
+    for (i = 0; i < 4; i++) {
+        this->thunderBolt[i] = new Billboard(NULL);
+        this->thunderBolt[i]->setSize(this->width, this->height);
+        this->thunderBolt[i]->setVisibiliy(false);
+    }
+
+    this->thunderTextureA = true;
+    this->setTexture();
+
+    if (this->lightningMove) {
+        this->cameraCoor = State::getCameraNode()->getAbsCoor();
+        for (i = 0; i < 4; i++)
+          this->thunderBolt[i]->setAbsCoor(this->cameraCoor.x + this->mainPosX, this->mainPosY, this->cameraCoor.z + this->mainPosZ);
+    } else
+        for (i = 0; i < 4; i++)
+          this->thunderBolt[i]->setAbsCoor(this->mainPosX, this->mainPosY, this->mainPosZ);
+
+    this->flashLight = new Light();
+    this->flashLight->setDiffuseColor(0,0,0);
+    this->flashLight->setSpecularColor(0,0,0);
+
+    //load sound
+    if (this->thunderBuffer != NULL)
+        ResourceManager::getInstance()->unload(this->thunderBuffer);
+    this->thunderBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/thunder.wav", WAV);
+
+}
+
+void LightningEffect::coord(float x, float y, float z) {
+    int i;
+
+    if (this->lightningMove) {
+        this->cameraCoor = State::getCameraNode()->getAbsCoor();
+        for (i = 0; i < 4; i++)
+            this->thunderBolt[i]->setAbsCoor(this->cameraCoor.x+x, y, this->cameraCoor.z+z);
+    } else
+        for (i = 0; i < 4; i++)
+            this->thunderBolt[i]->setAbsCoor(x, y, z);
+
+    this->mainPosX = x;
+    this->mainPosY = y;
+    this->mainPosZ = z;
+}
+
+
+void LightningEffect::setFlashSize(float width, float height, float seedWidth, float seedHeight) {
+    this->width = width;
+    this->height = height;
+    this->seedWidth = seedWidth;
+    this->seedHeight = seedHeight;
+
+    int i;
+    for (i = 0; i < 4; i++)
+        this->thunderBolt[i]->setSize(this->width, this->height);
+
+}
+
+
+void LightningEffect::activate() {
+    PRINTF(0)( "Activating LightningEffect\n" );
+    this->lightningActivate = true;
+
+    this->time = 0;
+}
+
+
+void LightningEffect::deactivate() {
+    PRINTF(0)("Deactivating LightningEffect\n");
+    this->lightningActivate = false;
+
+    int i;
+    for (i = 0; i < 4; i++)
+        this->thunderBolt[i]->setVisibiliy(false);
+
+}
+
+void LightningEffect::tick (float dt) {
+    if(!lightningActivate)
+        return;
+
+    this->time += dt;
+
+    float x;
+    x = (float)rand()/(float)RAND_MAX;
+
+    if( this->time > this->flashFrequency) {
+        // Reset timer
+        this->time = 0.0f;
+
+        // Move thunderBolt to start position
+        this->flashLight->setAbsCoor(this->thunderBolt[0]->getAbsCoor().x, this->thunderBolt[0]->getAbsCoor().y, this->thunderBolt[0]->getAbsCoor().z);
+
+        // Start a flash & lightning cycle
+        this->thunderBolt[0]->setVisibiliy(true);
+
+        // Lighten up environment
+        this->flashLight->setDiffuseColor(1,1,1);
+        this->flashLight->setSpecularColor(1,1,1);
+
+        // Play thunder sound
+        this->soundSource.play(this->thunderBuffer);
+    }
+
+    if( this->thunderBolt[0]->isVisible() && this->time > this->flashRisingTime*1/3 ) {
+        this->thunderBolt[0]->setVisibiliy(false);
+        this->thunderBolt[1]->setVisibiliy(true);
+    } else if( this->thunderBolt[1]->isVisible() && this->time > this->flashRisingTime*2/3 ) {
+        this->thunderBolt[1]->setVisibiliy(false);
+        this->thunderBolt[2]->setVisibiliy(true);
+
+    } else if( this->thunderBolt[2]->isVisible() && this->time > this->flashRisingTime) {
+        this->thunderBolt[2]->setVisibiliy(false);
+        this->thunderBolt[3]->setVisibiliy(true);
+    }
+
+    if( this->thunderBolt[3]->isVisible() && this->time > this->flashHoldTime) {
+        this->thunderBolt[3]->setVisibiliy(false);
+        this->time = 0.0f;
+        this->flashLight->setDiffuseColor(0,0,0);
+        this->flashLight->setSpecularColor(0,0,0);
+
+        this->newCoordinates();
+    }
+}
+
+void LightningEffect::newCoordinates() {
+
+    float posX, posZ;
+
+    if(this->lightningMove) {
+        this->cameraCoor = State::getCameraNode()->getAbsCoor();
+        posX = this->mainPosX - this->seedX * (float)rand()/(float)RAND_MAX + this->cameraCoor.x;
+        posZ = this->mainPosZ + this->seedZ * (float)rand()/(float)RAND_MAX + this->cameraCoor.z;
+    } else {
+        posX = this->mainPosX - this->seedX * (float)rand()/(float)RAND_MAX;
+        posZ = this->mainPosZ + this->seedZ * (float)rand()/(float)RAND_MAX;
+    }
+
+    this->switchTexture();
+
+    int i;
+    for (i = 0; i < 4; i++)
+        this->thunderBolt[i]->setAbsCoor(posX, this->mainPosY, posZ);
+
+    this->flashFrequency = this->flashFrequencyBase + this->flashFrequencySeed * (float)rand()/(float)RAND_MAX;
+
+    float w = this->width + this->seedWidth * (float)rand()/(float)RAND_MAX;
+    float h = this->height + this->seedHeight * (float)rand()/(float)RAND_MAX;
+
+    for (i = 0; i < 4; i++)
+        this->thunderBolt[i]->setSize(w, h);
+
+}
+
+void LightningEffect::setTexture() {
+
+  if (this->thunderTextureA) {
+    this->thunderBolt[0]->setTexture("maps/thunderbA1.png");
+    this->thunderBolt[1]->setTexture("maps/thunderbA2.png");
+    this->thunderBolt[2]->setTexture("maps/thunderbA3.png");
+    this->thunderBolt[3]->setTexture("maps/thunderbA4.png");
+  }
+  else {
+    this->thunderBolt[0]->setTexture("maps/thunderbB1.png");
+    this->thunderBolt[1]->setTexture("maps/thunderbB2.png");
+    this->thunderBolt[2]->setTexture("maps/thunderbB3.png");
+    this->thunderBolt[3]->setTexture("maps/thunderbB4.png");
+  }
+
+}
+
+void LightningEffect::switchTexture() {
+
+  if (this->thunderTextureA)
+    this->thunderTextureA = false;
+  else
+    this->thunderTextureA = true;
+
+  this->setTexture();
+
+}
Index: branches/mountain_lake/src/lib/graphics/effects/lightning_effect.h
===================================================================
--- branches/mountain_lake/src/lib/graphics/effects/lightning_effect.h	(revision 8835)
+++ branches/mountain_lake/src/lib/graphics/effects/lightning_effect.h	(revision 8835)
@@ -0,0 +1,114 @@
+/**
+* @file lightning_effect.h
+*/
+
+#ifndef _LIGHTNING_EFFECT
+#define _LIGHTNING_EFFECT
+
+#include "vector.h"
+#include "vector2D.h"
+
+#include "weather_effect.h"
+
+#include "sound_buffer.h"
+#include "sound_source.h"
+
+class Billboard;
+class Light;
+
+class LightningEffect : public WeatherEffect {
+public:
+    LightningEffect(const TiXmlElement* root = NULL);
+    virtual ~LightningEffect();
+
+    virtual void loadParams(const TiXmlElement* root);
+
+    virtual void init();
+
+    virtual void activate();
+    virtual void deactivate();
+
+    inline  void activateLightning() {
+        this->activate();
+    }
+    inline  void deactivateLightning() {
+        this->deactivate();
+    }
+
+    virtual void tick(float dt);
+
+    void coord(float x, float y, float z);
+    void setFlashSize(float width, float height, float seedWidth, float seedHeight);
+
+    inline void setLightningOption(const std::string& option) {
+        if (option == "activate")
+            this->lightningActivate = true;
+        if (option == "movelightning")
+            this->lightningMove = true;
+    }
+
+    inline void setFlashFrequency(float baseFrequency, float seedTime) {
+        this->flashFrequencyBase = baseFrequency;
+        this->flashFrequency = baseFrequency;
+        this->flashFrequencySeed = seedTime;
+    }
+
+    inline void setFlashConstTime(float holdTime) {
+        this->flashHoldTime = holdTime;
+    }
+
+    inline void setFlashRisingTime(float flashRisingTime) {
+        if(flashRisingTime > this->flashHoldTime)
+            this->flashRisingTime = this->flashHoldTime * 0.5;
+        else
+            this->flashRisingTime = flashRisingTime;
+    }
+
+    inline void setFlashSeed(float seedX, float seedZ) {
+        this->seedX = seedX;
+        this->seedZ = seedZ;
+    }
+
+
+private:
+
+    void newCoordinates();
+    void setTexture();
+    void switchTexture();
+
+    Billboard* thunderBolt[4];
+    bool thunderTextureA;
+
+    bool lightningActivate;
+    bool lightningMove;
+
+    float flashFrequency;
+    float flashFrequencyBase;
+    float flashHoldTime;
+    float flashRisingTime;
+
+    float time;
+
+    float width;
+    float height;
+    float seedWidth;
+    float seedHeight;
+
+    float seedX;
+    float seedZ;
+    float flashFrequencySeed;
+
+    float mainPosX;
+    float mainPosY;
+    float mainPosZ;
+
+    Vector cameraCoor;
+
+    Light* flashLight;
+
+    OrxSound::SoundSource    soundSource;
+    OrxSound::SoundBuffer*   thunderBuffer;
+
+};
+
+#endif  /* _LIGHTNING_EFFECT */
