Changeset 8a4ed74 in network-game
- Timestamp:
- May 26, 2013, 10:34:28 PM (12 years ago)
- Branches:
- master
- Children:
- 8dad966
- Parents:
- 4b4b153
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/server.cpp
r4b4b153 r8a4ed74 325 325 broadcastResponse = processMessage(clientMsg, from, mapPlayers, gameMap, unusedId, serverMsg, sock, scoreBlue, scoreRed); 326 326 327 // probably replace this with a function that prints based on the328 // message type329 cout << "msg: " << serverMsg.buffer << endl;330 327 if (broadcastResponse) 331 328 { … … 684 681 cout << "Received a START_ATTACK message" << endl; 685 682 683 int id, targetId; 684 685 memcpy(&id, clientMsg.buffer, 4); 686 memcpy(&targetId, clientMsg.buffer+4, 4); 687 686 688 serverMsg.type = MSG_TYPE_START_ATTACK; 687 689 broadcastResponse = true; 690 691 break; 688 692 } 689 693 case MSG_TYPE_ATTACK: 690 694 { 691 695 cout << "Received am ATTACK message" << endl; 696 697 int id, targetId; 698 699 memcpy(&id, clientMsg.buffer, 4); 700 memcpy(&targetId, clientMsg.buffer+4, 4); 692 701 693 702 serverMsg.type = MSG_TYPE_ATTACK; 694 703 broadcastResponse = true; 704 705 break; 695 706 } 696 707 default:
Note:
See TracChangeset
for help on using the changeset viewer.