Changeset 1747 for code/trunk/src/network/packet
- Timestamp:
- Sep 9, 2008, 4:25:52 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core3 (added) merged: 1573-1574,1583-1586,1591-1594,1596-1597,1603,1606-1607,1610-1611,1655,1658,1676-1679,1681-1685,1687,1716-1723,1725-1729,1736
- Property svn:mergeinfo changed
-
code/trunk/src/network/packet/Gamestate.cc
r1740 r1747 30 30 #include "network/ClientInformation.h" 31 31 #include "network/GamestateHandler.h" 32 #include "core/Iterator.h" 32 33 33 34 #include <zlib.h> … … 79 80 unsigned char *mem=data_; 80 81 mem+=sizeof(GamestateHeader); 81 orxonox:: Iterator<Synchronisable>it;82 for(it = orxonox::ObjectList<Synchronisable>:: start(); it; ++it){82 orxonox::ObjectList<Synchronisable>::iterator it; 83 for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it){ 83 84 tempsize=it->getSize2(mode); 84 85 … … 86 87 // start allocate additional memory 87 88 COUT(3) << "G.St.Man: need additional memory" << std::endl; 88 orxonox:: Iterator<Synchronisable>temp = it;89 orxonox::ObjectList<Synchronisable>::iterator temp = it; 89 90 int addsize=tempsize; 90 91 while(++temp) … … 124 125 unsigned char *mem=data_+sizeof(GamestateHeader); 125 126 // get the start of the Synchronisable list 126 orxonox:: Iterator<Synchronisable> it=orxonox::ObjectList<Synchronisable>::start();127 orxonox::ObjectList<Synchronisable>::iterator it=orxonox::ObjectList<Synchronisable>::begin(); 127 128 128 129 while(mem < data_+sizeof(GamestateHeader)+HEADER->normsize){ … … 318 319 int size=0; 319 320 // get the start of the Synchronisable list 320 orxonox:: Iterator<Synchronisable>it;321 orxonox::ObjectList<Synchronisable>::iterator it; 321 322 // get total size of gamestate 322 for(it = orxonox::ObjectList<Synchronisable>:: start(); it; ++it)323 for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it) 323 324 size+=it->getSize2(mode); // size of the actual data of the synchronisable 324 325 // size+=sizeof(GamestateHeader); … … 331 332 * @return iterator pointing to the next object in the list 332 333 */ 333 void Gamestate::removeObject(orxonox:: Iterator<Synchronisable>&it) {334 orxonox:: Iterator<Synchronisable>temp=it;334 void Gamestate::removeObject(orxonox::ObjectList<Synchronisable>::iterator &it) { 335 orxonox::ObjectList<Synchronisable>::iterator temp=it; 335 336 ++it; 336 337 delete *temp; -
code/trunk/src/network/packet/Gamestate.h
r1735 r1747 38 38 39 39 namespace packet { 40 40 41 41 struct GamestateHeader{ 42 42 ENUM::Type packetType; … … 51 51 52 52 /** 53 @author 53 @author 54 54 */ 55 55 class Gamestate: public Packet{ … … 57 57 Gamestate(); 58 58 Gamestate(unsigned char *data, int clientID); 59 59 60 60 ~Gamestate(); 61 61 62 62 bool collectData(int id, int mode=0x0); 63 63 bool spreadData(int mode=0x0); … … 69 69 bool compressData(); 70 70 bool decompressData(); 71 71 72 72 // Packet functions 73 73 virtual unsigned int getSize() const; 74 74 virtual bool process(); 75 75 76 76 77 77 private: 78 78 unsigned int calcGamestateSize(int mode=0x0); 79 void removeObject(orxonox:: Iterator<Synchronisable> &it);79 void removeObject(orxonox::ObjectListIterator<Synchronisable> &it); 80 80 81 81 82 82 //Bytestream *bs_; 83 83 //GamestateHeader *header_;
Note: See TracChangeset
for help on using the changeset viewer.