Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1775


Ignore:
Timestamp:
Sep 12, 2008, 5:36:57 PM (16 years ago)
Author:
scheusso
Message:

we have a new gamestate concept now: dont transmit synchronisable header of objects, that dont get updated that tick. transmit objectids of deleted objects to delete them on the client too

Location:
code/branches/network
Files:
2 added
13 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/TODO

    r1534 r1775  
    1 - should we use enet_peer_ping to test if a client is still alive ?
    2 - enet_host_broadcast ? (to all peers)
     1todo:
     2        !!! check that enet does not cause a packet traffic jam when a reliable packet gets missed !!!
     3        spaceship of client vanishes on server
     4        new gamestate concept
     5
  • code/branches/network/src/network/CMakeLists.txt

    r1740 r1775  
    1717  packet/Gamestate.cc
    1818  packet/Welcome.cc
     19  packet/DeleteObjects.cc
    1920)
    2021
  • code/branches/network/src/network/Client.cc

    r1769 r1775  
    170170      if(!isSynched_)
    171171        isSynched_=true;
    172     }else
    173       COUT(3) << "gamestate has not been processed sucessfully" << std::endl;
     172    }
    174173    gamestate.cleanup();
    175174    return;
  • code/branches/network/src/network/GamestateClient.cc

    r1769 r1775  
    156156    if(myShip_){
    157157      //      unsigned char *data = new unsigned char[myShip_->getSize()];
    158       int size=myShip_->getSize2(0, 0x1);
     158      int size=myShip_->getSize(0, 0x1);
    159159      if(size==0)
    160160        return false;
  • code/branches/network/src/network/Server.cc

    r1755 r1775  
    5656#include "packet/Packet.h"
    5757#include "packet/Welcome.h"
     58#include "packet/DeleteObjects.h"
    5859#include <util/Convert.h>
    5960
     
    229230    //std::cout << "updated gamestate, sending it" << std::endl;
    230231    //if(clients->getGamestateID()!=GAMESTATEID_INITIAL)
     232    sendObjectDeletes();
    231233    sendGameState();
    232234    COUT(5) << "Server: one sendGameState turn complete, repeat in next tick" << std::endl;
     
    276278      // gs gets automatically deleted by enet callback
    277279    }
    278     /*if(added) {
    279       //std::cout << "send gamestates from server.cc in sendGameState" << std::endl;
    280       return connection->sendPackets();
    281     }*/
    282     //COUT(5) << "Server: had no gamestates to send" << std::endl;
    283280    return true;
    284281  }
    285282
     283  bool Server::sendObjectDeletes(){
     284    ClientInformation *temp = ClientInformation::getBegin();
     285    packet::DeleteObjects *del = new packet::DeleteObjects();
     286    if(!del->fetchIDs())
     287      return true;  //everything ok (no deletes this tick)
     288    while(temp != NULL){
     289      if( !(temp->getSynched()) ){
     290        COUT(5) << "Server: not sending gamestate" << std::endl;
     291        temp=temp->next();
     292        continue;
     293      }
     294      int cid = temp->getID(); //get client id
     295      packet::DeleteObjects *cd = new packet::DeleteObjects(*del);
     296      assert(cd);
     297      cd->setClientID(cid);
     298      if ( !cd->send() )
     299        COUT(3) << "Server: packet with client id (cid): " << cid << " not sended: " << temp->getFailures() << std::endl;
     300      temp=temp->next();
     301      // gs gets automatically deleted by enet callback
     302    }
     303    return true;
     304  }
     305 
    286306//   void Server::processChat( chat *data, int clientId){
    287307//     char *message = new char [strlen(data->message)+10+1];
  • code/branches/network/src/network/Server.h

    r1735 r1775  
    8585    bool processPacket( ENetPacket *packet, ENetPeer *peer );
    8686    bool sendGameState();
    87    
     87    bool sendObjectDeletes();
    8888   
    8989    //void processChat( chat *data, int clientId);
  • code/branches/network/src/network/Synchronisable.cc

    r1758 r1775  
    5252{
    5353
     54  std::map<unsigned int, Synchronisable *> Synchronisable::objectMap_;
     55  std::queue<unsigned int> Synchronisable::deletedObjects_;
    5456
    5557  int Synchronisable::state_=0x1; // detemines wheter we are server (default) or client
     
    6163  Synchronisable::Synchronisable(){
    6264    RegisterRootObject(Synchronisable);
    63     static int idCounter=0;
     65    static unsigned int idCounter=0;
    6466    datasize=0;
    6567    objectFrequency_=1;
     
    6769    objectID=idCounter++;
    6870    syncList = new std::list<synchronisableVariable *>;
    69     //registerAllVariables();
    7071  }
    7172
    7273  Synchronisable::~Synchronisable(){
    7374    // delete callback function objects
    74     if(!orxonox::Identifier::isCreatingHierarchy())
     75    if(!orxonox::Identifier::isCreatingHierarchy()){
    7576      for(std::list<synchronisableVariable *>::iterator it = syncList->begin(); it!=syncList->end(); it++)
    7677        delete (*it)->callback;
     78      assert(objectMap_[objectID]->objectID==objectID);
     79      objectMap_.erase(objectID);
     80    }
    7781  }
    7882
    7983  bool Synchronisable::create(){
     84    objectMap_[objectID]=this;
     85    assert(objectMap_[objectID]==this);
    8086    this->classID = this->getIdentifier()->getNetworkID();
    8187    COUT(4) << "creating synchronisable: setting classid from " << this->getIdentifier()->getName() << " to: " << classID << std::endl;
     
    9197  }
    9298 
    93   bool Synchronisable::fabricate(unsigned char*& mem, int mode)
     99  Synchronisable *Synchronisable::fabricate(unsigned char*& mem, int mode)
    94100  {
    95101    unsigned int size, objectID, classID;
     
    98104    classID = *(unsigned int*)(mem+2*sizeof(unsigned int));
    99105   
    100     if(size==3*sizeof(unsigned int)){ //not our turn, dont do anything
    101       mem+=3*sizeof(unsigned int);
    102       return true;
    103     }
    104    
    105106    orxonox::Identifier* id = GetIdentifier(classID);
    106     if(!id){
    107       COUT(3) << "We could not identify a new object; classid: " << classID << " uint: " << (unsigned int)classID << " objectID: " << objectID << " size: " << size << std::endl;
    108       assert(0);
    109       return false; // most probably the gamestate is corrupted
    110     }
     107    assert(id);
    111108    orxonox::BaseObject *bo = id->fabricate();
    112109    Synchronisable *no = dynamic_cast<Synchronisable *>(bo);
     
    116113    COUT(3) << "fabricate objectID: " << no->objectID << " classID: " << no->classID << std::endl;
    117114          // update data and create object/entity...
    118     if( !no->updateData(mem, mode) ){
    119       COUT(1) << "We couldn't update the object: " << objectID << std::endl;
    120       return false;
    121     }
    122     if( !no->create() )
    123     {
    124       COUT(1) << "We couldn't manifest (create() ) the object: " << objectID << std::endl;
    125       return false;
    126     }
     115    assert(no->updateData(mem, mode));
     116    assert( no->create() );
     117    return no;
     118  }
     119
     120 
     121  bool Synchronisable::deleteObject(unsigned int objectID){
     122    assert(getSynchronisable(objectID));
     123    assert(getSynchronisable(objectID)->objectID==objectID);
     124    delete objectMap_[objectID];
    127125    return true;
    128126  }
    129 
     127 
     128  Synchronisable* Synchronisable::getSynchronisable(unsigned int objectID){
     129    std::map<unsigned int, Synchronisable *>::iterator i = objectMap_.find(objectID);
     130    if(i==objectMap_.end())
     131      return NULL;
     132    assert(i->second->objectID==objectID);
     133    return (*i).second;
     134  }
     135
     136 
    130137  /**
    131138  * This function is used to register a variable to be synchronized
     
    161168   */
    162169  bool Synchronisable::getData(unsigned char*& mem, unsigned int id, int mode){
     170    //if this tick is we dont synchronise, then abort now
     171    if(!isMyTick(id))
     172      return true;
    163173    //std::cout << "inside getData" << std::endl;
    164174    unsigned int tempsize = 0;
     
    170180    std::list<synchronisableVariable *>::iterator i;
    171181    unsigned int size;
    172     size=getSize2(id, mode);
     182    size=getSize(id, mode);
    173183   
    174184    // start copy header
     
    182192    // end copy header
    183193   
    184     //if this tick is we dont synchronise, then abort now
    185     if(!isMyTick(id))
    186       return true;
    187194   
    188195    COUT(5) << "Synchronisable getting data from objectID: " << objectID << " classID: " << classID << " length: " << size << std::endl;
     
    222229   */
    223230  bool Synchronisable::updateData(unsigned char*& mem, int mode){
    224     unsigned char *data = mem;
    225231    if(mode==0x0)
    226232      mode=state_;
     
    230236      return false;
    231237    }
    232    
     238    unsigned char *data=mem;
    233239    // start extract header
     240    if(!isMyData(mem))
     241      return true;
    234242    unsigned int objectID, classID, size;
    235243    size = *(int *)mem;
     
    242250    assert(this->objectID==objectID);
    243251    assert(this->classID==classID);
    244     if(size==3*sizeof(unsigned int)) //if true, only the header is available
    245       return true;
    246       //assert(0);
    247252   
    248253    COUT(5) << "Synchronisable: objectID " << objectID << ", classID " << classID << " size: " << size << " synchronising data" << std::endl;
     
    288293    if(!isMyTick(id))
    289294      return 0;
    290     int tsize=0;
     295    int tsize=sizeof(synchronisableHeader);
    291296    if(mode==0x0)
    292297      mode=state_;
     
    311316
    312317  /**
    313    * This function returns the total amount of bytes needed by getData to save the whole content of the variables
    314    * @return amount of bytes
    315    */
    316   int Synchronisable::getSize2(unsigned int id, int mode){
    317     return sizeof(synchronisableHeader) + getSize( id, mode );
    318   }
    319  
    320   /**
    321318   *
    322319   * @param id
  • code/branches/network/src/network/Synchronisable.h

    r1751 r1775  
    3333
    3434#include <list>
     35#include <map>
     36#include <queue>
    3537#include "core/OrxonoxClass.h"
    3638#include "util/XMLIncludes.h"
     
    7476    void registerVar(void *var, int size, variableType t, int mode=1, NetworkCallbackBase *cb=0);
    7577    bool getData(unsigned char*& men, unsigned int id, int mode=0x0);
    76     int getSize2(unsigned int id, int mode=0x0);
     78    int getSize(unsigned int id, int mode=0x0);
    7779    bool updateData(unsigned char*& mem, int mode=0x0);
    7880    bool isMyData(unsigned char* mem);
     
    8486    static void setClient(bool b);
    8587   
    86     static bool fabricate(unsigned char*& mem, int mode=0x0);
     88    static Synchronisable *fabricate(unsigned char*& mem, int mode=0x0);
     89    static bool deleteObject(unsigned int objectID);
     90    static Synchronisable *getSynchronisable(unsigned int objectID);
     91    static unsigned int getNumberOfDeletedObject(){ return deletedObjects_.size(); }
     92    static unsigned int popDeletedObject(){ unsigned int i = deletedObjects_.front(); deletedObjects_.pop(); return i; }
     93   
     94   
    8795  protected:
    8896    Synchronisable();
    8997  private:
    90     int getSize(unsigned int id, int mode=0x0);
    9198    bool isMyTick(unsigned int id);
    9299    std::list<synchronisableVariable *> *syncList;
     
    96103    unsigned int objectFrequency_;
    97104    int objectMode_;
     105    static std::map<unsigned int, Synchronisable *> objectMap_;
     106    static std::queue<unsigned int> deletedObjects_;
    98107  };
    99108}
  • code/branches/network/src/network/packet/Gamestate.cc

    r1767 r1775  
    4646#define HEADER GAMESTATE_HEADER(data_)
    4747
     48 
    4849Gamestate::Gamestate()
    4950{
     
    8081  orxonox::ObjectList<Synchronisable>::iterator it;
    8182  for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it){
    82     tempsize=it->getSize2(id, mode);
     83    tempsize=it->getSize(id, mode);
    8384
    8485    if(currentsize+tempsize > size){
     
    8889      int addsize=tempsize;
    8990      while(++temp)
    90         addsize+=temp->getSize2(id, mode);
     91        addsize+=temp->getSize(id, mode);
    9192      data_ = (unsigned char *)realloc(data_, sizeof(GamestateHeader) + currentsize + addsize);
    9293      if(!data_)
     
    105106  HEADER->packetType = ENUM::Gamestate;
    106107  assert( *(ENUM::Type *)(data_) == ENUM::Gamestate);
    107   HEADER->normsize = currentsize;
     108  HEADER->datasize = currentsize;
    108109  HEADER->id = id;
    109110  HEADER->diffed = false;
     
    125126  unsigned char *mem=data_+sizeof(GamestateHeader);
    126127    // get the start of the Synchronisable list
    127   orxonox::ObjectList<Synchronisable>::iterator it=orxonox::ObjectList<Synchronisable>::begin();
    128 
    129   while(mem < data_+sizeof(GamestateHeader)+HEADER->normsize){
    130       // extract synchronisable header
     128  //orxonox::ObjectList<Synchronisable>::iterator it=orxonox::ObjectList<Synchronisable>::begin();
     129  Synchronisable *s;
     130
     131  // update the data of the objects we received
     132  while(mem < data_+sizeof(GamestateHeader)+HEADER->datasize){
    131133    size = *(unsigned int *)mem;
    132134    objectID = *(unsigned int*)(mem+sizeof(unsigned int));
    133135    classID = *(unsigned int*)(mem+2*sizeof(unsigned int));
    134136
    135     if(!it || it->objectID!=objectID || it->classID!=classID){
    136         // bad luck ;)
    137         // delete the synchronisable (obviously seems to be deleted on the server)
    138       while(it && it->objectID!=objectID)
    139         removeObject(it);
    140 
    141       if(!it){
    142         //fabricate the new synchronisable
    143         if(!Synchronisable::fabricate(mem, mode))
    144           return false;
    145         it=orxonox::ObjectList<Synchronisable>::end();
    146       }else{
    147         if(! it->updateData(mem, mode))
    148         {
    149           COUT(1) << "We couldn't update objectID: " \
    150             << objectID << "; classID: " << classID << std::endl;
    151         }
    152       }
    153     } else
     137    s = Synchronisable::getSynchronisable( objectID );
     138    if(!s)
    154139    {
    155         // we have our object
    156       if(! it->updateData(mem, mode))
    157       {
    158         COUT(1) << "We couldn't update objectID: " \
    159             << objectID << "; classID: " << classID << std::endl;
    160       }
     140      s = Synchronisable::fabricate(mem, mode);
     141      if(!s)
     142        return false;
    161143    }
    162     ++it;
    163   }
    164 
    165   return true;
    166 }
     144    else
     145    {
     146      if(!s->updateData(mem, mode))
     147        return false;
     148    }
     149  }
     150
     151  return true;
     152}
     153
     154
    167155
    168156int Gamestate::getID(){
     
    177165  else
    178166  {
    179     return HEADER->normsize+sizeof(GamestateHeader);
     167    return HEADER->datasize+sizeof(GamestateHeader);
    180168  }
    181169}
     
    186174  assert(!isCompressed());
    187175  assert(!gs.isCompressed());
    188   while(d1<data_+HEADER->normsize)
     176  while(d1<data_+HEADER->datasize)
    189177  {
    190178    if(*d1!=*d2)
     
    205193  assert(HEADER);
    206194  assert(!HEADER->compressed);
    207   uLongf buffer = (uLongf)(((HEADER->normsize + 12)*1.01)+1);
     195  uLongf buffer = (uLongf)(((HEADER->datasize + 12)*1.01)+1);
    208196  if(buffer==0)
    209197    return false;
     
    214202  unsigned char *source = GAMESTATE_START(data_);
    215203  int retval;
    216   retval = compress( dest, &buffer, source, (uLong)(HEADER->normsize) );
     204  retval = compress( dest, &buffer, source, (uLong)(HEADER->datasize) );
    217205  switch ( retval ) {
    218206    case Z_OK: COUT(5) << "G.St.Man: compress: successfully compressed" << std::endl; break;
     
    223211#ifndef NDEBUG
    224212  //decompress and compare the start and the decompressed data
    225   unsigned char *rdata = new unsigned char[HEADER->normsize+sizeof(GamestateHeader)];
     213  unsigned char *rdata = new unsigned char[HEADER->datasize+sizeof(GamestateHeader)];
    226214  unsigned char *d2 = GAMESTATE_START(rdata);
    227   uLongf length2 = HEADER->normsize;
     215  uLongf length2 = HEADER->datasize;
    228216  uncompress(d2, &length2, dest, buffer);
    229   for(unsigned int i=0; i<HEADER->normsize; i++){
     217  for(unsigned int i=0; i<HEADER->datasize; i++){
    230218    assert(*(source+i)==*(d2+i));
    231219  }
     
    235223  //copy and modify header
    236224#ifndef NDEBUG
    237   HEADER->crc32 = calcCRC(data_+sizeof(GamestateHeader), HEADER->normsize);
     225  HEADER->crc32 = calcCRC(data_+sizeof(GamestateHeader), HEADER->datasize);
    238226#endif
    239227  *GAMESTATE_HEADER(ndata) = *HEADER;
     
    245233  HEADER->compressed = true;
    246234  assert(HEADER->compressed);
    247   COUT(3) << "gamestate compress normsize: " << HEADER->normsize << " compsize: " << HEADER->compsize << std::endl;
     235  COUT(3) << "gamestate compress datasize: " << HEADER->datasize << " compsize: " << HEADER->compsize << std::endl;
    248236  return true;
    249237}
     
    252240  assert(HEADER);
    253241  assert(HEADER->compressed);
    254   COUT(3) << "GameStateClient: uncompressing gamestate. id: " << HEADER->id << ", baseid: " << HEADER->base_id << ", normsize: " << HEADER->normsize << ", compsize: " << HEADER->compsize << std::endl;
    255   unsigned int normsize = HEADER->normsize;
     242  COUT(3) << "GameStateClient: uncompressing gamestate. id: " << HEADER->id << ", baseid: " << HEADER->base_id << ", datasize: " << HEADER->datasize << ", compsize: " << HEADER->compsize << std::endl;
     243  unsigned int datasize = HEADER->datasize;
    256244  unsigned int compsize = HEADER->compsize;
    257245  unsigned int bufsize;
    258   assert(compsize<=normsize);
    259   bufsize = normsize;
     246  assert(compsize<=datasize);
     247  bufsize = datasize;
    260248  assert(bufsize!=0);
    261249  unsigned char *ndata = new unsigned char[bufsize + sizeof(GamestateHeader)];
     
    272260  }
    273261#ifndef NDEBUG
    274   assert(HEADER->crc32==calcCRC(ndata+sizeof(GamestateHeader), HEADER->normsize));
     262  assert(HEADER->crc32==calcCRC(ndata+sizeof(GamestateHeader), HEADER->datasize));
    275263#endif
    276264
     
    282270  data_ = ndata;
    283271  HEADER->compressed = false;
    284   assert(HEADER->normsize==normsize);
     272  assert(HEADER->datasize==datasize);
    285273  assert(HEADER->compsize==compsize);
    286274  return true;
     
    296284  unsigned int of=0; // pointers offset
    297285  unsigned int dest_length=0;
    298   dest_length=HEADER->normsize;
     286  dest_length=HEADER->datasize;
    299287  if(dest_length==0)
    300288    return NULL;
    301289  unsigned char *ndata = new unsigned char[dest_length*sizeof(unsigned char)+sizeof(GamestateHeader)];
    302290  unsigned char *dest = ndata + sizeof(GamestateHeader);
    303   while(of < GAMESTATE_HEADER(base->data_)->normsize && of < HEADER->normsize){
     291  while(of < GAMESTATE_HEADER(base->data_)->datasize && of < HEADER->datasize){
    304292    *(dest+of)=*(basep+of)^*(gs+of); // do the xor
    305293    ++of;
    306294  }
    307   if(GAMESTATE_HEADER(base->data_)->normsize!=HEADER->normsize){
     295  if(GAMESTATE_HEADER(base->data_)->datasize!=HEADER->datasize){
    308296    unsigned char n=0;
    309     if(GAMESTATE_HEADER(base->data_)->normsize < HEADER->normsize){
     297    if(GAMESTATE_HEADER(base->data_)->datasize < HEADER->datasize){
    310298      while(of<dest_length){
    311299        *(dest+of)=n^*(gs+of);
     
    334322  unsigned int of=0; // pointers offset
    335323  unsigned int dest_length=0;
    336   dest_length=HEADER->normsize;
     324  dest_length=HEADER->datasize;
    337325  if(dest_length==0)
    338326    return NULL;
    339327  unsigned char *ndata = new unsigned char[dest_length*sizeof(unsigned char)+sizeof(GamestateHeader)];
    340328  unsigned char *dest = ndata + sizeof(GamestateHeader);
    341   while(of < GAMESTATE_HEADER(base->data_)->normsize && of < HEADER->normsize){
     329  while(of < GAMESTATE_HEADER(base->data_)->datasize && of < HEADER->datasize){
    342330    *(dest+of)=*(basep+of)^*(gs+of); // do the xor
    343331    ++of;
    344332  }
    345   if(GAMESTATE_HEADER(base->data_)->normsize!=HEADER->normsize){
     333  if(GAMESTATE_HEADER(base->data_)->datasize!=HEADER->datasize){
    346334    unsigned char n=0;
    347     if(GAMESTATE_HEADER(base->data_)->normsize < HEADER->normsize){
     335    if(GAMESTATE_HEADER(base->data_)->datasize < HEADER->datasize){
    348336      while(of < dest_length){
    349337        *(dest+of)=n^*(gs+of);
     
    370358    // get total size of gamestate
    371359  for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it)
    372     size+=it->getSize2(id, mode); // size of the actual data of the synchronisable
     360    size+=it->getSize(id, mode); // size of the actual data of the synchronisable
    373361//  size+=sizeof(GamestateHeader);
    374362  return size;
  • code/branches/network/src/network/packet/Gamestate.h

    r1763 r1775  
    3333#endif
    3434
     35
    3536#ifndef NETWORK_PACKETGAMESTATE_H
    3637#define NETWORK_PACKETGAMESTATE_H
     
    4445  int id; // id of the gamestate
    4546  unsigned int compsize;
    46   unsigned int normsize;
     47  unsigned int datasize;
    4748  int base_id; // id of the base-gamestate diffed from
    4849  bool diffed; // wheter diffed or not
     
    5556
    5657/**
    57         @author
     58        @author Oliver Scheuss
    5859*/
    5960class Gamestate: public Packet{
     
    8485    void removeObject(orxonox::ObjectListIterator<Synchronisable> &it);
    8586
    86 
    87     //Bytestream *bs_;
    88     //GamestateHeader *header_;
     87  private:
    8988};
    9089
  • code/branches/network/src/network/packet/Packet.cc

    r1763 r1775  
    4242#include "Gamestate.h"
    4343#include "Welcome.h"
     44#include "DeleteObjects.h"
    4445#include "network/Host.h"
    4546#include "core/CoreIncludes.h"
     
    141142  unsigned int clientID = ClientInformation::findClient(&peer->address)->getID();
    142143  Packet *p;
    143   COUT(3) << "packet type: " << *(ENUM::Type *)&data[_PACKETID] << std::endl;
     144  COUT(5) << "packet type: " << *(ENUM::Type *)&data[_PACKETID] << std::endl;
    144145  switch( *(ENUM::Type *)(data + _PACKETID) )
    145146  {
    146147    case ENUM::Acknowledgement:
    147       COUT(3) << "ack" << std::endl;
     148      COUT(4) << "ack" << std::endl;
    148149      p = new Acknowledgement( data, clientID );
    149150      break;
    150151    case ENUM::Chat:
    151       COUT(3) << "chat" << std::endl;
     152      COUT(4) << "chat" << std::endl;
    152153      p = new Chat( data, clientID );
    153154      break;
    154155    case ENUM::ClassID:
    155       COUT(3) << "classid" << std::endl;
     156      COUT(4) << "classid" << std::endl;
    156157      p = new ClassID( data, clientID );
    157158      break;
    158159    case ENUM::Gamestate:
    159       COUT(3) << "gamestate" << std::endl;
     160      COUT(4) << "gamestate" << std::endl;
    160161      // TODO: remove brackets
    161162      p = new Gamestate( data, clientID );
    162163      break;
    163164    case ENUM::Welcome:
    164       COUT(3) << "welcome" << std::endl;
     165      COUT(4) << "welcome" << std::endl;
    165166      p = new Welcome( data, clientID );
     167      break;
     168    case ENUM::DeleteObjects:
     169      COUT(4) << "deleteobjects" << std::endl;
     170      p = new DeleteObjects( data, clientID );
    166171      break;
    167172    default:
  • code/branches/network/src/network/packet/Packet.h

    r1763 r1775  
    4747    ClassID,
    4848    Chat,
    49     Welcome
     49    Welcome,
     50    DeleteObjects
    5051  };
    5152}
  • code/branches/network/src/orxonox/objects/Model.cc

    r1769 r1775  
    8686      }
    8787      if(this->isExactlyA(Class(Model)))
    88         setObjectFrequency(300); //sync all 10 seconds (this only applies to asteroids and other isExactlyA(Model)
     88        setObjectFrequency(1); //sync all 10 seconds (this only applies to asteroids and other isExactlyA(Model)
    8989      return true;
    9090    }
Note: See TracChangeset for help on using the changeset viewer.