Index: /branches/proxy/src/lib/event/event_handler.cc
===================================================================
--- /branches/proxy/src/lib/event/event_handler.cc	(revision 9638)
+++ /branches/proxy/src/lib/event/event_handler.cc	(revision 9639)
@@ -25,5 +25,4 @@
 #include "compiler.h"
 #include "debug.h"
-#include "class_list.h"
 
 #include <algorithm>
Index: /branches/proxy/src/lib/math/quaternion.cc
===================================================================
--- /branches/proxy/src/lib/math/quaternion.cc	(revision 9638)
+++ /branches/proxy/src/lib/math/quaternion.cc	(revision 9639)
@@ -336,5 +336,6 @@
   // check the diagonal
   float tr = mat[0][0] + mat[1][1] + mat[2][2];
-  if( tr > 0.0f) {
+  if( tr > 0.0f)
+  {
     float s = (float)sqrtf(tr + 1.0f);
     this->w = s * 0.5f;
@@ -372,4 +373,29 @@
 }
 
+Quaternion Quaternion::lookAt(Vector from, Vector to, Vector up)
+{
+  Vector n = to - from;
+  n.normalize();
+  Vector v = n.cross(up);
+  v.normalize();
+  Vector u = v.cross(n);
+
+  float matrix[3][3];
+  matrix[0][0] = v.x;
+  matrix[0][1] = v.y;
+  matrix[0][2] = v.z;
+  matrix[1][0] = u.x;
+  matrix[1][1] = u.y;
+  matrix[1][2] = u.z;
+  matrix[2][0] = -n.x;
+  matrix[2][1] = -n.y;
+  matrix[2][2] = -n.z;
+
+  Quaternion quat;
+  quat.from3x3(matrix);
+  return quat;
+}
+
+
 /**
  * @brief outputs some nice formated debug information about this quaternion
Index: /branches/proxy/src/lib/math/quaternion.h
===================================================================
--- /branches/proxy/src/lib/math/quaternion.h	(revision 9638)
+++ /branches/proxy/src/lib/math/quaternion.h	(revision 9639)
@@ -33,93 +33,99 @@
 class Quaternion
 {
- public:
-  /** creates a Default quaternion (multiplicational identity Quaternion)*/
-  inline Quaternion () { w = 1; v = Vector(0,0,0); }
-  /** Copy constructor @param q the Quaternion to copy. */
-  inline Quaternion (const Quaternion& q) { w = q.w; v = q.v; };
-  /** creates a Quaternion looking into the direction v @param v: the direction @param f: the value */
-  inline Quaternion (const Vector& v, float f) { this->w = f; this->v = v; }
-  /** turns a rotation along an axis into a Quaternion @param angle: the amount of radians to rotate @param axis: the axis to rotate around */
-  inline Quaternion (float angle, const Vector& axis) { w = cos(angle/2.0); v = axis * sin(angle/2.0); }
-  Quaternion (const Vector& dir, const Vector& up);
-  Quaternion (float roll, float pitch, float yaw);
+  public:
+    /** creates a Default quaternion (multiplicational identity Quaternion)*/
+    inline Quaternion () { w = 1; v = Vector(0,0,0); }
+    /** Copy constructor @param q the Quaternion to copy. */
+    inline Quaternion (const Quaternion& q) { w = q.w; v = q.v; };
+    /** creates a Quaternion looking into the direction v @param v: the direction @param f: the value */
+    inline Quaternion (const Vector& v, float f) { this->w = f; this->v = v; }
+    /** turns a rotation along an axis into a Quaternion @param angle: the amount of radians to rotate @param axis: the axis to rotate around */
+    inline Quaternion (float angle, const Vector& axis) { w = cos(angle/2.0); v = axis * sin(angle/2.0); }
+    Quaternion (const Vector& dir, const Vector& up);
+    Quaternion (float roll, float pitch, float yaw);
 
-  void from3x3(float m[3][3]);
-  void from4x4(float m[4][4]);
+    void from3x3(float m[3][3]);
+    void from4x4(float m[4][4]);
 
 
-  /** @param q: the Quaternion to compare with this one. @returns true if the Quaternions are the same, false otherwise */
+    /** @param q: the Quaternion to compare with this one. @returns true if the Quaternions are the same, false otherwise */
   inline bool operator== (const Quaternion& q) const { return (unlikely(this->v==q.v&&this->w==q.w))?true:false; };
-  /** @param q: the Quaternion to compare with this one. @returns true if the Quaternions are the same, false otherwise */
+    /** @param q: the Quaternion to compare with this one. @returns true if the Quaternions are the same, false otherwise */
   inline bool operator!= (const Quaternion& q) const { return (unlikely(this->v!=q.v||this->w!=q.w))?true:false; };
-  /** @param f: a real value @return a Quaternion containing the quotient */
-  inline Quaternion operator/ (const float& f) const { return (unlikely(f==0.0)) ? Quaternion() : Quaternion(this->v/f, this->w/f); };
-  /** @param f: the value to divide by @returns the quaternion devided by f (this /= f) */
-  inline const Quaternion& operator/= (const float& f) {*this = *this / f; return *this;}
-  /** @param f: a real value @return a Quaternion containing the product */
-  inline Quaternion operator* (const float& f) const { return Quaternion(this->v*f, this->w*f); };
-  /** @param f: the value to multiply by @returns the quaternion multiplied by f (this *= f) */
-  inline const Quaternion& operator*= (const float& f) {*this = *this * f; return *this;}
-  /** @param q: another Quaternion to rotate this by @return a quaternion that represents the first one rotated by the second one (WARUNING: this operation is not commutative! e.g. (A*B) != (B*A)) */
-  Quaternion operator* (const Quaternion& q) const { return Quaternion(Vector(this->w*q.v.x + this->v.x*q.w + this->v.y*q.v.z - this->v.z*q.v.y,
-                                                                         this->w*q.v.y + this->v.y*q.w + this->v.z*q.v.x - this->v.x*q.v.z,
-                                                                         this->w*q.v.z + this->v.z*q.w + this->v.x*q.v.y - this->v.y*q.v.x),
-                                                                         this->w*q.w - this->v.x*q.v.x - this->v.y*q.v.y - this->v.z*q.v.z); };
-  /** @param q: the Quaternion to multiply by @returns the quaternion multiplied by q (this *= q) */
-  inline const Quaternion& operator*= (const Quaternion& q) {*this = *this * q; return *this; };
-  /** @param q the Quaternion by which to devide @returns the division from this by q (this / q) */
-  inline Quaternion operator/ (const Quaternion& q) const { return *this * q.inverse(); };
-  /** @param q the Quaternion by which to devide @returns the division from this by q (this /= q) */
-  inline const Quaternion& operator/= (const Quaternion& q) { *this = *this * q.inverse(); return *this; };
-  /** @param q the Quaternion to add to this @returns the quaternion added with q (this + q) */
-  inline Quaternion operator+ (const Quaternion& q) const { return Quaternion(q.v + v, q.w + w); };
-  /** @param q the Quaternion to add to this @returns the quaternion added with q (this += q) */
-  inline const Quaternion& operator+= (const Quaternion& q) { this->v += q.v; this->w += q.w; return *this; };
-  /** @param q the Quaternion to substrace from this @returns the quaternion substracted by q (this - q) */
-  inline Quaternion operator- (const Quaternion& q) const { return Quaternion(q.v - v, q.w - w); }
-  /** @param q the Quaternion to substrace from this @returns the quaternion substracted by q (this -= q) */
-  inline const Quaternion& operator-= (const Quaternion& q) { this->v -= q.v; this->w -= q.w; return *this; };
-  /** copy constructor @param q: the Quaternion to set this to. @returns the Quaternion q (or this) */
-  inline Quaternion operator= (const Quaternion& q) {this->v = q.v; this->w = q.w; return *this;}
-  /** conjugates this Quaternion @returns the conjugate */
-  inline Quaternion conjugate () const { return Quaternion(Vector(-v.x, -v.y, -v.z), this->w); };
-  /** @returns the norm of The Quaternion */
-  inline float norm () const { return sqrt(w*w + v.x*v.x + v.y*v.y + v.z*v.z); };
-  /** @returns the inverted Quaterntion of this */
-  inline Quaternion inverse () const { return conjugate() / (w*w + v.x*v.x + v.y*v.y + v.z*v.z); };
-  /** @returns the dot Product of a Quaternion */
-  inline float dot (const Quaternion& q) const { return v.x*q.v.x + v.y*q.v.y + v.z*q.v.z + w*q.w; };
-  /** @retuns the Distance between two Quaternions */
-  inline float distance(const Quaternion& q) const { return 2*acos(fabsf(this->dot(q))); };
-  /** @param v: the Vector  @return a new Vector representing v rotated by the Quaternion */
-  inline Vector apply (const Vector& v) const { return (*this * Quaternion(v, 0) * conjugate()).v; };
-  void matrix (float m[4][4]) const;
-  /** @returns the normalized Quaternion (|this|) */
-  inline Quaternion getNormalized() const { float n = this->norm(); return Quaternion(this->v/n, this->w/n); };
-  /** normalizes the current Quaternion */
-  inline void normalize() { float n = this->norm(); this->v /= n; this->w/=n; };
+    /** @param f: a real value @return a Quaternion containing the quotient */
+    inline Quaternion operator/ (const float& f) const { return (unlikely(f==0.0)) ? Quaternion() : Quaternion(this->v/f, this->w/f); };
+    /** @param f: the value to divide by @returns the quaternion devided by f (this /= f) */
+    inline const Quaternion& operator/= (const float& f) {*this = *this / f; return *this;}
+    /** @param f: a real value @return a Quaternion containing the product */
+    inline Quaternion operator* (const float& f) const { return Quaternion(this->v*f, this->w*f); };
+    /** @param f: the value to multiply by @returns the quaternion multiplied by f (this *= f) */
+    inline const Quaternion& operator*= (const float& f) {*this = *this * f; return *this;}
+    /** @param q: another Quaternion to rotate this by @return a quaternion that represents the first one rotated by the second one (WARUNING: this operation is not commutative! e.g. (A*B) != (B*A)) */
+    Quaternion operator* (const Quaternion& q) const
+    {
+      return Quaternion(Vector(this->w*q.v.x + this->v.x*q.w + this->v.y*q.v.z - this->v.z*q.v.y,
+                               this->w*q.v.y + this->v.y*q.w + this->v.z*q.v.x - this->v.x*q.v.z,
+                               this->w*q.v.z + this->v.z*q.w + this->v.x*q.v.y - this->v.y*q.v.x),
+                        this->w*q.w - this->v.x*q.v.x - this->v.y*q.v.y - this->v.z*q.v.z);
+    };
+    /** @param q: the Quaternion to multiply by @returns the quaternion multiplied by q (this *= q) */
+    inline const Quaternion& operator*= (const Quaternion& q) {*this = *this * q; return *this; };
+    /** @param q the Quaternion by which to devide @returns the division from this by q (this / q) */
+    inline Quaternion operator/ (const Quaternion& q) const { return *this * q.inverse(); };
+    /** @param q the Quaternion by which to devide @returns the division from this by q (this /= q) */
+    inline const Quaternion& operator/= (const Quaternion& q) { *this = *this * q.inverse(); return *this; };
+    /** @param q the Quaternion to add to this @returns the quaternion added with q (this + q) */
+    inline Quaternion operator+ (const Quaternion& q) const { return Quaternion(q.v + v, q.w + w); };
+    /** @param q the Quaternion to add to this @returns the quaternion added with q (this += q) */
+    inline const Quaternion& operator+= (const Quaternion& q) { this->v += q.v; this->w += q.w; return *this; };
+    /** @param q the Quaternion to substrace from this @returns the quaternion substracted by q (this - q) */
+    inline Quaternion operator- (const Quaternion& q) const { return Quaternion(q.v - v, q.w - w); }
+    /** @param q the Quaternion to substrace from this @returns the quaternion substracted by q (this -= q) */
+    inline const Quaternion& operator-= (const Quaternion& q) { this->v -= q.v; this->w -= q.w; return *this; };
+    /** copy constructor @param q: the Quaternion to set this to. @returns the Quaternion q (or this) */
+    inline Quaternion operator= (const Quaternion& q) {this->v = q.v; this->w = q.w; return *this;}
+    /** conjugates this Quaternion @returns the conjugate */
+    inline Quaternion conjugate () const { return Quaternion(Vector(-v.x, -v.y, -v.z), this->w); };
+    /** @returns the norm of The Quaternion */
+    inline float norm () const { return sqrt(w*w + v.x*v.x + v.y*v.y + v.z*v.z); };
+    /** @returns the inverted Quaterntion of this */
+    inline Quaternion inverse () const { return conjugate() / (w*w + v.x*v.x + v.y*v.y + v.z*v.z); };
+    /** @returns the dot Product of a Quaternion */
+    inline float dot (const Quaternion& q) const { return v.x*q.v.x + v.y*q.v.y + v.z*q.v.z + w*q.w; };
+    /** @retuns the Distance between two Quaternions */
+    inline float distance(const Quaternion& q) const { return 2*acos(fabsf(this->dot(q))); };
+    /** @param v: the Vector  @return a new Vector representing v rotated by the Quaternion */
+    inline Vector apply (const Vector& v) const { return (*this * Quaternion(v, 0) * conjugate()).v; };
+    void matrix (float m[4][4]) const;
+    /** @returns the normalized Quaternion (|this|) */
+    inline Quaternion getNormalized() const { float n = this->norm(); return Quaternion(this->v/n, this->w/n); };
+    /** normalizes the current Quaternion */
+    inline void normalize() { float n = this->norm(); this->v /= n; this->w/=n; };
 
-  float getHeading() const;
-  Quaternion getHeadingQuat() const;
-  float getAttitude() const;
-  Quaternion getAttitudeQuat() const;
-  float getBank() const;
-  Quaternion getBankQuat() const;
-  /** @returns the rotational axis of this Quaternion */
-  inline Vector getSpacialAxis() const { return this->v / sin(acos(w));/*sqrt(v.x*v.x + v.y*v.y + v.z+v.z);*/ };
-  /** @returns the rotational angle of this Quaternion around getSpacialAxis()  !! IN DEGREE !! */
-  inline float getSpacialAxisAngle() const { return 360.0 / M_PI * acos( this->w ); };
+    float getHeading() const;
+    Quaternion getHeadingQuat() const;
+    float getAttitude() const;
+    Quaternion getAttitudeQuat() const;
+    float getBank() const;
+    Quaternion getBankQuat() const;
+    /** @returns the rotational axis of this Quaternion */
+    inline Vector getSpacialAxis() const { return this->v / sin(acos(w));/*sqrt(v.x*v.x + v.y*v.y + v.z+v.z);*/ };
+    /** @returns the rotational angle of this Quaternion around getSpacialAxis()  !! IN DEGREE !! */
+    inline float getSpacialAxisAngle() const { return 360.0 / M_PI * acos( this->w ); };
 
 
-  inline void slerpTo(const Quaternion& toQuat, float t);
-  static Quaternion quatSlerp(const Quaternion& from, const Quaternion& to, float t);
-
-  void debug() const;
-  void debug2() const;
+    inline void slerpTo(const Quaternion& toQuat, float t);
+    static Quaternion quatSlerp(const Quaternion& from, const Quaternion& to, float t);
 
 
- public:
-  Vector    v;        //!< Imaginary Vector
-  float     w;        //!< Real part of the number
+    static Quaternion lookAt(Vector from, Vector to, Vector up);
+
+    void debug() const;
+    void debug2() const;
+
+
+  public:
+    Vector    v;        //!< Imaginary Vector
+    float     w;        //!< Real part of the number
 };
 
