Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2010, 11:49:48 AM (15 years ago)
Author:
scheusso
Message:

changed diff behaviour in order to reduce datasize before and after compress
this reduces time needed for gamestate diff and compress about 50%

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network2/src/libraries/network/GamestateClient.cc

    r6417 r6449  
    161161      assert(b);
    162162    }
    163     if(gs->isDiffed()){
    164       packet::Gamestate *base = gamestateMap_[gs->getBaseID()];
    165       if(!base){
    166         COUT(3) << "could not find base gamestate id: " << gs->getBaseID() << endl;
    167         delete gs;
    168         return 0;
    169       }
    170 //       assert(base); //TODO: fix this
    171       packet::Gamestate *undiffed = gs->undiff(base);
    172       delete gs;
    173       gs=undiffed;
    174       COUT(5) << "successfully undiffed gamestate id: " << undiffed->getID() << std::endl;
    175     }
     163//     if(gs->isDiffed()){
     164//       packet::Gamestate *base = gamestateMap_[gs->getBaseID()];
     165//       if(!base){
     166//         COUT(3) << "could not find base gamestate id: " << gs->getBaseID() << endl;
     167//         delete gs;
     168//         return 0;
     169//       }
     170// //       assert(base); //TODO: fix this
     171//       packet::Gamestate *undiffed = gs->undiff(base);
     172//       delete gs;
     173//       gs=undiffed;
     174//       COUT(5) << "successfully undiffed gamestate id: " << undiffed->getID() << std::endl;
     175//     }
    176176    if(gs->spreadData(0x2))
    177177      return gs;
Note: See TracChangeset for help on using the changeset viewer.