Changeset 324 for code/branches/network/src/network/GameStateManager.cc
- Timestamp:
- Nov 28, 2007, 4:07:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/GameStateManager.cc
r314 r324 90 90 if(it->objectID!=sync.objectID){ 91 91 // bad luck ;) 92 // delete the synchronisable (obviously seems to be deleted on the server) 93 while(it=!0 && it->objectID!=sync.objectID){ 94 it=removeObject(it); 95 } 96 if(it==0){ // add the new object 97 98 } 92 99 } else { 93 100 // we have our object 94 101 if(! it->updateData(sync)) 95 std::cout << "We couldn't update objectID: " << sync.objectID << "; classID: " << sync.classID << std::endl; 102 std::cout << "We couldn't update objectID: " \ 103 << sync.objectID << "; classID: " << sync.classID << std::endl; 96 104 } 105 97 106 } 107 98 108 99 109 } 100 110 101 111 /** 112 * This function removes a Synchronisable out of the universe 113 * @param it iterator of the list pointing to the object 114 * @return iterator pointing to the next object in the list 115 */ 116 Iterator<Synchronisable> removeObject(Iterator<Synchronisable> it){ 117 Iterator<Synchronisable> temp=it; 118 it++; 119 delete temp; 120 return it; 121 } 102 122 103 123
Note: See TracChangeset
for help on using the changeset viewer.