Index: /branches/proxy/src/lib/network/monitor/network_monitor.h
===================================================================
--- /branches/proxy/src/lib/network/monitor/network_monitor.h	(revision 9638)
+++ /branches/proxy/src/lib/network/monitor/network_monitor.h	(revision 9639)
@@ -84,5 +84,5 @@
     /* forced reconnection interface */
     inline void setForcedReconnection(IP address) { this->bForcedRecon = true; this->forcedReconnection = address;}
-    inline bool isForcedReconnection() { return this->bForcedRecon; }
+    inline bool isForcedReconnection() const { return this->bForcedRecon; }
     inline IP getForcedReconnectionIP() { this->bForcedRecon = false; return this->forcedReconnection; }
 
Index: /branches/proxy/src/lib/network/monitor/network_node.cc
===================================================================
--- /branches/proxy/src/lib/network/monitor/network_node.cc	(revision 9638)
+++ /branches/proxy/src/lib/network/monitor/network_node.cc	(revision 9639)
@@ -18,5 +18,4 @@
 #include "debug.h"
 
-
 /**
  * constructor
@@ -365,5 +364,5 @@
 
   NetworkNode* node = NULL;
-  std::list<NetworkNode*>::iterator it = this->masterServerList.begin();
+  std::list<NetworkNode*>::const_iterator it = this->masterServerList.begin();
 
   for(; it != this->masterServerList.end(); it++)
@@ -413,4 +412,7 @@
 
   PRINT(0)("%s + %s, with id %i and ip: %s\n", indent, this->peerInfo->getNodeTypeString().c_str(), this->peerInfo->userId, this->peerInfo->ip.ipString().c_str());
+
+
+
   std::list<NetworkNode*>::const_iterator it;
   if( !this->masterServerList.empty())
Index: /branches/proxy/src/lib/network/monitor/network_node.h
===================================================================
--- /branches/proxy/src/lib/network/monitor/network_node.h	(revision 9638)
+++ /branches/proxy/src/lib/network/monitor/network_node.h	(revision 9639)
@@ -12,5 +12,4 @@
 
 #include <list>
-
 
 //!< a class representing a node in the network (this can be a MASTER_SERVER, PROXY_SERVER or a CLIENT
Index: /branches/proxy/src/world_entities/weapons/aiming_turret.cc
===================================================================
--- /branches/proxy/src/world_entities/weapons/aiming_turret.cc	(revision 9638)
+++ /branches/proxy/src/world_entities/weapons/aiming_turret.cc	(revision 9639)
@@ -38,5 +38,5 @@
 */
 AimingTurret::AimingTurret ()
