Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 28, 2008, 10:52:12 PM (16 years ago)
Author:
scheusso
Message:

objects with non-existing creator (on client-side) get ignored now

Location:
code/branches/objecthierarchy/src/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/network/GamestateManager.cc

    r2034 r2035  
    8181    for(it = gamestateQueue.begin(); it!=gamestateQueue.end(); it++){
    8282      bool b = processGamestate(it->second);
    83 //      assert(b);
     83      assert(b);
    8484      delete it->second;
    8585    }
  • code/branches/objecthierarchy/src/network/Synchronisable.cc

    r2034 r2035  
    154154    if (header->creatorID != OBJECTID_UNKNOWN)
    155155    {
    156         Synchronisable* synchronisable_creator = Synchronisable::getSynchronisable(header->creatorID);
    157         if (!synchronisable_creator)
    158             return 0;
    159         else
    160             creator = dynamic_cast<orxonox::BaseObject*>(synchronisable_creator);
     156      Synchronisable* synchronisable_creator = Synchronisable::getSynchronisable(header->creatorID);
     157      if (!synchronisable_creator)
     158      {
     159        mem += header->size; //.TODO: this suckz.... remove size from header
     160        return 0;
     161      }
     162      else
     163        creator = dynamic_cast<orxonox::BaseObject*>(synchronisable_creator);
    161164    }
    162165    orxonox::BaseObject *bo = id->fabricate(creator);
     
    170173          // update data and create object/entity...
    171174    bool b = no->updateData(mem, mode, true);
    172 //    assert(b);
     175    assert(b);
    173176    if (b)
    174177    {
  • code/branches/objecthierarchy/src/network/packet/Gamestate.cc

    r2034 r2035  
    157157    if(!s)
    158158    {
    159       s = Synchronisable::fabricate(mem, mode);
    160       return false;
    161 //       if(!s)
    162 //         return false;
     159      Synchronisable::fabricate(mem, mode);
    163160    }
    164161    else
    165162    {
    166163      bool b = s->updateData(mem, mode);
    167 //      assert(b);
     164      assert(b);
    168165      //if(!s->updateData(mem, mode))
    169166        //return false;
Note: See TracChangeset for help on using the changeset viewer.