Index: branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc	(revision 7561)
+++ branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc	(revision 7561)
@@ -0,0 +1,123 @@
+/*
+   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 "rain_effect.h"
+
+#include "util/loading/load_param.h"
+#include "util/loading/factory.h"
+
+#include "glincl.h"
+
+using namespace std;
+
+CREATE_FACTORY(RainEffect, CL_RAIN_EFFECT);
+
+RainEffect::RainEffect(const TiXmlElement* root)
+{
+  this->setClassID(CL_RAIN_EFFECT, "RainEffect");
+
+//   this->rainMode = GL_LINEAR;
+//   this->rainDensity = 0.001f;
+//   this->rainStart = 10.0f;
+//   this->rainEnd = 1000.0f;
+
+  if (root != NULL)
+    this->loadParams(root);
+
+  this->activate();
+}
+
+
+
+RainEffect::~RainEffect()
+{
+  this->deactivate();
+}
+
+
+void RainEffect::loadParams(const TiXmlElement* root)
+{
+  WeatherEffect::loadParams(root);
+
+//   LoadParam(root, "rain-mode", this, RainEffect, setRainMode);
+//   LoadParam(root, "rain-density", this, RainEffect, setRainDensity);
+//   LoadParam(root, "rain-color", this, RainEffect, setRainColor);
+
+
+}
+
+bool RainEffect::init()
+{}
+
+
+
+bool RainEffect::activate()
+{
+//   PRINTF(0)( "Enabling Rain Effect, mode: %i, density: %f, start: %f, end: %f, color %f, %f, %f\n", this->rainMode, this->rainDensity, this->rainStart, this->rainEnd, this->colorVector.x, this->colorVector.y, this->colorVector.z);
+// 
+//   glEnable(GL_RAIN);
+//   {
+//     //GLfloat rainColor[4] = {0.7, 0.6, 0.6, 1.0};
+//     GLfloat rainColor[4] = { colorVector.x, colorVector.y, colorVector.z, 1.0};
+// 
+//     glRaini(GL_RAIN_MODE, this->rainMode);
+//     glRainfv(GL_RAIN_COLOR, rainColor);
+//     glRainf(GL_RAIN_DENSITY, this->rainDensity);
+//     glHint(GL_RAIN_HINT, GL_DONT_CARE);
+//     glRainf(GL_RAIN_START, this->rainStart);
+//     glRainf(GL_RAIN_END, this->rainEnd);
+// 
+//     //glRaini(GL_RAIN_COORDINATE_SOURCE, GL_RAIN_COORDINATE);
+//   }
+//   glClearColor(0.5, 0.5, 0.5, 1.0);
+}
+
+
+bool RainEffect::deactivate()
+{
+  PRINTF(0)("Deactivating Rain Effect\n");
+// 	glDisable(GL_RAIN);
+}
+
+void RainEffect::draw()
+{
+  Particle* drawPart = particles;
+
+  glDepthMask(GL_FALSE);
+  glPushAttrib(GL_ENABLE_BIT);
+
+  glDisable(GL_LIGHTING);
+  glDisable(GL_TEXTURE_2D);
+
+  glEnable(GL_LINE_SMOOTH);
+  glEnable(GL_BLEND);
+  glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
+
+  glLineWidth(2.0);
+  glBegin(GL_LINES);
+  while (likely(drawPart != NULL))
+  {
+  //    printf("%f %f %f %f\n", drawPart->color[0], drawPart->color[1], drawPart->color[2], drawPart->color[3]);
+    glColor4fv(drawPart->color);
+    glVertex3f(drawPart->position.x,  drawPart->position.y,  drawPart->position.z);
+    glVertex3f(drawPart->position.x - drawPart->velocity.x * drawPart->radius,
+               drawPart->position.y - drawPart->velocity.y * drawPart->radius,
+               drawPart->position.z - drawPart->velocity.z * drawPart->radius);
+    drawPart = drawPart->next;
+  }
+  glEnd();
+
+  glDepthMask(GL_TRUE);
+  glPopAttrib();
+}
Index: branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h	(revision 7561)
+++ branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h	(revision 7561)
@@ -0,0 +1,43 @@
+/**
+ * @file rain_effect.h
+ */
+
+#ifndef _RAIN_EFFECT
+#define _RAIN_EFFECT
+
+// #include "vector.h"
+#include "particle_system.h"
+#include "material.h"
+
+#include "weather_effect.h"
+
+class RainEffect : public WeatherEffect
+{
+  public:
+    RainEffect(const TiXmlElement* root = NULL);
+    virtual ~RainEffect();
+
+    virtual void loadParams(const TiXmlElement* root);
+
+    virtual bool init();
+
+    virtual bool activate();
+    virtual bool deactivate();
+
+    virtual void draw() const;
+
+//     inline void setRainMode(const std::string& mode) { this->rainMode = this->stringToRainMode(mode); }
+//     inline void setRainDensity(float density) { this->rainDensity = density; }
+//     inline void setRainRange(float start, float end) { this->rainStart = start; this->rainEnd = end; }
+//     inline void setRainColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); }
+
+  private:
+//     GLint                   rainMode;
+//     GLfloat                 rainDensity;
+//     GLfloat                 rainStart;
+//     GLfloat                 rainEnd;
+//     Vector                  colorVector;
+};
+
+
+#endif  /* _RAIN_EFFECT */
Index: branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc	(revision 7560)
+++ branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc	(revision 7561)
@@ -57,6 +57,4 @@
   float fogColor[4] = {0.2, 0.2, 0.2, 1.0};
 
-  // glClearColor(0.0, 0.0, 0.0, 1.0);  //sets bg color?!
-
   /* set up fog params */	
   glEnable(GL_FOG);						// Enable Fog
@@ -64,7 +62,9 @@
   glFogfv(GL_FOG_COLOR, fogColor);				// Set The Fog Color
   glFogf(GL_FOG_START, 0.0f);					// Set The Fog Start
-  glFogf(GL_FOG_END, 1.0f);					// Set The Fog End
-  glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);
+  glFogf(GL_FOG_END, 10.0f);					// Set The Fog End
+  glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);	// Set The Fog based on vertice coordinates
   // glHint(GL_FOG_HINT, GL_NICEST);				// Per-Pixel Fog Calculation
+
+  // glClearColor(0.0, 0.0, 0.0, 1.0);  //sets bg color?!
 
   /* enable texturing & set texturing function */
@@ -117,6 +117,4 @@
 	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
-	// glPushAttrib(GL_ENABLE_BIT);
-
 	glEnable(GL_BLEND);
 	glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
@@ -150,6 +148,6 @@
 	 	glFogCoordfEXT(0.0f);	glVertex3f(0.0f,0.0f,100.0f);
 		glFogCoordfEXT(0.0f);	glVertex3f( 100.0f,0.0f,100.0f);
-		glFogCoordfEXT(5.0f);	glVertex3f( 100.0f, 100.0f,100.0f);
-		glFogCoordfEXT(5.0f);	glVertex3f(0.0f, 100.0f,100.0f);
+		glFogCoordfEXT(50.0f);	glVertex3f( 100.0f, 100.0f,100.0f);
+		glFogCoordfEXT(50.0f);	glVertex3f(0.0f, 100.0f,100.0f);
 	glEnd();
 
@@ -172,5 +170,4 @@
 
 	// glPopAttrib();
-	// glPopAttrib();
 }
 
