Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 29, 2018, 4:04:35 PM (7 years ago)
Author:
mdedial
Message:

Clean up some code, add lots of comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Masterserver_FS18/src/libraries/network/packet/DeleteObjects.cc

    r11071 r11842  
    4545 : Packet()
    4646{
    47   flags_ = flags_ | PACKET_FLAG_DELETE;
     47  this->flags_ |= PACKET_FLAG_DELETE;
    4848}
    4949
     
    6060{
    6161  unsigned int number = Synchronisable::getNumberOfDeletedObject();
    62   if(number==0)
     62  if(number == 0)
    6363    return false;
    6464  orxout(verbose, context::packets) << "sending DeleteObjects: ";
     
    8383{
    8484  assert(data_);
    85   return _OBJECTIDS + *(uint32_t*)(data_+_QUANTITY)*sizeof(uint32_t);
     85  return _OBJECTIDS + *(uint32_t*) (this->data_ + _QUANTITY) * sizeof(uint32_t);
    8686}
    8787
    8888bool DeleteObjects::process(orxonox::Host* host)
    8989{
    90   for(unsigned int i=0; i<*(unsigned int *)(data_+_QUANTITY); i++)
     90  for(unsigned int i = 0; i < *(unsigned int *) (this->data_+_QUANTITY); i++)
    9191  {
    9292    orxout(verbose, context::packets) << "deleting object with id: " << *(uint32_t*)(data_+_OBJECTIDS+i*sizeof(uint32_t)) << endl;
    93     Synchronisable::deleteObject( *(uint32_t*)(data_+_OBJECTIDS+i*sizeof(uint32_t)) );
     93    Synchronisable::deleteObject( *(uint32_t*)(this->data_ + _OBJECTIDS + i * sizeof(uint32_t)) );
    9494  }
    9595  delete this;
Note: See TracChangeset for help on using the changeset viewer.