Changeset 4926168 in network-game for client/Client/main.cpp


Ignore:
Timestamp:
May 25, 2013, 11:33:36 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
5c84d54
Parents:
e330873
Message:

The client sends a PICKUP_FLAG message when S is pressed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client/Client/main.cpp

    re330873 r4926168  
    236236               doexit = true;
    237237               break;
     238            case ALLEGRO_KEY_S:  // pickup an item next to you
     239               if (state == STATE_LOGIN) {
     240                  msgTo.type = MSG_TYPE_PICKUP_FLAG;
     241                  memcpy(msgTo.buffer, &curPlayerId, 4);
     242                  sendMessage(&msgTo, sock, &server);
     243               }
     244               break;
    238245            case ALLEGRO_KEY_D:  // drop the current item
    239246               if (state == STATE_LOGIN) {
     247                  // find the current player in the player list
    240248                  map<unsigned int, Player>::iterator it;
    241249                  Player* p = NULL;
Note: See TracChangeset for help on using the changeset viewer.