Changeset 9bfc1cb in network-game for server


Ignore:
Timestamp:
Dec 27, 2013, 8:55:07 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
3ff2bd7
Parents:
f63aa57
Message:

The ATTACK message has been removed and the START_ATTACK message has been renamed to ATTACK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/server.cpp

    rf63aa57 r9bfc1cb  
    607607         break;
    608608      }
    609       case MSG_TYPE_START_ATTACK:
     609      case MSG_TYPE_ATTACK:
    610610      {
    611611         cout << "Received a START_ATTACK message" << endl;
     
    624624         map<unsigned int, Player*> players = p->currentGame->getPlayers();
    625625
    626          serverMsg.type = MSG_TYPE_START_ATTACK;
     626         serverMsg.type = MSG_TYPE_ATTACK;
    627627         memcpy(serverMsg.buffer, &id, 4);
    628628         memcpy(serverMsg.buffer+4, &targetId, 4);
     
    10571057      cout << "about to broadcast attack" << endl;
    10581058
    1059       serverMsg.type = MSG_TYPE_ATTACK;
    1060       memcpy(serverMsg.buffer, &p->id, 4);
    1061       memcpy(serverMsg.buffer+4, &p->targetPlayer, 4);
    1062       broadcastMessage(msgProcessor, serverMsg, playersInGame);
    1063 
    10641059      if (p->attackType == Player::ATTACK_MELEE)
    10651060      {
Note: See TracChangeset for help on using the changeset viewer.