Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 14, 2008, 9:39:57 PM (17 years ago)
Author:
rgrieder
Message:
  • replaced all String2Number with ConvertValue
  • replaced all tokenize with SubString
  • dealt with warnings under msvc
  • removed some warnings by placing casts
  • bugfix in audio: local variable pushed into member variable std::vector
  • updated StableHeaders.h
Location:
code/trunk/src/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/network/ConnectionManager.cc

    r1056 r1064  
    114114
    115115  bool ConnectionManager::addPacket(ENetPacket *packet, ENetPeer *peer) {
    116     if(enet_peer_send(peer, head_->findClient(&(peer->address))->getID() , packet)!=0)
     116    if(enet_peer_send(peer, (enet_uint8)head_->findClient(&(peer->address))->getID() , packet)!=0)
    117117      return false;
    118118    return true;
     
    120120
    121121  bool ConnectionManager::addPacket(ENetPacket *packet, int clientID) {
    122     if(enet_peer_send(head_->findClient(clientID)->getPeer(), clientID, packet)!=0)
     122    if(enet_peer_send(head_->findClient(clientID)->getPeer(), (enet_uint8)clientID, packet)!=0)
    123123      return false;
    124124    return true;
     
    127127  bool ConnectionManager::addPacketAll(ENetPacket *packet) {
    128128    for(ClientInformation *i=head_->next(); i!=0; i=i->next()){
    129       if(enet_peer_send(i->getPeer(), i->getID(), packet)!=0)
     129      if(enet_peer_send(i->getPeer(), (enet_uint8)i->getID(), packet)!=0)
    130130        return false;
    131131    }
  • code/trunk/src/network/GameStateManager.cc

    r1062 r1064  
    133133      // run Synchronisable::getData with offset and additional place for 3 ints in between (for ids and length)
    134134      sync=it->getData((retval->data)+offset+3*sizeof(int));
    135       *(retval->data+offset)=sync.length;
    136       *(retval->data+offset+sizeof(int))=sync.objectID;
    137       *(retval->data+offset+2*sizeof(int))=sync.classID;
     135      *(retval->data+offset)=(unsigned char)sync.length;
     136      *(retval->data+offset+sizeof(int))=(unsigned char)sync.objectID;
     137      *(retval->data+offset+2*sizeof(int))=(unsigned char)sync.classID;
    138138      // increase data pointer
    139139      offset+=tempsize+3*sizeof(int);
  • code/trunk/src/network/PacketDecoder.cc

    r1062 r1064  
    153153    }
    154154    //since it's not alowed to use void* for pointer arithmetic
     155    //FIXME: variable never used
    155156    unsigned char* data = (unsigned char *)(packet->data);
    156157    //copy the GameStateCompressed id into the struct, which is located at second place data+sizeof( int )
Note: See TracChangeset for help on using the changeset viewer.