Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 8, 2009, 4:51:27 PM (16 years ago)
Author:
scheusso
Message:

merged network branch (windows,multiplayer fixes) back to trunk

Location:
code/trunk/src/network/synchronisable
Files:
2 edited

Legend:

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

    r2710 r2759  
    100100      if (this->objectMode_ != 0x0 && (Host::running() && Host::isServer()))
    101101        deletedObjects_.push(objectID);
    102 //       COUT(3) << "destruct synchronisable +++" << objectID << " | " << classID << std::endl;
    103 //       COUT(3) << " bump ---" << objectID << " | " << &objectMap_ << std::endl;
    104 //       assert(objectMap_[objectID]->objectID==objectID);
    105 //       objectMap_.erase(objectID);
    106102    }
    107103    std::map<uint32_t, Synchronisable*>::iterator it;
     
    110106      objectMap_.erase(it);
    111107
    112     //HACK HACK HACK HACK HACK HACK
    113     // this hack ensures that children of this object also get destroyed
    114 //     ObjectList<Synchronisable>::iterator it2, it3;
    115 //     // get total size of gamestate
    116 //     for(it2 = ObjectList<Synchronisable>::begin(); it2; ++it2)
    117 //     {
    118 //       if ( it2->getCreatorID() == this->objectID && it2->getCreatorID() != OBJECTID_UNKNOWN )
    119 //       {
    120 //         Synchronisable::deleteObject( it2->getObjectID() );
    121 //       }
    122 //     }
    123     //HACK HACK HACK HACK HACK HACK
    124108  }
    125109
     
    158142    if (!id)
    159143    {
     144        for(int i = 0; i<100; i++)
     145            COUT(0) << "classid: " << i << " identifier: " << ClassByID(i) << endl;
    160146        COUT(0) << "Assertion failed: id" << std::endl;
    161147        COUT(0) << "Possible reason for this error: Client received a synchronizable object whose class has no factory." << std::endl;
     
    203189   */
    204190  bool Synchronisable::deleteObject(uint32_t objectID){
    205 //     assert(getSynchronisable(objectID));
    206191    if(!getSynchronisable(objectID))
    207192      return false;
    208193    assert(getSynchronisable(objectID)->objectID==objectID);
    209 //     delete objectMap_[objectID];
    210194    Synchronisable *s = getSynchronisable(objectID);
    211195    if(s)
     
    258242    if(!doSync(id, mode))
    259243      return true;
    260     //std::cout << "inside getData" << std::endl;
    261244    uint32_t tempsize = 0;
    262245    if (this->classID==0)
     
    267250
    268251    assert(this->classID==this->getIdentifier()->getNetworkID());
    269 //     this->classID=this->getIdentifier()->getNetworkID(); // TODO: correct this
    270252    std::list<SynchronisableVariableBase*>::iterator i;
    271253    uint32_t size;
     
    305287      mode=state_;
    306288    std::list<SynchronisableVariableBase *>::iterator i;
    307     //assert(objectMode_!=0x0);
    308     //assert( (mode ^ objectMode_) != 0);
    309289    if(syncList.empty()){
    310290      assert(0);
  • code/trunk/src/network/synchronisable/Synchronisable.h

    r2710 r2759  
    142142  protected:
    143143    Synchronisable(BaseObject* creator);
    144 //     void registerVariable(void *var, int size, variableType t, uint8_t mode=0x1, NetworkCallbackBase *cb=0);
    145144    template <class T> void registerVariable(T& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=0, bool bidirectional=false);
    146145    template <class T> void unregisterVariable(T& var);
     
    205204  template <> _NetworkExport void Synchronisable::registerVariable( const Quaternion& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
    206205  template <> _NetworkExport void Synchronisable::registerVariable( Quaternion& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
    207 //   template <> _NetworkExport void Synchronisable::registerVariable( LODParticle::LOD& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
    208 //   template <> _NetworkExport void Synchronisable::registerVariable( Ogre::Light::LightTypes& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
    209206}
    210207
Note: See TracChangeset for help on using the changeset viewer.