Index: /branches/vs-enhencements/src/world_entities/projectiles/plasma_pulse.cc
===================================================================
--- /branches/vs-enhencements/src/world_entities/projectiles/plasma_pulse.cc	(revision 10646)
+++ /branches/vs-enhencements/src/world_entities/projectiles/plasma_pulse.cc	(revision 10646)
@@ -0,0 +1,139 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004-2006 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: Marc Schaerrer
+   co-programmer: Benjamin Grauer, Nicolas Schlumberger
+
+*/
+
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
+
+#include "plasma_pulse.h"
+
+#include "state.h"
+
+#include <cassert>
+#include "debug.h"
+
+// #include "effects/wobblegrid.h"
+
+
+
+ObjectListDefinition(PlasmaPulse);
+CREATE_FAST_FACTORY_STATIC(PlasmaPulse);
+
+/**
+ *  standard constructor
+*/
+PlasmaPulse::PlasmaPulse () : Projectile()
+{
+  this->registerObject(this, PlasmaPulse::_objectList);
+
+//   srand(time(0));   //initialize Random Nomber Generator
+
+  //this->loadModel("models/projectiles/laser.obj");
+
+  this->setMinEnergy(1);
+  this->setHealthMax(0);
+  this->lifeSpan = 3.0;
+//   this->angle     = 0;
+
+  this->grid = new Billboard();
+  this->grid->setSize(.2, .2);
+  this->grid->setPulseMagnitude(.8);
+  this->grid->setParent(this);
+  this->grid->setVisibility(false);
+  this->grid->setPulse();
+
+  this->grid->setTexture( "textures/plasma.png");
+
+  this->grid->toList(OM_ENVIRON); 
+}
+
+
+/**
+ *  standard deconstructor
+ *
+ */
+PlasmaPulse::~PlasmaPulse ()
+{
+  this->grid->toList(OM_DEAD);
+}
+
+
+void PlasmaPulse::activate()
+{
+  this->origList = this->getOMListNumber();
+  this->toList(OM_ENVIRON);
+  this->grid->setVisibility(true);
+
+  this->setPhysDamage(10);
+  this->setElecDamage(0);
+  this->setHealth(0);
+}
+
+
+void PlasmaPulse::deactivate()
+{
+  this->lifeCycle = 0.0;
+
+ // this->hide();
+  this->grid->setVisibility(false);
+  this->lifeCycle = 0.0;
+  this->toList(OM_NULL);
+  //this->toList(OM_DEAD);
+  this->removeNode();
+
+  PlasmaPulse::fastFactory->kill(this);
+}
+
+/**
+ *  signal tick, time dependent things will be handled here
+ * @param dt time since last tick
+*/
+void PlasmaPulse::tick (float dt)
+{
+  Vector v = this->velocity * dt;
+  this->shiftCoor(v);
+
+  if (this->tickLifeCycle(dt))
+    this->deactivate();
+
+  this->grid->tick(dt);
+
+  for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
+  {
+    if( ((*eIterator)->getOMListNumber() != (this->origList -1))  && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 3)
+    {
+      (*eIterator)->hit (this->getDamage(),this);
+      this->deactivate();
+    }
+  }
+
+}
+
+/**
+ *  the function gets called, when the projectile is destroyed
+*/
+void PlasmaPulse::destroy (WorldEntity* killer)
+{
+  this->deactivate();
+  Projectile::destroy( killer );
+  PRINTF(5)("DESTROY PlasmaPulse\n");
+  this->lifeCycle = .95; //!< @todo calculate this usefully.
+}
+
+
+void PlasmaPulse::draw () const
+{
+  this->grid->draw();
+}
Index: /branches/vs-enhencements/src/world_entities/projectiles/plasma_pulse.h
===================================================================
--- /branches/vs-enhencements/src/world_entities/projectiles/plasma_pulse.h	(revision 10646)
+++ /branches/vs-enhencements/src/world_entities/projectiles/plasma_pulse.h	(revision 10646)
@@ -0,0 +1,39 @@
+/*!
+ * @file plasma_pulse.h
+ * @brief Pulsing Plasma projectile
+*/
+
+#ifndef _PLASMAPULSE_H
+#define _PLASMAPULSE_H
+
+#include "projectile.h"
+#include "effects/billboard.h"
+
+class Vector;
+class Weapon;
+class FastFactory;
+class Wobblegrid;
+
+class PlasmaPulse : public Projectile
+{
+  ObjectListDeclaration(PlasmaPulse);
+  public:
+    PlasmaPulse ();
+    virtual ~PlasmaPulse ();
+
+    virtual void activate();
+    virtual void deactivate();
+
+    virtual void destroy (WorldEntity* killer);
+
+    virtual void tick (float dt);
+    virtual void draw () const;
+
+  private:
+    static FastFactory*               fastFactory;
+    Billboard*                        grid;
+
+//     WorldEntity* hitEntity; // FIXME TEMPORARY
+};
+
+#endif /* _PLASMAPULSE_H */
