Changeset 2464 for code/branches/presentation
- Timestamp:
- Dec 15, 2008, 3:14:07 PM (16 years ago)
- Location:
- code/branches/presentation/src/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/network/packet/Gamestate.cc
r2459 r2464 163 163 } 164 164 165 // In debug mode, check first, whether there are no duplicate objectIDs 166 #ifndef NDEBUG 167 ObjectList<Synchronisable>::iterator it; 168 for (it = ObjectList<Synchronisable>::begin(); it != ObjectList<Synchronisable>::end(); ++it) { 169 if (it->getObjectID() == OBJECTID_UNKNOWN) { 170 if (it->objectMode_ != 0x0) { 171 COUT(0) << "Found object with OBJECTID_UNKNOWN on the client with objectMode != 0x0!" << std::endl; 172 assert(false); 173 } 174 } 175 else { 176 ObjectList<Synchronisable>::iterator it2; 177 for (it2 = ObjectList<Synchronisable>::begin(); it2 != ObjectList<Synchronisable>::end(); ++it2) { 178 if (it->getObjectID() == it2->getObjectID() && *it != *it2) { 179 COUT(0) << "Found duplicate objectIDs on the client!" << std::endl 180 << "Are you sure you don't create a Sychnronisable objcect with 'new' \ 181 that doesn't have objectMode = 0x0?" << std::endl; 182 assert(false); 183 } 184 } 185 } 186 } 187 #endif 188 165 189 return true; 166 190 } -
code/branches/presentation/src/network/synchronisable/Synchronisable.cc
r2459 r2464 80 80 this->setPriority( priority::normal ); 81 81 82 83 82 // get creator id 84 #ifndef NDEBUG85 ObjectList<Synchronisable>::iterator it;86 for(it = ObjectList<Synchronisable>::begin(); it!=ObjectList<Synchronisable>::end(); ++it){87 if( it->getObjectID()==this->objectID )88 assert(*it==this || (it->objectID==OBJECTID_UNKNOWN && it->objectMode_==0x0));89 }90 #endif91 92 83 this->creatorID = OBJECTID_UNKNOWN; 93 84
Note: See TracChangeset
for help on using the changeset viewer.