Index: /branches/presentation/src/world_entities/creatures/fps_player.cc
===================================================================
--- /branches/presentation/src/world_entities/creatures/fps_player.cc	(revision 10703)
+++ /branches/presentation/src/world_entities/creatures/fps_player.cc	(revision 10704)
@@ -63,7 +63,4 @@
 {
   this->setPlayer(NULL);
-
-  if( this->aimingSystem)
-    delete this->aimingSystem;
 }
 
@@ -126,24 +123,15 @@
   registerEvent(KeyMapper::PEV_JUMP);
   registerEvent(KeyMapper::PEV_CROUCH);
+  registerEvent(KeyMapper::PEV_FIRE1);
   registerEvent(EV_MOUSE_MOTION);
-
-  this->aimingSystem = NULL;
 
   // weapon manager for the fps
   dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
 
-  if( State::isOnline())
-  {
-    Weapon* wpRight = new FPSSniperRifle(0);
-    wpRight->setName("testGun Right");
-    this->addWeapon(wpRight,1, 0);
-    wpRight->addChild(this->aimingSystem);
-
-    this->toList( OM_PLAYERS );
-  }
-
-  this->aimingSystem = new AimingSystem(this);
-
-
+  
+
+  //this->aimingSystem = new AimingSystem(this);
+
+#if 0
   this->getWeaponManager().changeWeaponConfig(1);
   this->getWeaponManager().setSlotCount(2);
@@ -160,4 +148,32 @@
   this->getWeaponManager().getFixedTarget()->setParentMode(PNODE_ALL);
   this->getWeaponManager().getFixedTarget()->setRelCoor(10,0,0);
+  
+  if( true /*State::isOnline()*/ )
+  {
+    FPSSniperRifle* wpRight = new FPSSniperRifle(0);
+    wpRight->setName("testGun Right");
+    this->addWeapon(wpRight,1, 0);
+    wpRight->toList( this->getOMListNumber() );
+    wpRight->setParent( &this->cameraNode );
+    wpRight->requestAction( WA_ACTIVATE );
+    //wpRight->addChild(this->aimingSystem);
+
+    //this->toList( OM_PLAYERS );
+  }
+#endif
+                         
+  FPSSniperRifle* wpRight = new FPSSniperRifle(0);
+  wpRight->setName("testGun Right");
+  wpRight->toList( this->getOMListNumber() );
+  wpRight->setParent( &this->cameraNode );
+  
+  this->weaponMan.setParentEntity( this );
+  this->weaponMan.setSlotCount(1);
+  this->weaponMan.createWeaponSlot(0, this->cameraNode.getRelCoor().x, this->cameraNode.getRelCoor().y, this->cameraNode.getRelCoor().z, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->weaponMan.addWeapon(wpRight, 0, 0);
+  this->weaponMan.changeWeaponConfig(0);
+  Playable::weaponConfigChanged();
+  this->weaponMan.getFixedTarget()->setParent(&this->cameraNode );
+  this->weaponMan.getFixedTarget()->setRelCoor( 100000,0,0 );
 
 
@@ -269,13 +285,4 @@
     State::getCamera()->setViewMode(Camera::ViewFPS);
 
-
-    if( this->aimingSystem != NULL)
-    {
-      this->aimingSystem->toList(OM_GROUP_01);
-      this->aimingSystem->setParent(&this->cameraNode);
-  //     this->aimingSystem->setParentMode(PNODE_ROTATE_AND_MOVE);
-      this->aimingSystem->setRelDir(Quaternion(M_PI_4*-0.58f, Vector(0,0,1)));
-      this->aimingSystem->setRelCoor(0, -1, -1);
-    }
 
   }
@@ -353,29 +360,6 @@
   if( this->bFire)
   {
+    PRINTF(0)("FPSPLAYER FIRE %d\n", this->getOMListNumber() );
     this->getWeaponManager().fire();
-  }
-
-
-  //dealing damage
-  if ( State::isOnline() && (SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/))
-  {
-    this->damageTicker -= time;
-
-    if ( this->damageTicker <= 0.0f && this->beFire() )
-    {
-      this->damageTicker = 0.25;
-
-      WorldEntity * victim = aimingSystem->getNearestTarget();
-
-      if ( victim )
-      {
-        PRINTF(0)("FIRE: hit %s\n", victim->getClassCName());
-        victim->hit( 20, this );
-      }
-      else
-      {
-        PRINTF(0)("FIRE: nothing hit\n");
-      }
-    }
   }
 
@@ -533,6 +517,4 @@
 
   this->setOnGround(false);
-  if( this->aimingSystem != NULL)
-    this->aimingSystem->flushList();
     
 }
Index: /branches/presentation/src/world_entities/creatures/fps_player.h
===================================================================
--- /branches/presentation/src/world_entities/creatures/fps_player.h	(revision 10703)
+++ /branches/presentation/src/world_entities/creatures/fps_player.h	(revision 10704)
@@ -11,5 +11,5 @@
 
 
-class AimingSystem;
+class FPSSniperRifle;
 
 
@@ -72,7 +72,7 @@
     bool                  changingZoom;
 
