Changeset 11907
- Timestamp:
- Apr 26, 2018, 3:21:23 PM (7 years ago)
- Location:
- code/branches/Masterserver_FS18/src/libraries/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Masterserver_FS18/src/libraries/network/packet/Gamestate.cc
r11905 r11907 207 207 } 208 208 assert((uintptr_t)(mem-data_) == GamestateHeader::getSize()+header_.getDataSize()); 209 210 // In debug mode, check first, whether there are no duplicate objectIDs211 #ifndef NDEBUG212 if(this->getID()%1000==1)213 {214 std::list<uint32_t> v1;215 for (Synchronisable* synchronisable : ObjectList<Synchronisable>())216 {217 if (synchronisable->getObjectID() == OBJECTID_UNKNOWN)218 {219 if (synchronisable->objectMode_ != 0x0)220 {221 orxout(user_error, context::packets) << "Found object with OBJECTID_UNKNOWN on the client with objectMode != 0x0!" << endl;222 orxout(user_error, context::packets) << "Possible reason for this error: Client created a synchronized object without the Server's approval." << endl;223 orxout(user_error, context::packets) << "Objects class: " << synchronisable->getIdentifier()->getName() << endl;224 //assert(false);225 }226 }227 else228 {229 for (uint32_t id : v1)230 {231 if (synchronisable->getObjectID() == id)232 {233 orxout(user_error, context::packets) << "Found duplicate objectIDs on the client!" << endl234 << "Are you sure you don't create a Sychnronisable objcect with 'new' \235 that doesn't have objectMode = 0x0?" << endl;236 }237 }238 v1.push_back(synchronisable->getObjectID());239 }240 }241 }242 #endif243 209 return true; 244 210 } -
code/branches/Masterserver_FS18/src/libraries/network/synchronisable/Synchronisable.cc
r11103 r11907 53 53 Synchronisable::Synchronisable(Context* context) 54 54 { 55 55 RegisterObject(Synchronisable); 56 56 static uint32_t idCounter=0; 57 57 objectMode_=0x1; // by default do not send data to server
Note: See TracChangeset
for help on using the changeset viewer.