Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2010, 8:54:00 PM (15 years ago)
Author:
scheusso
Message:

a lot of changes:

  • some fixes (mostly gamestate:diff)
  • FunctionCall buffering (if Gamestate is not recent enough)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network5/src/libraries/network/GamestateHandler.h

    r6073 r7759  
    3232#include "NetworkPrereqs.h"
    3333
     34#include <cassert>
     35
    3436namespace orxonox {
    3537
     
    3941class _NetworkExport GamestateHandler{
    4042  private:
    41     virtual bool add(packet::Gamestate *gs, unsigned int clientID)=0;
    42     virtual bool ack(unsigned int gamestateID, unsigned int clientID)=0;
     43    virtual bool      add(packet::Gamestate *gs, unsigned int clientID)=0;
     44    virtual bool      ack(unsigned int gamestateID, unsigned int clientID)=0;
    4345
    44     static GamestateHandler *instance_;
     46    static GamestateHandler* instance_;
    4547
    4648
     
    5052
    5153  public:
    52     static bool addGamestate(packet::Gamestate *gs, unsigned int clientID){ return instance_->add(gs, clientID); }
    53     static bool ackGamestate(unsigned int gamestateID, unsigned int clientID){ return instance_->ack(gamestateID, clientID); }
     54    static bool     addGamestate(packet::Gamestate *gs, unsigned int clientID){ return instance_->add(gs, clientID); }
     55    static bool     ackGamestate(unsigned int gamestateID, unsigned int clientID){ return instance_->ack(gamestateID, clientID); }
     56    static GamestateHandler* getInstance(){ assert(instance_); return instance_; }
     57   
     58    virtual uint32_t  getLastProcessedGamestateID( unsigned int clientID )=0;
     59    virtual uint32_t  getCurrentGamestateID()=0;
    5460};
    5561
Note: See TracChangeset for help on using the changeset viewer.