-    AimingSystem*         aimingSystem;      //!< aiming system of the player
-
     float                 damageTicker;      //!< ticker for dealing damage
+    
+    FPSSniperRifle*       weapon;
     
 };
Index: /branches/presentation/src/world_entities/npcs/adm_turret.cc
===================================================================
--- /branches/presentation/src/world_entities/npcs/adm_turret.cc	(revision 10703)
+++ /branches/presentation/src/world_entities/npcs/adm_turret.cc	(revision 10704)
@@ -254,5 +254,5 @@
 void AdmTurret::addWeapon( const TiXmlElement * root )
 {
-	this->weapon = new BspWeapon();
+	this->weapon = new BspWeapon(getOMListNumber());
 	this->weapon->setParent( this->cannons );
 	this->weapon->loadParams(root);
Index: /branches/presentation/src/world_entities/weapons/bsp_weapon.cc
===================================================================
--- /branches/presentation/src/world_entities/weapons/bsp_weapon.cc	(revision 10703)
+++ /branches/presentation/src/world_entities/weapons/bsp_weapon.cc	(revision 10704)
@@ -31,7 +31,7 @@
 *  Standard constructor
 */
-BspWeapon::BspWeapon ()
-{
-	this->init();
+BspWeapon::BspWeapon ( OM_LIST list )
+{
+	this->init( list );
 }
 
@@ -49,5 +49,5 @@
 BspWeapon::BspWeapon (const  TiXmlElement* root)
 {
-	this->init();
+	this->init( OM_GROUP_00 );
 	if (root != NULL)
         {
@@ -94,7 +94,9 @@
 void BspWeapon::tick( float dt )
 {
+  PRINTF(0)("BSPWEAPON TICK: %d %f %f\n", bFire, bRate, dt );
 	if (bFire) {
-		if (bRate < 0) {
+		if (bRate <= 0) {
 			bRate += fireRate;
+                        PRINTF(0)("BSPWEAPON SHOOT\n");
 			this->shoot();
 		}
@@ -111,7 +113,7 @@
 }
 
-void BspWeapon::init()
-{
-	bRate = 0;
+void BspWeapon::init( OM_LIST list )
+{
+	bRate = 0.0;
 	bFire = false;
 	range = 1000;
@@ -123,5 +125,5 @@
 	this->aimingSystem = new AimingSystem( this );
 	this->aimingSystem->setParent( this );
-	this->aimingSystem->toList(OM_GROUP_00);
+	this->aimingSystem->toList(list);
 	
 }
@@ -157,4 +159,6 @@
 
 	bool hit = false;
+        
+        PRINTF(0)("groups: %d %d %d %d\n", this->getOMListNumber(), this->aimingSystem->getOMListNumber(), OM_GROUP_01, OM_GROUP_00);
 
 	if ( target == NULL )
@@ -170,4 +174,5 @@
 				hit = true;
 				printf( "HIT %s\n", target->getClassName().c_str() );
+                                target->hit( this->damage, this );
 			}
 			else
@@ -178,10 +183,5 @@
 	}
 
-	if ( !hit )
-	{
-		//Vector explosionPos = this->getAbsCoor() + this->getAbsDir().apply( Vector( 1, 0, 0 ) )*shortestDist;
-
-		//TODO create explosion at explosionPos
-	}
+	
 	
 	
@@ -196,5 +196,5 @@
     (*it)->draw();
   }
-#if 0
+#if 1
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
Index: /branches/presentation/src/world_entities/weapons/bsp_weapon.h
===================================================================
--- /branches/presentation/src/world_entities/weapons/bsp_weapon.h	(revision 10703)
+++ /branches/presentation/src/world_entities/weapons/bsp_weapon.h	(revision 10704)
@@ -51,15 +51,16 @@
 		ObjectListDeclaration(BspWeapon);
 	public:
-		BspWeapon ();
+		BspWeapon ( OM_LIST list );
 		BspWeapon (const  TiXmlElement* root);
 		virtual ~BspWeapon();
 
-		void init();
+		void init( OM_LIST list );
 		void loadParams(const TiXmlElement* root);
-		void fire(bool fire){ bFire = fire; }
+		void fire(bool fire){ this->bFire = fire; }
 		virtual void tick(float dt);
 		virtual void draw() const;
 
-
+		void setAlwaysHits( bool r ){ this->alwaysHits = r; }
+                void setDamage( float d ){ this->damage = d; }
 	private:
 
@@ -68,9 +69,7 @@
 		void setRange( float r ){ this->range = r; }
 		float damage;
-		void setDamage( float d ){ this->damage = d; }
 		float fireRate;
 		void setFireRate( float r ){ this->fireRate = r; }
 		bool alwaysHits;
-		void setAlwaysHits( bool r ){ this->alwaysHits = r; }
 		void addPoint(float x, float y, float z);
 		
Index: /branches/presentation/src/world_entities/weapons/fps_sniper_rifle.cc
===================================================================
--- /branches/presentation/src/world_entities/weapons/fps_sniper_rifle.cc	(revision 10703)
+++ /branches/presentation/src/world_entities/weapons/fps_sniper_rifle.cc	(revision 10704)
@@ -27,4 +27,5 @@
 #include "weapon_manager.h"
 #include "util/loading/factory.h"
+#include "debug.h"
 
 
@@ -48,8 +49,8 @@
    creates a new weapon
 */
-FPSSniperRifle::FPSSniperRifle ( int leftRight)
+FPSSniperRifle::FPSSniperRifle ( int leftRight, OM_LIST list)
   : Weapon()
 {
-  this->init();
+  this->init(list);
 
   this->leftRight = leftRight;
@@ -59,5 +60,5 @@
 FPSSniperRifle::FPSSniperRifle(const TiXmlElement* root)
 {
-  this->init();
+  this->init( OM_GROUP_01 );
 
   if (root != NULL)
@@ -76,5 +77,5 @@
 
 
-void FPSSniperRifle::init()
+void FPSSniperRifle::init(OM_LIST list)
 {
   this->registerObject(this, FPSSniperRifle::_objectList);
@@ -95,12 +96,19 @@
   //this->minCharge = 2;
 
-  this->setActionSound(WA_SHOOT, "sounds/laser.wav");
-  this->setActionSound(WA_ACTIVATE, "sounds/voices/lasers.wav");
+  //this->setActionSound(WA_SHOOT, "sounds/laser.wav");
+  //this->setActionSound(WA_ACTIVATE, "sounds/voices/lasers.wav");
 
 
   this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-  this->setProjectileTypeC("Laser");
-  this->prepareProjectiles(20);
-
+  //this->setProjectileTypeC("Laser");
+  //this->prepareProjectiles(20);
+  this->toList( list );
+  this->weapon = new BspWeapon( this->getOMListNumber() );
+  this->weapon->setAlwaysHits( true );
+  this->weapon->setDamage( 35 );
+  this->weapon->setParent( this );
+  this->weapon->toList( list );
+    
+  this->bFire = false;
 }
 
@@ -145,18 +153,6 @@
 void FPSSniperRifle::fire()
 {
-  Projectile* pj =  this->getProjectile();
-  if (pj == NULL)
-    return;
-
-//   Explosion::explode(this, Vector(0.1,0.1,0.1));
-
-  pj->setParent(this);
-  pj->setParentMode(PNODE_ROTATE_AND_MOVE);
-
-  pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*550 + VECTOR_RAND(5) );
-
-  pj->setAbsCoor(this->getEmissionPoint() + this->getAbsDirX() * 25.0f);
-  pj->setAbsDir(this->getAbsDir());
-  pj->activate();
+  PRINTF(0)("sniper fire\n");
+  this->bFire = true;
 }
 
@@ -190,4 +186,15 @@
 }
 
-
-
+void FPSSniperRifle::tick( float dt )
+{
+  Weapon::tick( dt );
+  this->weapon->fire( bFire );
+  
+  if ( bFire ){
+      PRINTF(0)("REAL FIRE\n");
+  }
+  bFire = false;
+}
+
+
+
Index: /branches/presentation/src/world_entities/weapons/fps_sniper_rifle.h
===================================================================
--- /branches/presentation/src/world_entities/weapons/fps_sniper_rifle.h	(revision 10703)
+++ /branches/presentation/src/world_entities/weapons/fps_sniper_rifle.h	(revision 10704)
@@ -25,4 +25,5 @@
 
 #include "weapon.h"
+#include "bsp_weapon.h"
 
 
@@ -42,9 +43,9 @@
 
   public:
-    FPSSniperRifle (int leftRight);
+    FPSSniperRifle (int leftRight, OM_LIST list);
     FPSSniperRifle (const TiXmlElement* root);
     virtual ~FPSSniperRifle ();
 
-    void init();
+    void init(OM_LIST list);
     virtual void loadParams(const TiXmlElement* root);
 
@@ -55,4 +56,5 @@
 
     virtual void draw() const;
+    virtual void tick( float dt );
 
 
@@ -61,4 +63,7 @@
     int              leftRight;   //!< this will become an enum
     Material*        material;    //!< material
+    
+    BspWeapon*       weapon;
+    bool             bFire;
 
   };
Index: /branches/presentation/src/world_entities/world_entity.cc
===================================================================
--- /branches/presentation/src/world_entities/world_entity.cc	(revision 10703)
+++ /branches/presentation/src/world_entities/world_entity.cc	(revision 10704)
@@ -983,5 +983,5 @@
   this->decreaseHealth(damage);
 
-  PRINTF(5)("Hit me: %s::%s now only %f/%f health\n", this->getClassCName(), this->getCName(), this->getHealth(), this->getHealthMax());
+  PRINTF(0)("Hit me: %s::%s now only %f/%f health\n", this->getClassCName(), this->getCName(), this->getHealth(), this->getHealthMax());
 
   if( this->getHealth() > 0)
