Index: /branches/powerups/src/defs/class_id.h
===================================================================
--- /branches/powerups/src/defs/class_id.h	(revision 6106)
+++ /branches/powerups/src/defs/class_id.h	(revision 6107)
@@ -150,5 +150,5 @@
   CL_LASER_POWER_UP             =    0x00000212,
   CL_WEAPON_POWER_UP            =    0x00000213,
-  CL_SHIELD_POWER_UP            =    0x00000214,
+  CL_PARAM_POWER_UP             =    0x00000214,
 
   CL_TEST_GUN                   =    0x00000230,
Index: /branches/powerups/src/world_entities/power_ups/param_power_up.cc
===================================================================
--- /branches/powerups/src/world_entities/power_ups/param_power_up.cc	(revision 6107)
+++ /branches/powerups/src/world_entities/power_ups/param_power_up.cc	(revision 6107)
@@ -0,0 +1,118 @@
+/*
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+
+#include "weapon_power_up.h"
+#include "factory.h"
+#include "state.h"
+#include "list.h"
+
+#include "primitive_model.h"
+
+#include "factory.h"
+#include "load_param.h"
+
+using namespace std;
+
+CREATE_FACTORY(ParamPowerUp, CL_PARAM_POWER_UP);
+
+ParamPowerUp::ParamPowerUp () : PowerUp(0.0, 0.0, 1.0)
+{
+  this->init();
+}
+
+ParamPowerUp::ParamPowerUp(const TiXmlElement* root) : PowerUp(0.0, 0.0, 1.0)
+{
+  this->init();
+  this->loadParams(root);
+}
+
+
+ParamPowerUp::~ParamPowerUp ()
+{
+}
+
+
+void ParamPowerUp::init()
+{
+  this->value = 0;
+  this->max_value = 0;
+  this->min_value = 0;
+}
+
+
+void ParamPowerUp::loadParams(const TiXmlElement* root)
+{
+  static_cast<PowerUp*>(this)->loadParams(root);
+  LoadParam(root, "type", this, ParamPowerUp, setType);
+  if(root->FirstChildElement("value") != NULL) {
+    LoadParam(root, "value", this, ParamPowerUp, setValue);
+  }
+  else {
+    LoadParam(root, "max-value", this, ParamPowerUp, setMaxValue);
+    LoadParam(root, "min-value", this, ParamPowerUp, setMinValue);
+    respawn();
+  }
+}
+
+void ParamPowerUp::setValue(int value)
+{
+  this->value = value;
+}
+
+void ParamPowerUp::setType(const char* type)
+{
+  for(int i = 0; i < PARAM_size; ++i) {
+    if(strcmp(type, paramTypes[i]) == 0) {
+      this->type = (EnumParamPowerUpType)i;
+      break;
+    }
+  }
+}
+
+void ParamPowerUp::setMaxValue(int value)
+{
+  this->max_value = value;
+}
+
+void ParamPowerUp::setMinValue(int value)
+{
+  this->min_value = value;
+}
+
+int ParamPowerUp::getValue()
+{
+  return this->value;
+}
+
+EnumParamPowerUpType ParamPowerUp::getType()
+{
+  return this->type;
+}
+
+void ParamPowerUp::respawn()
+{
+  if(this->min_value != this->max_value)
+  {
+    value = this->min_value + (int)(rand() * (this->max_value - this->min_value));
+  }
+}
+
+const char* ParamPowerUp::paramTypes[] = {
+  "shield"
+};
+
+
Index: /branches/powerups/src/world_entities/power_ups/param_power_up.h
===================================================================
--- /branches/powerups/src/world_entities/power_ups/param_power_up.h	(revision 6107)
+++ /branches/powerups/src/world_entities/power_ups/param_power_up.h	(revision 6107)
@@ -0,0 +1,43 @@
+/*!
+ * @file weapon_power_up.h
+ * @brief A class representing a PowerUp modifying parameters.
+*/
+
+#ifndef _PARAM_POWER_UP_H
+#define _PARAM_POWER_UP_H
+
+#include "power_up.h"
+
+/* FORWARD DEFINITION */
+
+typedef enum EnumParamPowerUpType {
+  PARAM_SHIELD,
+  PARAM_size
+} EnumParamPowerUpType;
+
+class ParamPowerUp : public PowerUp {
+
+public:
+  ParamPowerUp();
+  ParamPowerUp(const TiXmlElement* root);
+  virtual ~ParamPowerUp ();
+
+  void setValue(int value);
+  void setType(EnumParamPowerUpType type)
+
+protected:
+  virtual void respawn();
+
+private:
+  void init();
+  void loadParams(const TiXmlElement* root);
+
+private:
+  static const char* paramTypes;
+  EnumParamPowerUpType type;
+  int value;
+  int max_value;
+  int min_value;
+};
+
+#endif /* _PARAM_POWER_UP_H */
Index: /branches/powerups/src/world_entities/power_ups/power_up.cc
===================================================================
--- /branches/powerups/src/world_entities/power_ups/power_up.cc	(revision 6106)
+++ /branches/powerups/src/world_entities/power_ups/power_up.cc	(revision 6107)
@@ -50,19 +50,44 @@
     if(dynamic_cast<Extendable*>(entity)->pickup(this))
     {
-      this->hide();
+      this->setVisibiliy(false);
     }
   }
 }
 
