Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 18, 2007, 5:51:47 PM (18 years ago)
Author:
scheusso
Message:

gamestatehandling, error correction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/ConnectionManager.cc

    r514 r620  
    200200          break;
    201201        case ENET_EVENT_TYPE_DISCONNECT:
     202          std::cout << "disconnecting client" << std::endl;
    202203          delete head_->findClient(&(event.peer->address));
    203204          temp = temp->next();
     
    227228  bool ConnectionManager::addClient(ENetEvent *event){
    228229    ClientInformation *temp = head_->insertBack(new ClientInformation);
    229     temp->setID(temp->prev()->getID()+1);
     230    if(temp->prev()->head)
     231      temp->setID(1);
     232    else
     233      temp->setID(temp->prev()->getID()+1);
    230234    temp->setPeer(event->peer);
    231235    std::cout << "added client id: " << temp->prev()->getID() << std::endl;
Note: See TracChangeset for help on using the changeset viewer.