Index: client/Client/main.cpp
===================================================================
--- client/Client/main.cpp	(revision 80b3f94e6c1760173cc88daf124b8e23acbebec8)
+++ client/Client/main.cpp	(revision ad5d122790401d2d049952e17ca5f88fba109348)
@@ -303,16 +303,13 @@
       }
       else if(ev.type == ALLEGRO_EVENT_MOUSE_BUTTON_UP) {
-         mapPlayers[curPlayerId].pos.x = ev.mouse.x;
-         mapPlayers[curPlayerId].pos.y = ev.mouse.y;
-
-         // send the server a MSG_TYPE_PLAYER_MOVE message
-         msgTo.type = MSG_TYPE_PLAYER_MOVE;
-
-         ostringstream oss;
-         oss << ev.mouse.x;
-         oss << ev.mouse.y;
-
-         memcpy(msgTo.buffer, oss.str().c_str(), oss.str().length());
-         sendMessage(&msgTo, sock, &server);
+         if(wndCurrent == wndMain) {
+            msgTo.type = MSG_TYPE_PLAYER_MOVE;
+
+            memcpy(msgTo.buffer, &curPlayerId, 4);
+            memcpy(msgTo.buffer+4, &ev.mouse.x, 4);
+            memcpy(msgTo.buffer+8, &ev.mouse.y, 4);
+
+            sendMessage(&msgTo, sock, &server);
+         }
       }
 
Index: common/Player.cpp
===================================================================
--- common/Player.cpp	(revision 80b3f94e6c1760173cc88daf124b8e23acbebec8)
+++ common/Player.cpp	(revision ad5d122790401d2d049952e17ca5f88fba109348)
@@ -53,6 +53,6 @@
    memcpy(buffer, &this->id, 4);
    strcpy(buffer+4, this->name.c_str());
-   memcpy(buffer+4+this->name.length(), &this->pos.x, 4);
-   memcpy(buffer+8+this->name.length(), &this->pos.y, 4);
+   memcpy(buffer+5+this->name.length(), &this->pos.x, 4);
+   memcpy(buffer+9+this->name.length(), &this->pos.y, 4);
 }
 
@@ -63,6 +63,6 @@
    memcpy(&this->id, buffer, 4);
    strcpy(test, buffer+4);
-   memcpy(&this->pos.x, buffer+4+strlen(test), 4);
-   memcpy(&this->pos.y, buffer+8+strlen(test), 4);
+   memcpy(&this->pos.x, buffer+5+strlen(test), 4);
+   memcpy(&this->pos.y, buffer+9+strlen(test), 4);
 
    cout << "id: " << this->id << endl;
