- Timestamp:
- Oct 10, 2018, 3:06:55 PM (6 years ago)
- Location:
- code/branches/mergeFS18
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/mergeFS18
- Property svn:mergeinfo changed
/code/branches/Masterserver_FS18 (added) merged: 11816,11829,11842,11856,11858,11880,11889,11905,11907,11910,11929-11930,11937,11962-11963,11973,11983,11990
- Property svn:mergeinfo changed
-
code/branches/mergeFS18/src/libraries/network/packet/FunctionCalls.cc
r11071 r12027 63 63 assert(isDataENetAllocated()); 64 64 65 uint8_t* temp = data_ +sizeof(uint32_t); //skip packetid66 uint32_t nrOfCalls = *(uint32_t*) temp;65 uint8_t* temp = data_ + sizeof(uint32_t); //skip packetid 66 uint32_t nrOfCalls = *(uint32_t*) temp; 67 67 temp += sizeof(uint32_t); 68 this->minGamestateID_ = *(uint32_t*) temp;68 this->minGamestateID_ = *(uint32_t*) temp; 69 69 temp += sizeof(uint32_t); 70 for( unsigned int i = 0; i <nrOfCalls; i++ )70 for( unsigned int i = 0; i < nrOfCalls; i++ ) 71 71 { 72 72 FunctionCall fctCall; … … 95 95 this->minGamestateID_ = host->getCurrentGamestateID(); 96 96 assert(this->functionCalls_.size()); 97 data_=new uint8_t[ currentSize_ ];98 *(Type *)( data_ + _PACKETID ) = Type::FunctionCalls; // Set the Packet ID99 *(uint32_t*)( data_+sizeof(uint32_t)) = this->functionCalls_.size(); // set nrOfCalls100 *(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); 102 102 103 103 while( this->functionCalls_.size() ) … … 107 107 } 108 108 109 assert( temp ==data_+currentSize_ );109 assert( temp == this->data_ + currentSize_ ); 110 110 111 111 Packet::send(host);
Note: See TracChangeset
for help on using the changeset viewer.