Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 10, 2018, 3:06:55 PM (6 years ago)
Author:
merholzl
Message:

Merged Masterserver, refresh button had to be removed

Location:
code/branches/mergeFS18
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/mergeFS18

  • code/branches/mergeFS18/src/libraries/network/packet/FunctionCalls.cc

    r11071 r12027  
    6363  assert(isDataENetAllocated());
    6464 
    65   uint8_t* temp = data_+sizeof(uint32_t); //skip packetid
    66   uint32_t nrOfCalls = *(uint32_t*)temp;
     65  uint8_t* temp = data_ + sizeof(uint32_t); //skip packetid
     66  uint32_t nrOfCalls = *(uint32_t*) temp;
    6767  temp += sizeof(uint32_t);
    68   this->minGamestateID_ = *(uint32_t*)temp;
     68  this->minGamestateID_ = *(uint32_t*) temp;
    6969  temp += sizeof(uint32_t);
    70   for( unsigned int i = 0; i<nrOfCalls; i++ )
     70  for( unsigned int i = 0; i < nrOfCalls; i++ )
    7171  {
    7272    FunctionCall fctCall;
     
    9595  this->minGamestateID_ = host->getCurrentGamestateID();
    9696  assert(this->functionCalls_.size());
    97   data_=new uint8_t[ currentSize_ ];
    98   *(Type *)(data_ + _PACKETID ) = Type::FunctionCalls; // Set the Packet ID
    99   *(uint32_t*)(data_+sizeof(uint32_t)) = this->functionCalls_.size(); // set nrOfCalls
    100   *(uint32_t*)(data_+2*sizeof(uint32_t)) = this->minGamestateID_; // set minGamestateID_
    101   uint8_t* temp = data_+3*sizeof(uint32_t);
     97  this->data_ = new uint8_t[ currentSize_ ];
     98  *(Type *)(this->data_ + _PACKETID ) = Type::FunctionCalls; // Set the Packet ID
     99  *(uint32_t*)(this->data_ + sizeof(uint32_t)) = this->functionCalls_.size(); // set nrOfCalls
     100  *(uint32_t*)(this->data_ + 2 * sizeof(uint32_t)) = this->minGamestateID_; // set minGamestateID_
     101  uint8_t* temp = this->data_ + 3 * sizeof(uint32_t);
    102102 
    103103  while( this->functionCalls_.size() )
     
    107107  }
    108108 
    109   assert( temp==data_+currentSize_ );
     109  assert( temp == this->data_ + currentSize_ );
    110110 
    111111  Packet::send(host);
Note: See TracChangeset for help on using the changeset viewer.