-  : Weapon(), target(this)
+    : Weapon(), target(this)
 {
   this->init();
@@ -46,5 +46,5 @@
 
 AimingTurret::AimingTurret(const TiXmlElement* root)
-  : target(this)
+    : target(this)
 {
   this->init();
@@ -59,5 +59,5 @@
 {
   // model will be deleted from WorldEntity-destructor
-//  delete this->target;
+  //  delete this->target;
 }
 
@@ -129,7 +129,9 @@
 
   if (likely (this->getParent() != NULL))
-    quat = Quaternion(direction, this->getParent()->getAbsDir().apply(Vector(0,1,0))) * Quaternion ( -M_PI_2, Vector(0,1,0)) ;
+    //quat = Quaternion(direction, this->getParent()->getAbsDirY()) * Quaternion ( -M_PI_2, Vector(0,1,0)) ;
+    quat = Quaternion ( M_PI_2, this->getParent()->getAbsDirY()) * Quaternion::lookAt(this->getAbsCoor(), this->target.getAbsCoor(), this->getParent()->getAbsDirY());
   else
-    quat = Quaternion(direction, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0)) ;
+    //quat = Quaternion(direction, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0)) ;
+    quat = Quaternion ( M_PI_2, Vector(0,1,0)) * Quaternion::lookAt(this->getAbsCoor(), this->target.getAbsCoor(), Vector(0,1,0));
 
   this->setAbsDirSoft(quat, 5);
@@ -144,6 +146,6 @@
     return;
 
-  pj->setVelocity(/*this->getVelocity()+*/(this->getAbsDir().apply(Vector(1,0,0))*250.0 + VECTOR_RAND(4)
-            /*target.getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity());
+  pj->setVelocity(/*this->getVelocity()+*/(this->getAbsDirX()*250.0 + VECTOR_RAND(4)
+                                          /*target.getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity());
 
   pj->setParent(PNode::getNullParent());
