]> git.uio.no Git - private-olgabo.git/commitdiff
sc
authorolgabo <olgabo@ifi.uio.no>
Fri, 26 Oct 2012 22:27:24 +0000 (00:27 +0200)
committerolgabo <olgabo@ifi.uio.no>
Fri, 26 Oct 2012 22:27:24 +0000 (00:27 +0200)
projects/dumbclient/Game.cpp

index 89399dc7191b348a286b38807d27ba4eb4d4348f..775ef30fd7345540a7b9f75d05f7d8f2ca8872d6 100644 (file)
@@ -821,8 +821,8 @@ bool Game::processUnbufferedInput(const FrameEvent& evt)
         if (collision(localPlayer->playerNode->_getDerivedPosition()))
            localPlayer->playerNode->setPosition(posBefore);
     }
-    else
-        cout << "cant walk\n";
+   /* else
+        cout << "cant walk\n";*/
   
     mRotate = 0;
     return true;
@@ -944,7 +944,6 @@ bool Game::processAction(const String &an, Player* playerA, Player* playerB,  bo
             {               
                 srand((unsigned)time(0));
                 int rps = rand() % 3;
-                cout << rps << endl << "\n\n\n"; 
                 switch (rps)
                 {
                     case 0:
@@ -1002,7 +1001,6 @@ bool Game::processAction(const String &an, Player* playerA, Player* playerB,  bo
                 {
                     srand((unsigned)time(0));
                     int rps = rand() % 3;
-                    cout << rps << endl << "\n\n\n"; 
                     switch (rps)
                     {
                         case 0:
@@ -1205,8 +1203,6 @@ bool Game::processAction(const String &an, Player* playerA, Player* playerB,  bo
                             current->WavesReceivedAck++;
                             updateActionInfo(an, current->id);
                         }
-                        else
-                            cout << "cant wave\n\n\n\n";
                         return true;    
                     }
                 }
@@ -1596,8 +1592,6 @@ void Game::createPlayer(int id)
         Player *last;
         for (last = localPlayer; last->next != NULL; last = last->next)
 
-        if (last == localPlayer)
-            cout << "appending to local player\n";
         p = new Player(id, playerNode, playerEnt, playerCam);
         last->next = p;
 
@@ -1690,12 +1684,12 @@ void Game::setPlayerStateUpdate()
         switch (newUpdate.an)
         {
             case 1:
-               // cout << "idle\n";
+                cout << "idle\n";
                 processActionByPlayerID("idle", newUpdate.id, -1, false);
                 break;
 
             case 2:
-               // cout << "walk\n";
+                cout << "walk\n";
                 processActionByPlayerID("walk", newUpdate.id, -1, false);
                 break;
 
@@ -2090,8 +2084,6 @@ void Game::exit()
        
     file.close();
 
-    cout << localPlayer->HandshakesDone << " handshakes done\n";
-    cout << localPlayer->HandshakesDoneAck << " handshakes ack\n";
     int res = client->sendMessage("e",1);
     mShutDown = true;
 //    exit(0);