Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 20, 2009, 4:27:38 PM (15 years ago)
Author:
scheusso
Message:

merged netp4 back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/network/synchronisable/Synchronisable.cc

    r3088 r3198  
    9898    // delete callback function objects
    9999    if(!Identifier::isCreatingHierarchy()){
     100      // remove object from the static objectMap
     101      if (this->objectMode_ != 0x0 && (Host::running() && Host::isServer()))
     102        deletedObjects_.push(objectID);
     103      // delete all Synchronisable Variables from syncList ( which are also in stringList )
    100104      for(std::vector<SynchronisableVariableBase*>::iterator it = syncList.begin(); it!=syncList.end(); it++)
    101105        delete (*it);
    102       if (this->objectMode_ != 0x0 && (Host::running() && Host::isServer()))
    103         deletedObjects_.push(objectID);
     106      syncList.clear();
     107      stringList.clear();
    104108    }
    105109    std::map<uint32_t, Synchronisable*>::iterator it;
     
    174178    COUT(4) << "fabricate objectID: " << no->objectID << " classID: " << no->classID << std::endl;
    175179          // update data and create object/entity...
     180    assert( Synchronisable::objectMap_.find(header.getObjectID()) == Synchronisable::objectMap_.end() );
     181    Synchronisable::objectMap_[header.getObjectID()] = no;
    176182    bool b = no->updateData(mem, mode, true);
    177183    assert(b);
     
    213219      return it1->second;
    214220
    215     ObjectList<Synchronisable>::iterator it;
    216     for(it = ObjectList<Synchronisable>::begin(); it; ++it){
    217       if( it->getObjectID()==objectID ){
    218         objectMap_[objectID] = *it;
    219         return *it;
    220       }
    221     }
     221//     ObjectList<Synchronisable>::iterator it;
     222//     for(it = ObjectList<Synchronisable>::begin(); it; ++it){
     223//       if( it->getObjectID()==objectID ){
     224//         objectMap_[objectID] = *it;
     225//         return *it;
     226//       }
     227//     }
     228    // if the objects not in the map it should'nt exist at all anymore
    222229    return NULL;
    223230  }
Note: See TracChangeset for help on using the changeset viewer.