Index: code/branches/3DPacman_FS18/data/levels/3DPacman.oxw
===================================================================
--- code/branches/3DPacman_FS18/data/levels/3DPacman.oxw	(revision 11961)
+++ code/branches/3DPacman_FS18/data/levels/3DPacman.oxw	(revision 11976)
@@ -1770,46 +1770,46 @@
 
   <!-- Edge -->  
-  <BoxCollisionShape position="250,30,0" halfExtents="15,15,250" />
-  <BoxCollisionShape position="-250,30,0" halfExtents="15,15,250" />
-  <BoxCollisionShape position="0,30,250" halfExtents="250,15,15" />
-  <BoxCollisionShape position="0,30,-250" halfExtents="250,15,15" />
+  <BoxCollisionShape position="250,10,0" halfExtents="15,15,250" />
+  <BoxCollisionShape position="-250,10,0" halfExtents="15,15,250" />
+  <BoxCollisionShape position="0,10,250" halfExtents="250,15,15" />
+  <BoxCollisionShape position="0,10,-250" halfExtents="250,15,15" />
 
    <!-- Shapes in order -->    
-  <BoxCollisionShape position="-200,30,-65" halfExtents="55,15,35" />
-  <BoxCollisionShape position="-200,30,30" halfExtents="55,15,35" />
-  <BoxCollisionShape position="200,30,-65" halfExtents="55,15,35" />
-  <BoxCollisionShape position="200,30,30" halfExtents="55,15,35" />
-  <BoxCollisionShape position="-175,30,-195" halfExtents="30,15,20" /> <!-- 5 -->  
-  <BoxCollisionShape position="-80,30,-195" halfExtents="40,15,20" />
-  <BoxCollisionShape position="-175,30,-140" halfExtents="30,15,10" />
-  <BoxCollisionShape position="0,30,-210" halfExtents="10,15,30" />
-  <BoxCollisionShape position="80,30,-195" halfExtents="40,15,20" />
-  <BoxCollisionShape position="175,30,-195" halfExtents="30,15,20" /> <!-- 10 -->
-  <BoxCollisionShape position="175,30,-140" halfExtents="30,15,10" />
-  <BoxCollisionShape position="0,30,-140" halfExtents="60,15,10" />
-  <BoxCollisionShape position="0,30,-110" halfExtents="10,15,25" />
-  <BoxCollisionShape position="-100,30,-90" halfExtents="10,15,60" />
-  <BoxCollisionShape position="-70,30,-90" halfExtents="25,15,10" /> <!-- 15 -->
-  <BoxCollisionShape position="100,30,-90" halfExtents="10,15,60" />
-  <BoxCollisionShape position="70,30,-90" halfExtents="25,15,10" />
-  <BoxCollisionShape position="0,30,-20" halfExtents="60,15,35" />
-  <BoxCollisionShape position="-100,30,30" halfExtents="10,15,35" />
-  <BoxCollisionShape position="0,30,50" halfExtents="60,15,10" /> <!-- 20 -->
-  <BoxCollisionShape position="0,30,80" halfExtents="10,15,25" />
-  <BoxCollisionShape position="100,30,30" halfExtents="10,15,35" />
-  <BoxCollisionShape position="-175,30,100" halfExtents="30,15,10" />
-  <BoxCollisionShape position="-155,30,130" halfExtents="10,15,25" />
-  <BoxCollisionShape position="-75,30,100" halfExtents="35,15,10" /> <!-- 25 -->
-  <BoxCollisionShape position="75,30,100" halfExtents="35,15,10" />
-  <BoxCollisionShape position="175,30,100" halfExtents="30,15,10" />
-  <BoxCollisionShape position="155,30,130" halfExtents="10,15,25" />
-  <BoxCollisionShape position="-220,30,150" halfExtents="20,15,10" />
-  <BoxCollisionShape position="-220,30,150" halfExtents="20,15,10" /> <!-- 30 -->
-  <BoxCollisionShape position="0,30,150" halfExtents="60,15,10" />
-  <BoxCollisionShape position="0,30,180" halfExtents="10,15,25" />
-  <BoxCollisionShape position="-100,30,170" halfExtents="10,15,25" />
-  <BoxCollisionShape position="-125,30,200" halfExtents="80,15,10" />
-  <BoxCollisionShape position="100,30,170" halfExtents="10,15,25" /> <!-- 35 -->
-  <BoxCollisionShape position="125,30,200" halfExtents="80,15,10" />
+  <BoxCollisionShape position="-200,10,-65" halfExtents="55,30,35" />
+  <BoxCollisionShape position="-200,10,30" halfExtents="55,30,35" />
+  <BoxCollisionShape position="200,10,-65" halfExtents="55,30,35" />
+  <BoxCollisionShape position="200,10,30" halfExtents="55,30,35" />
+  <BoxCollisionShape position="-175,10,-195" halfExtents="30,30,20" /> <!-- 5 -->  
+  <BoxCollisionShape position="-80,10,-195" halfExtents="40,30,20" />
+  <BoxCollisionShape position="-175,10,-140" halfExtents="30,30,10" />
+  <BoxCollisionShape position="0,10,-210" halfExtents="10,30,30" />
+  <BoxCollisionShape position="80,10,-195" halfExtents="40,30,20" />
+  <BoxCollisionShape position="175,10,-195" halfExtents="30,30,20" /> <!-- 10 -->
+  <BoxCollisionShape position="175,10,-140" halfExtents="30,30,10" />
+  <BoxCollisionShape position="0,10,-140" halfExtents="60,30,10" />
+  <BoxCollisionShape position="0,10,-110" halfExtents="10,30,25" />
+  <BoxCollisionShape position="-100,10,-90" halfExtents="10,30,60" />
+  <BoxCollisionShape position="-70,10,-90" halfExtents="25,30,10" /> <!-- 15 -->
+  <BoxCollisionShape position="100,10,-90" halfExtents="10,30,60" />
+  <BoxCollisionShape position="70,10,-90" halfExtents="25,30,10" />
+  <BoxCollisionShape position="0,10,-20" halfExtents="60,30,35" />
+  <BoxCollisionShape position="-100,10,30" halfExtents="10,30,35" />
+  <BoxCollisionShape position="0,10,50" halfExtents="60,30,10" /> <!-- 20 -->
+  <BoxCollisionShape position="0,10,80" halfExtents="10,30,25" />
+  <BoxCollisionShape position="100,10,30" halfExtents="10,30,35" />
+  <BoxCollisionShape position="-175,10,100" halfExtents="30,30,10" />
+  <BoxCollisionShape position="-155,10,130" halfExtents="10,30,25" />
+  <BoxCollisionShape position="-75,10,100" halfExtents="35,30,10" /> <!-- 25 -->
+  <BoxCollisionShape position="75,10,100" halfExtents="35,30,10" />
+  <BoxCollisionShape position="175,10,100" halfExtents="30,30,10" />
+  <BoxCollisionShape position="155,10,130" halfExtents="10,30,25" />
+  <BoxCollisionShape position="-220,10,150" halfExtents="20,30,10" />
+  <BoxCollisionShape position="-220,10,150" halfExtents="20,30,10" /> <!-- 30 -->
+  <BoxCollisionShape position="0,10,150" halfExtents="60,30,10" />
+  <BoxCollisionShape position="0,10,180" halfExtents="10,30,25" />
+  <BoxCollisionShape position="-100,10,170" halfExtents="10,30,25" />
+  <BoxCollisionShape position="-125,10,200" halfExtents="80,30,10" />
+  <BoxCollisionShape position="100,10,170" halfExtents="10,30,25" /> <!-- 35 -->
+  <BoxCollisionShape position="125,10,200" halfExtents="80,30,10" />
 
 
Index: code/branches/3DPacman_FS18/data/overlays/PacmanHUD.oxo
===================================================================
--- code/branches/3DPacman_FS18/data/overlays/PacmanHUD.oxo	(revision 11961)
+++ code/branches/3DPacman_FS18/data/overlays/PacmanHUD.oxo	(revision 11976)
@@ -25,4 +25,14 @@
 
     <PacmanHUDinfo
+     position  = "1.4, 2.5"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "right"
+
+    />
+
+    <PacmanHUDinfo
      position  = "0.4, 0.1"
      pickpoint = "0.0, 0.0"
@@ -32,5 +42,5 @@
      align     = "right"
 
-     showghoststatus     = true
+     showghoststatus   = true
     />
 
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;
