Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6955 in orxonox.OLD


Ignore:
Timestamp:
Feb 1, 2006, 4:20:47 PM (19 years ago)
Author:
rennerc
Message:

added score to playable

Location:
branches/network/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/synchronizeable.h

    r6937 r6955  
    4040  NWT_HS_NGM_ID,
    4141
     42  NWT_PL_B,
    4243  NWT_PL_FLAGS,
     44  NWT_PL_SCORE,
    4345
    4446  NWT_PN_BO_WRITESTATE,
  • branches/network/src/world_entities/playable.cc

    r6954 r6955  
    4747
    4848  this->setSynchronized(true);
     49 
     50  this->score = 0;
     51  this->oldScore = 0;
    4952
    5053
     
    275278}
    276279
     280#define DATA_FLAGS    1
     281#define DATA_SCORE    2
     282
    277283#define FLAGS_bFire   1
    278284
     
    308314bool Playable::needsReadSync( )
    309315{
     316  //if ( score != oldScore )
     317  //  return true;
     318 
    310319  byte flags = 0;
    311320
  • branches/network/src/world_entities/playable.h

    r6950 r6955  
    5959    int       readSync(byte* data, int maxLength );
    6060    bool      needsReadSync();
     61   
     62    inline void setScore( int score ) { this->score = score; }
     63    inline int  getScore() { return this->score; }
    6164
    6265  protected:
     
    7477    bool                  bFire;              //!< If the Ship is firing.
    7578    int                   oldFlags;           //!< Used for synchronisation
     79   
     80    int                   score;
     81    int                   oldScore;
    7682
    7783    //HACK: explosion emitter
Note: See TracChangeset for help on using the changeset viewer.