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

index 0d9c7e81a657f3effacf925b33a82acfc42e3005..d4726aafb5423f3866c39a8c6e32f5bdace5957a 100644 (file)
@@ -936,7 +936,7 @@ bool Game::processAction(const String &an, Player* playerA, Player* playerB,  bo
             playerA->RPSDoneAck++; 
             playerB->RPSReceivedAck++;
             
-            if (!playerB->dead && predictionHandler->RockPaperScissorsPosition(playerA, playerB) == 1)
+            if (!playerA->dead && predictionHandler->RockPaperScissorsPosition(playerA, playerB) == 1)
             {               
                 srand((unsigned)time(0));
                 int rps = rand() % 3;
@@ -1405,8 +1405,8 @@ void Game::update()
                 sizeread += sizeof(Quaternion);
                 memcpy(&an, &recvbuffer[sizeread], sizeof(int));
                 sizeread += sizeof(int);
-                int otherPlayer;
-                memcpy(&otherPlayer, &recvbuffer[sizeread], sizeof(int));
+                int other;
+                memcpy(&other, &recvbuffer[sizeread], sizeof(int));
                
                 
                class update newUpd;
@@ -1415,7 +1415,7 @@ void Game::update()
                newUpd.orient = orient;
                 newUpd.timestamp = tp;
                 newUpd.an = an;
-                newUpd.other = otherPlayer;
+                newUpd.other = other;
 
                
                 struct timeval now;