Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11907 for code


Ignore:
Timestamp:
Apr 26, 2018, 3:21:23 PM (7 years ago)
Author:
mdedial
Message:

Remove flawed sanity check creating false error messages.

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  
    207207  }
    208208  assert((uintptr_t)(mem-data_) == GamestateHeader::getSize()+header_.getDataSize());
    209  
    210    // In debug mode, check first, whether there are no duplicate objectIDs
    211 #ifndef NDEBUG
    212   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       else
    228       {
    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!" << endl
    234                                                  << "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 #endif
    243209  return true;
    244210}
  • code/branches/Masterserver_FS18/src/libraries/network/synchronisable/Synchronisable.cc

    r11103 r11907  
    5353  Synchronisable::Synchronisable(Context* context)
    5454  {
    55       RegisterObject(Synchronisable);
     55    RegisterObject(Synchronisable);
    5656    static uint32_t idCounter=0;
    5757    objectMode_=0x1; // by default do not send data to server
Note: See TracChangeset for help on using the changeset viewer.