-void PowerUp::hide()
+void PowerUp::draw() const
 {
-  this->setVisibiliy(false);
+  WorldEntity::draw();
+
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+  float matrix[4][4];
+
+  /* translate */
+  glTranslatef (this->getAbsCoor ().x,
+                this->getAbsCoor ().y,
+                this->getAbsCoor ().z);
+  /* rotate */ // FIXME: devise a new Way to rotate this
+  this->getAbsDir ().matrix (matrix);
+  glMultMatrixf((float*)matrix);
+
+  this->sphereMaterial->select();
+  sphereModel->draw();
+
+  glPopMatrix();
 }
 
-void PowerUp::draw()
+const char* PowerUp::respawnTypes[] = {
+  "none",
+  "time"
+};
+
+void PowerUp::setRespawnType(const char* type)
 {
-  WorldEntity::draw();
-  this->sphereMaterial->select();
-  sphereModel->draw();
+  for(int i = 0; i < RESPAWN_size; ++i) {
+    if(strcmp(type, respawnTypes[i]) == 0) {
+      this->respawnType = (PowerUpRespawn)i;
+      break;
+    }
+  }
 }
 
Index: /branches/powerups/src/world_entities/power_ups/power_up.h
===================================================================
--- /branches/powerups/src/world_entities/power_ups/power_up.h	(revision 6106)
+++ /branches/powerups/src/world_entities/power_ups/power_up.h	(revision 6107)
@@ -11,4 +11,10 @@
 class Material;
 
+typedef enum PowerUpRespawn {
+  RESPAWN_NONE,
+  RESPAWN_TIME,
+  RESPAWN_size
+} PowerUpRespawn;
+
 class PowerUp : public WorldEntity {
 
@@ -17,10 +23,11 @@
   void collidesWith (WorldEntity* entity, const Vector& location);
 
-  void draw();
+  virtual void draw () const;
+  void setRespawnType(const char* type);
 
 protected:
   PowerUp(float r, float g, float b);
   virtual ~PowerUp ();
-  virtual void hide();
+  virtual void respawn() {};
 
   static Model* sphereModel;
@@ -28,4 +35,6 @@
 private:
   Material* sphereMaterial;
+  PowerUpRespawn respawnType;
+  static const char* respawnTypes[];
 };
 
Index: /branches/powerups/src/world_entities/power_ups/weapon_power_up.cc
===================================================================
--- /branches/powerups/src/world_entities/power_ups/weapon_power_up.cc	(revision 6106)
+++ /branches/powerups/src/world_entities/power_ups/weapon_power_up.cc	(revision 6107)
@@ -61,5 +61,5 @@
   {
     this->weaponXML = elem;
-    createWeapon();
+    respawn();
   }
   else
@@ -74,5 +74,5 @@
 }
 
-void WeaponPowerUp::createWeapon()
+void WeaponPowerUp::respawn()
 {
   this->weapon = dynamic_cast<Weapon*>((weaponXML == NULL)
@@ -85,8 +85,2 @@
   this->weapon = dynamic_cast<Weapon*>(Factory::fabricate(name));
 }
-
-void WeaponPowerUp::hide()
-{
-  PowerUp::hide();
-  this->createWeapon();
-}
Index: /branches/powerups/src/world_entities/power_ups/weapon_power_up.h
===================================================================
--- /branches/powerups/src/world_entities/power_ups/weapon_power_up.h	(revision 6106)
+++ /branches/powerups/src/world_entities/power_ups/weapon_power_up.h	(revision 6107)
@@ -23,5 +23,5 @@
 
 protected:
-  void hide();
+  virtual void respawn();
 
 private:
Index: /branches/powerups/src/world_entities/space_ships/space_ship.cc
===================================================================
--- /branches/powerups/src/world_entities/space_ships/space_ship.cc	(revision 6106)
+++ /branches/powerups/src/world_entities/space_ships/space_ship.cc	(revision 6107)
@@ -427,5 +427,5 @@
     }
   }
-  else if(powerUp->isA(CL_SHIELD_POWER_UP)) {
+  else if(powerUp->isA(CL_PARAM_POWER_UP)) {
 
   }
