Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2010, 8:54:00 PM (13 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/GamestateManager.h

    r7163 r7759  
    4646#include "GamestateHandler.h"
    4747#include "core/CorePrereqs.h"
     48#include "packet/Gamestate.h"
    4849
    4950namespace orxonox
     
    7172    ~GamestateManager();
    7273
    73     bool add(packet::Gamestate *gs, unsigned int clientID);
     74    virtual bool      add(packet::Gamestate *gs, unsigned int clientID);
     75    virtual bool      ack(unsigned int gamestateID, unsigned int clientID);
     76    virtual uint32_t  getLastProcessedGamestateID( unsigned int clientID );
     77    virtual uint32_t  getCurrentGamestateID(){ return reference->getID(); }
     78   
    7479    bool processGamestates();
    7580    bool update();
     
    8085    bool getSnapshot();
    8186
    82     bool ack(unsigned int gamestateID, unsigned int clientID);
    8387    void removeClient(ClientInformation *client);
    8488  private:
     
    8791    std::map<unsigned int, std::map<unsigned int, packet::Gamestate*> > gamestateMap_;
    8892    std::map<unsigned int, packet::Gamestate*> gamestateQueue;
     93    std::map<unsigned int, uint32_t> lastProcessedGamestateID_;
    8994    packet::Gamestate *reference;
    9095    TrafficControl *trafficControl_;
Note: See TracChangeset for help on using the changeset viewer.