Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 19, 2010, 2:27:06 PM (13 years ago)
Author:
scheusso
Message:

some () structural changes
some functional changes (GamestateClient replaced through GamestateManager on client)
reliable packets get buffered until a recent gamestate arrived and got processed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network5/src/libraries/network/packet/FunctionIDs.cc

    r6417 r7777  
    4646
    4747
    48 FunctionIDs::FunctionIDs( ) : Packet(){
     48FunctionIDs::FunctionIDs( ) : Packet()
     49{
    4950  unsigned int nrOfFunctions=0;
    5051  unsigned int packetSize=2*sizeof(uint32_t); //space for the packetID and for the nroffunctions
     
    5556  //calculate total needed size (for all strings and integers)
    5657  ObjectList<NetworkFunctionBase>::iterator it;
    57   for(it = ObjectList<NetworkFunctionBase>::begin(); it; ++it){
     58  for(it = ObjectList<NetworkFunctionBase>::begin(); it; ++it)
     59  {
    5860    const std::string& functionname = it->getName();
    5961    networkID = it->getNetworkID();
     
    7678  // now save all classids and classnames
    7779  std::pair<uint32_t, std::string> tempPair;
    78   while( !tempQueue.empty() ){
     80  while( !tempQueue.empty() )
     81  {
    7982    tempPair = tempQueue.front();
    8083    tempQueue.pop();
     
    98101}
    99102
    100 uint32_t FunctionIDs::getSize() const{
     103uint32_t FunctionIDs::getSize() const
     104{
    101105  assert(this->data_);
    102106  uint8_t *temp = data_+sizeof(uint32_t); // packet identification
     
    114118
    115119
    116 bool FunctionIDs::process(){
     120bool FunctionIDs::process(orxonox::Host* host)
     121{
    117122  int nrOfFunctions;
    118123  uint8_t *temp = data_+sizeof(uint32_t); //skip the packetid
     
    127132  temp += sizeof(uint32_t);
    128133
    129   for( int i=0; i<nrOfFunctions; i++){
     134  for( int i=0; i<nrOfFunctions; i++)
     135  {
    130136    networkID = *(uint32_t*)temp;
    131137    stringsize = *(uint32_t*)(temp+sizeof(uint32_t));
Note: See TracChangeset for help on using the changeset viewer.