[Orxonox-commit 7332] r11949 - in code/branches/3DPacman_FS18: data/levels src/modules/pacman

dreherm at orxonox.net dreherm at orxonox.net
Sat May 5 00:26:38 CEST 2018


Author: dreherm
Date: 2018-05-05 00:26:38 +0200 (Sat, 05 May 2018)
New Revision: 11949

Modified:
   code/branches/3DPacman_FS18/data/levels/3DPacman.oxw
   code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc
Log:
Afraid Test 11

Modified: code/branches/3DPacman_FS18/data/levels/3DPacman.oxw
===================================================================
--- code/branches/3DPacman_FS18/data/levels/3DPacman.oxw	2018-05-04 22:16:26 UTC (rev 11948)
+++ code/branches/3DPacman_FS18/data/levels/3DPacman.oxw	2018-05-04 22:26:38 UTC (rev 11949)
@@ -104,6 +104,8 @@
     </attached>
 </PacmanPointSphere>
 
+
+<!-- AfraidPoints -->
 <PacmanPointAfraid position="215,10,195">
     <attached>
         <Model position="0,0,0" mesh="PacmanPointAfraid.mesh" scale="5" />
@@ -110,6 +112,7 @@
     </attached>
 </PacmanPointAfraid>
 
+
 <!-- Map -->
 <StaticEntity position="0,0,25" direction="0,0,0" collisionType=static mass=100000 friction=0.01 >
     <attached> 

Modified: code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc	2018-05-04 22:16:26 UTC (rev 11948)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc	2018-05-04 22:26:38 UTC (rev 11949)
@@ -125,6 +125,9 @@
             }
         }
 
+        
+        while(lock){};
+        lock = true;
         //Check on which position ghost has arrived and set new target
          else{
             if(findpos(actuelposition,possibleposition[0])){
@@ -332,8 +335,9 @@
             else{
                 this->resetGhost(); //Shouldn't happen...
             } //End of Position table
+
             }
-
+            look = false;
     }
 
     void PacmanGhost::setnewTarget(int firstdec){
@@ -417,6 +421,10 @@
 	}
 
     void PacmanGhost::changewith(PacmanGhost* otherghost){
+
+        while(lock){};
+        lock = true;
+
         otherghost->setPosition(this->getPosition());
         this->setPosition(0,-20,0);
         otherghost->target_x = this->target_x;   //Probleme bei parallelen Porzessen
@@ -425,6 +433,8 @@
 
         this->dontmove = true;
         otherghost->dontmove = false;
+
+        lock = false;
     }
 
 



More information about the Orxonox-commit mailing list