Changeset 2464 for code/branches/presentation/src/network/packet
- Timestamp:
- Dec 15, 2008, 3:14:07 PM (16 years ago)
- File:
-
- 1 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 }
Note: See TracChangeset
for help on using the changeset viewer.