Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 10, 2018, 3:06:55 PM (6 years ago)
Author:
merholzl
Message:

Merged Masterserver, refresh button had to be removed

Location:
code/branches/mergeFS18
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/mergeFS18

  • code/branches/mergeFS18/src/libraries/network/synchronisable/Synchronisable.cc

    r11103 r12027  
    4343  std::queue<uint32_t> Synchronisable::deletedObjects_;
    4444
    45   uint8_t Synchronisable::state_=0x1; // detemines wheter we are server (default) or client
     45  uint8_t Synchronisable::state_=0x1; // determines wheter we are server (default) or client
    4646
    4747  RegisterAbstractClass(Synchronisable).inheritsFrom<OrxonoxInterface>();
     
    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
     
    179179    assert( Synchronisable::objectMap_.find(header.getObjectID()) == Synchronisable::objectMap_.end() );
    180180    no->setObjectID(header.getObjectID());
    181     //no->contextID=header.getContextID(); //TODO: remove this
    182181    no->setClassID(header.getClassID());
    183182    assert(no->contextID_ == header.getContextID());
    184     //assert(no->classID_ == header.getClassID());
    185183    orxout(verbose, context::network) << "fabricate objectID_: " << no->objectID_ << " classID_: " << no->classID_ << endl;
    186184          // update data and create object/entity...
     
    189187    if (b)
    190188    {
    191 //        b = no->create();
    192189        assert(b);
    193190    }
     
    273270
    274271    orxout(verbose_more, context::network) << "getting data from objectID_: " << objectID_ << ", classID_: " << classID_ << endl;
    275 //     orxout(verbose, context::network) << "objectid: " << this->objectID_ << ":";
    276272    // copy to location
    277273    for(SynchronisableVariableBase* variable : syncList_)
    278274    {
    279275      uint32_t varsize = variable->getData( mem, mode );
    280 //       orxout(verbose, context::network) << " " << varsize;
    281276      tempsize += varsize;
    282277      sizes.push_back(varsize);
    283278      ++test;
    284       //tempsize += (*i)->getSize( mode );
    285279    }
    286280    assert(tempsize!=0);  // if this happens an empty object (with no variables) would be transmitted
    287 //     orxout(verbose, context::network) << endl;
    288281
    289282    header.setObjectID( this->objectID_ );
     
    340333    }
    341334
    342     //orxout(verbose_more, context::network) << "Synchronisable: objectID_ " << syncHeader.getObjectID() << ", classID_ " << syncHeader.getClassID() << " size: " << syncHeader.getDataSize() << " synchronising data" << endl;
    343335    if( !syncHeaderLight.isDiffed() )
    344336    {
     
    357349    {
    358350      mem += SynchronisableHeaderLight::getSize();
    359 //       orxout(debug_output, context::network) << "objectID: " << this->objectID_ << endl;
    360351      while( mem < data+syncHeaderLight.getDataSize()+SynchronisableHeaderLight::getSize() )
    361352      {
    362353        VariableID varID = *(VariableID*)mem;
    363 //         orxout(debug_output, context::network) << "varID: " << varID << endl;
    364354        assert( varID < syncList_.size() );
    365355        mem += sizeof(VariableID);
     
    400390  bool Synchronisable::doSync(/*int32_t id,*/ uint8_t mode)
    401391  {
    402 //     if(mode==0x0)
    403 //       mode=state_;
    404392    assert(mode!=0x0);
    405393    return ( (this->objectMode_ & mode)!=0 && (!syncList_.empty() ) );
  • code/branches/mergeFS18/src/libraries/network/synchronisable/Synchronisable.h

    r11071 r12027  
    134134        { memcpy(data_, h.data_, getSize()); }
    135135  };
    136  
    137 //   inline void operator=(SynchronisableHeaderLight& h1, SynchronisableHeader& h2)
    138 //   {
    139 //     memcpy(h1.data_, h2.data_, h1.getSize());
    140 //   }
    141136
    142137  /**
Note: See TracChangeset for help on using the changeset viewer.