- Timestamp:
- Dec 19, 2010, 2:27:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network5/src/libraries/network/packet/FunctionCalls.cc
r7759 r7777 58 58 59 59 60 bool FunctionCalls::process(){ 60 bool FunctionCalls::process(orxonox::Host* host) 61 { 61 62 assert(isDataENetAllocated()); 62 63 … … 70 71 FunctionCall fctCall; 71 72 fctCall.loadData(temp); 72 if( this->minGamestateID_ > GamestateHandler::getInstance()->getLastProcessedGamestateID(this->getClientID()) || !fctCall.execute() )73 if( this->minGamestateID_ > host->getLastProcessedGamestateID(this->getPeerID()) || !fctCall.execute() ) 73 74 { 74 FunctionCallManager::bufferIncomingFunctionCall( fctCall, minGamestateID_, this->get ClientID() );75 FunctionCallManager::bufferIncomingFunctionCall( fctCall, minGamestateID_, this->getPeerID() ); 75 76 } 76 77 } … … 80 81 } 81 82 82 void FunctionCalls::addCallStatic( uint32_t networkID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5){ 83 void FunctionCalls::addCallStatic( uint32_t networkID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5) 84 { 83 85 assert(!isDataENetAllocated()); 84 86 … … 88 90 } 89 91 90 void FunctionCalls::addCallMember( uint32_t networkID, uint32_t objectID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5){ 92 void FunctionCalls::addCallMember( uint32_t networkID, uint32_t objectID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5) 93 { 91 94 assert(!isDataENetAllocated()); 92 95 … … 96 99 } 97 100 98 bool FunctionCalls::send( )101 bool FunctionCalls::send(orxonox::Host* host) 99 102 { 100 this->minGamestateID_ = GamestateHandler::getInstance()->getCurrentGamestateID();103 this->minGamestateID_ = host->getCurrentGamestateID(); 101 104 assert(this->functionCalls_.size()); 102 105 data_=new uint8_t[ currentSize_ ]; … … 114 117 assert( temp==data_+currentSize_ ); 115 118 116 Packet::send( );119 Packet::send(host); 117 120 return true; 118 121 }
Note: See TracChangeset
for help on using the changeset viewer.