Changes in / [67d032c:60940f8] in network-game
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
client/Client/main.cpp
r67d032c r60940f8 165 165 166 166 WorldMap* gameMap = WorldMap::loadMapFromFile("../../data/map.txt"); 167 //delete gameMap; 168 //gameMap = WorldMap::createDefaultMap(); 167 169 168 170 wndLogin = new Window(0, 0, SCREEN_W, SCREEN_H); … … 243 245 { 244 246 ALLEGRO_EVENT ev; 245 246 247 al_wait_for_event(event_queue, &ev); 247 248 … … 336 337 337 338 if (receiveMessage(&msgFrom, sock, &from) >= 0) 339 { 338 340 processMessage(msgFrom, state, chatConsole, mapPlayers, curPlayerId); 341 cout << "state: " << state << endl; 342 } 339 343 340 344 if (redraw && al_is_event_queue_empty(event_queue)) … … 449 453 { 450 454 string response = string(msg.buffer); 455 456 cout << "Got message: " << msg.type << endl; 451 457 452 458 switch(state) … … 525 531 mapPlayers[p.id] = p; 526 532 533 cout << "p.id: " << p.id << endl; 534 527 535 break; 528 536 } -
common/Player.cpp
r67d032c r60940f8 71 71 memcpy(&this->target.y, buffer+16, 4); 72 72 this->name.assign(buffer+20); 73 74 cout << "id: " << this->id << endl; 75 cout << "pos x: " << this->pos.x << endl; 76 cout << "pos y: " << this->pos.y << endl; 77 cout << "target x: " << this->target.x << endl; 78 cout << "target y: " << this->target.y << endl; 79 cout << "name: " << this->name << endl; 73 80 } 74 81
Note:
See TracChangeset
for help on using the changeset viewer.