Index: /branches/single_player_map/src/world_entities/npcs/generic_npc.cc
===================================================================
--- /branches/single_player_map/src/world_entities/npcs/generic_npc.cc	(revision 9041)
+++ /branches/single_player_map/src/world_entities/npcs/generic_npc.cc	(revision 9042)
@@ -87,4 +87,6 @@
   time = 30.0f;
 
+  this->behaviourList = new std::list<GenericNPC::Anim>;
+
   // collision reaction registration
   this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
@@ -186,9 +188,9 @@
 void GenericNPC::initNPC()
 {
-  if (!this->behaviourList.empty())
-  {
-    GenericNPC::Anim currentAnimation = this->behaviourList.front();
-
-    switch(this->behaviourList.front().type)
+  if (!this->behaviourList->empty())
+  {
+    GenericNPC::Anim currentAnimation = this->behaviourList->front();
+
+    switch(this->behaviourList->front().type)
     {
       case Walk:
@@ -211,4 +213,6 @@
 
         Vector dir = (currentAnimation.v - this->getAbsCoor()).getNormalized();
+        dir.y = 0.0f;
+        dir.getNormalized();
         this->setAbsDir(Quaternion(dir, Vector(0.0, 1.0, 0.0)) * Quaternion(-M_PI_2, Vector(0.0, 1.0, 0.0)));
 
@@ -222,4 +226,6 @@
 
         Vector dir = (currentAnimation.v - this->getAbsCoor()).getNormalized();
+        dir.y = 0.0f;
+        dir.getNormalized();
         this->setAbsDir(Quaternion(dir, Vector(0.0, 1.0, 0.0)) * Quaternion(-M_PI_2, Vector(0.0, 1.0, 0.0)));
 
@@ -248,13 +254,13 @@
 void GenericNPC::nextStep()
 {
-  if (!this->behaviourList.empty())
-    this->behaviourList.pop_front();
+  if (!this->behaviourList->empty())
+    this->behaviourList->pop_front();
   else
     return;
 
 
-  if (!this->behaviourList.empty())
-  {
-    GenericNPC::Anim currentAnimation = this->behaviourList.front();
+  if (!this->behaviourList->empty())
+  {
+    GenericNPC::Anim currentAnimation = this->behaviourList->front();
 
     switch( currentAnimation.type)
@@ -331,11 +337,11 @@
   anim.speed = 30.0f;
 
-  if( this->behaviourList.empty())
-  {
-    this->behaviourList.push_back(anim);
+  if( this->behaviourList->empty())
+  {
+    this->behaviourList->push_back(anim);
     this->initNPC();
   }
   else
-    this->behaviourList.push_back(anim);
+    this->behaviourList->push_back(anim);
 }
 
@@ -355,11 +361,11 @@
   anim.speed = 60.0f;
 
-  if( this->behaviourList.empty())
-  {
-    this->behaviourList.push_back(anim);
+  if( this->behaviourList->empty())
+  {
+    this->behaviourList->push_back(anim);
     this->initNPC();
   }
   else
-    this->behaviourList.push_back(anim);
+    this->behaviourList->push_back(anim);
 }
 
@@ -376,11 +382,11 @@
   anim.type = Crouch;
 
-  if( this->behaviourList.empty())
-  {
-    this->behaviourList.push_back(anim);
+  if( this->behaviourList->empty())
+  {
+    this->behaviourList->push_back(anim);
     this->initNPC();
   }
   else
-    this->behaviourList.push_back(anim);
+    this->behaviourList->push_back(anim);
 }
 void GenericNPC::crouchTo(float x, float y, float z)
@@ -397,11 +403,11 @@
   anim.type = TurnTo;
 
-  if( this->behaviourList.empty())
-  {
-    this->behaviourList.push_back(anim);
+  if( this->behaviourList->empty())
+  {
+    this->behaviourList->push_back(anim);
     this->initNPC();
   }
   else
-    this->behaviourList.push_back(anim);
+    this->behaviourList->push_back(anim);
 }
 
@@ -418,11 +424,11 @@
   anim.type = LookAt;
 
-  if( this->behaviourList.empty())
-  {
-    this->behaviourList.push_back(anim);
+  if( this->behaviourList->empty())
+  {
+    this->behaviourList->push_back(anim);
     this->initNPC();
   }
   else
-    this->behaviourList.push_back(anim);
+    this->behaviourList->push_back(anim);
 }
 
@@ -465,7 +471,7 @@
 
 
-  if (!this->behaviourList.empty())
-  {
-    GenericNPC::Anim currentAnimation = this->behaviourList.front();
+  if (!this->behaviourList->empty())
+  {
+    GenericNPC::Anim currentAnimation = this->behaviourList->front();
 
     switch( currentAnimation.type)
Index: /branches/single_player_map/src/world_entities/npcs/generic_npc.h
===================================================================
--- /branches/single_player_map/src/world_entities/npcs/generic_npc.h	(revision 9041)
+++ /branches/single_player_map/src/world_entities/npcs/generic_npc.h	(revision 9042)
@@ -12,4 +12,7 @@
 
 #include "sound_source.h"
+
+#include <stack>
+
 
 namespace OrxSound{ class SoundSource; }
@@ -35,5 +38,5 @@
 
 
-  bool finalGoalReached() { return this->behaviourList.empty(); };
+  bool finalGoalReached() { return this->behaviourList->empty(); };
 
   /* npc controlling functions to be Queued */
@@ -122,5 +125,6 @@
    float                                   soundVolume;
 
-   std::list<GenericNPC::Anim>             behaviourList;
+   std::list<GenericNPC::Anim>*            behaviourList;
+   std::stack<std::list<GenericNPC::Anim>* > animationStack;
    Vector                                  destCoor;
    Quaternion                              destDir;
