Index: branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc
===================================================================
--- branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc	(revision 8823)
+++ branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc	(revision 8824)
@@ -25,4 +25,6 @@
 
 #include <vector>
+
+#include "debug.h"
 
 #include "aabb.h"
@@ -67,12 +69,20 @@
   AABB* box = collision->getEntityB()->getModelAABB();
 
+  if( box != NULL)
+  {
+    PRINTF(0)("collpos:\n");
+    Vector collPos =  ce->getCollisionPosition();
+    collPos.debug();
 
+  }
 
-  if(box!=NULL)
+#if 0
+  if( box != NULL)
     height = ( ce->getCollisionPosition() - collision->getEntityB()->getAbsCoor() )*(-1.0f) ;
   else
     height = ce->getCollisionPosition() - collision->getEntityB()->getAbsCoor() ;
 
-  if(box!=NULL) {
+
+  if( box != NULL) {
 
 
@@ -124,4 +134,5 @@
 
   }// if(box!= NULL)
+#endif
   /*
   PRINTF(0)("Collision with Ground: \n");
Index: branches/single_player_map/src/lib/math/quaternion.h
===================================================================
--- branches/single_player_map/src/lib/math/quaternion.h	(revision 8823)
+++ branches/single_player_map/src/lib/math/quaternion.h	(revision 8824)
@@ -51,5 +51,5 @@
   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 */
-  inline bool operator!= (const Quaternion& q) const { return (unlikely(this->v!=q.v&&this->w!=q.w))?true:false; };
+  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); };
Index: branches/single_player_map/src/lib/math/vector.h
===================================================================
--- branches/single_player_map/src/lib/math/vector.h	(revision 8823)
+++ branches/single_player_map/src/lib/math/vector.h	(revision 8824)
@@ -47,5 +47,5 @@
   inline bool operator== (const Vector& v) const { return (this->x==v.x&&this->y==v.y&&this->z==v.z)?true:false; };
   /** @param v: the Vecor to compare with this one @returns true, if the Vecors are different, false otherwise */
-  inline bool operator!= (const Vector& v) const { return (this->x!=v.x&&this->y!=v.y&&this->z!=v.z)?true:false; };
+  inline bool operator!= (const Vector& v) const { return (this->x!=v.x||this->y!=v.y||this->z!=v.z)?true:false; };
   /** @param index The index of the "array" @returns the x/y/z coordinate */
   inline float operator[] (float index) const {if( index == 0) return this->x; if( index == 1) return this->y; if( index == 2) return this->z; }
Index: branches/single_player_map/src/world_entities/npcs/generic_npc.cc
===================================================================
--- branches/single_player_map/src/world_entities/npcs/generic_npc.cc	(revision 8823)
+++ branches/single_player_map/src/world_entities/npcs/generic_npc.cc	(revision 8824)
@@ -401,4 +401,38 @@
 float GenericNPC::lookAt(WorldEntity* worldEntity)
 {}
+
+
+/**
+ * turns to a given direction
+ */
+bool GenericNPC::turnTo(float qu, float qx, float qy, float qz)
+{
+  Quaternion destDir = Quaternion(Vector(qx, qy, qz), qu);
+
+  // check if this is the current goal
+  if( this->destDir != destDir)
+  {
+    this->destCoor = destCoor;
+
+    float time = 5.0f;
+
+    if( this->currentAnim != NULL)
+      delete this->currentAnim;
+
+    this->currentAnim = new Animation3D(this);
+    this->currentAnim->addKeyFrame(this->getAbsCoor(), this->getAbsDir(), time, ANIM_LINEAR, ANIM_LINEAR);
+    this->currentAnim->addKeyFrame(this->getAbsCoor(), this->destDir, time, ANIM_LINEAR, ANIM_LINEAR);
+
+    this->currentAnim->setInfinity(ANIM_INF_CONSTANT);
+    this->currentAnim->play();
+
+    this->setAnimation(CROUCH_STAND, MD2_ANIM_LOOP);
+  }
+
+  // calculate the distance
+  Vector distance = this->getAbsCoor() - this->destCoor;
+  return distance.len();
+}
+
 
 
Index: branches/single_player_map/src/world_entities/npcs/generic_npc.h
===================================================================
--- branches/single_player_map/src/world_entities/npcs/generic_npc.h	(revision 8823)
+++ branches/single_player_map/src/world_entities/npcs/generic_npc.h	(revision 8824)
@@ -63,4 +63,5 @@
   /* some oriantation functions */
   float lookAt(WorldEntity* worldEntity);
+  bool turnTo(float qu, float qx, float qy, float qz);
 
   /* talking funcitons*/
