Index: code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc	(revision 11961)
+++ code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc	(revision 11976)
@@ -45,5 +45,5 @@
 
        // firstGame = true;                   //needed for the HUD
-        lives = 3;
+        lives = 0;
         point = 0;
         level = 1;
@@ -77,15 +77,17 @@
         SUPER(Pacman, tick, dt);
 
-        //orxout() << timer << endl;
-        //orxout() << afraid << endl;
-        //orxout() << totallevelpoint << endl;
-
+        if(deathtime != 0){
+            dead(dt);
+        }
+
+        else{
 
         if(afraid){
-            timer = timer - dt;
+        timer = timer - dt;
             if(timer<=0){
                 setNormal();
             }
         }
+
 
         int i = 0;
@@ -109,5 +111,5 @@
 
         if(bcolli){
-          this->catched();
+          this->catched(dt);
         }
 
@@ -125,4 +127,9 @@
         }
 
+        }
+
+
+        
+
     }
 
@@ -134,8 +141,11 @@
     }
 
-    void Pacman::catched(){
+    void Pacman::catched(float dt){
 
     if(!afraid) {
-        if(!lives) this->end();
+        if(!lives){
+          deathtime = 5;
+          this->dead(dt);  
+        }
         --lives;
         this->posreset();
@@ -225,4 +235,16 @@
     }
 
+    bool Pacman::isdead(){
+        return death;
+    }
+
+    void Pacman::dead(float dt){
+        death = true;
+
+        deathtime = deathtime-dt;
+
+        if(deathtime<0)
+            this->end();
+    }
 
     void Pacman::end()
Index: code/branches/3DPacman_FS18/src/modules/pacman/Pacman.h
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/Pacman.h	(revision 11961)
+++ code/branches/3DPacman_FS18/src/modules/pacman/Pacman.h	(revision 11976)
@@ -75,5 +75,5 @@
             void levelUp();
             bool collis(Vector3 one, Vector3 other);
-            void catched();
+            void catched(float dt);
             void posreset();
             void takePoint(PacmanPointSphere* taken);
@@ -82,4 +82,6 @@
             void setAfraid();
             void setNormal();
+            bool isdead();
+            void dead(float dt);
 
 
@@ -100,4 +102,6 @@
             //bool firstGame;
             bool afraid = false;
+            bool death = false;
+            float deathtime = 0;
             
        private:
Index: code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc	(revision 11961)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc	(revision 11976)
@@ -439,6 +439,20 @@
 
     void PacmanGhost::move(float dt, Vector3 actuelposition, Vector3 velocity){
-        if(!dontmove)
+        if(!dontmove){
             this->setPosition(Vector3(actuelposition.x+20*velocity.x*dt,10,actuelposition.z+20*velocity.z*dt));
+            
+
+            if(abs(velocity.x) == 2){
+                this->setOrientation(Quaternion(Radian(0), Vector3(0, 1, 0)));
+            }
+            else if(velocity.z == 2){
+                this->setOrientation(Quaternion(Radian(0), Vector3(0, 1, 0)));
+            }
+            else if(velocity.z == -2){
+                this->setOrientation(Quaternion(Radian(180), Vector3(0, 1, 0)));
+            }
+            else{}
+
+     }
     }
 
Index: code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.cc	(revision 11961)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.cc	(revision 11976)
@@ -68,16 +68,25 @@
         if (this->PacmanGame)
         {
-                if(this->bShowPoints_){
+            bool death = this->PacmanGame->isdead();
+            if(death){
+                bShowPoints_ = false;
+                bShowGhoststatus_ = false;
+                const std::string& deathmessage = "Game Over";
+                    setTextSize(0.4);
+                    this->setCaption(deathmessage);
+            }
+            
+            if(this->bShowPoints_ && !death) {
                     const std::string& points = "Collected points: "+multi_cast<std::string>(this->PacmanGame->getPoints()) + " of " + multi_cast<std::string>(this->PacmanGame->totallevelpoint);
                     setTextSize(0.04);
                     this->setCaption(points);
-                }
-                if(this->bShowGhoststatus_){
+            }
+  
+            if(this->bShowGhoststatus_ && !death){
                     const std::string& ghoststatus = "Do not get caught!";
-                    //if(this->PacmanGame->afraid) const std::string& ghoststatus = "Catch the ghosts!";
-                    orxout() << "Test Hier" << endl;
+                    if(this->PacmanGame->afraid) const std::string& ghoststatus = "Catch the ghosts!";
                     setTextSize(0.04);
                     this->setCaption(ghoststatus);
-                }
+            }
         }
     }    
Index: code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.h
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.h	(revision 11961)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.h	(revision 11976)
@@ -63,5 +63,5 @@
                 { return messageID; }
 
-            inline void setGhoststatus(int value){
+            inline void setGhoststatus(bool value){
                 this->bShowGhoststatus_ = value;
             }
Index: code/branches/3DPacman_FS18/src/modules/pacman/PacmanPointAfraid.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanPointAfraid.cc	(revision 11961)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanPointAfraid.cc	(revision 11976)
@@ -75,5 +75,5 @@
     { 
         resetposition = this->getPosition();
-      if((abs(resetposition.x - playerpos.x)<1) && (abs(resetposition.z - playerpos.z)<1)){
+      if((abs(resetposition.x - playerpos.x)<5) && (abs(resetposition.z - playerpos.z)<5)){
         this->setPosition(Vector3(resetposition.x, -50, resetposition.z));
         return true;
