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

index 83a663ffadcd799249e7ea8bb4b712ee0757a294..87680e30a593468b737f2a4bdbb823630f48a046 100644 (file)
@@ -1140,8 +1140,8 @@ void Game::sendUpdate()
         memcpy(&sendbuffer[size],(void*)&tp, sizeof(struct timeval));
         size += sizeof(struct timeval);
         pthread_mutex_lock(&po_mutex);
-        int x = position.x;
-        int y = position.y;
+        float x = position.x;
+        float z = position.z;
         memcpy(&sendbuffer[size],(void*)&x, sizeof(int));
         size += sizeof(int);
         memcpy(&sendbuffer[size],(void*)&y, sizeof(int));
@@ -1206,7 +1206,7 @@ void Game::update()
 
             memcpy(&tp,&recvbuffer[sizeread], sizeof(struct timeval));
             sizeread += sizeof(struct timeval);  
-            int x,z;
+            float x,z;
             memcpy(&x,&recvbuffer[sizeread], sizeof(int));
             sizeread += sizeof(int);
             memcpy(&z,&recvbuffer[sizeread], sizeof(int));