Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2008, 11:08:19 PM (16 years ago)
Author:
scheusso
Message:

implemented some sort of buffer for the spaceship movements (makes the movements on the client smoother)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/GameStateClient.h

    r1360 r1425  
    2121 *
    2222 *   Author:
    23  *      ...
     23 *      Oliver Scheuss
    2424 *   Co-authors:
    25  *      ...
     25 *      Dumeni Manatschal
    2626 *
    2727 */
     
    3333//
    3434//
    35 // Author:  <>, (C) 2007
     35// Author:  Oliver Scheuss, (C) 2007
    3636//
    3737// Copyright: See COPYING file that comes with this distribution
     
    4646#include "core/CorePrereqs.h"
    4747#include "PacketTypes.h"
     48#include "objects/SpaceShip.h"
    4849
     50
     51#define GAMESTATEID_INITIAL -1
    4952
    5053namespace network
     
    5659    ~GameStateClient();
    5760   
     61    void addGameState(GameStateCompressed *gs);
     62    int processGameState();
     63    GameStateCompressed *popPartialGameState();
     64    void cleanup();
     65  private:
    5866    bool pushGameState(GameStateCompressed *compstate);
    59     GameStateCompressed *popPartialGameState();
    60   private:
    6167    bool loadSnapshot(GameState *state);
    6268    GameState *getPartialSnapshot();
    63     void cleanup();
    6469    GameState *undiff(GameState *old, GameState *diff);
    6570    GameStateCompressed *compress_(GameState *a);
     
    6974    void removeObject(orxonox::Iterator<Synchronisable> &it);
    7075    void printGameStateMap();
     76    bool saveShipCache();
     77    bool loadShipCache();
    7178
    7279    int           last_diff_;
    7380    int           last_gamestate_;
    7481    std::map<int, GameState *> gameStateMap;
     82    GameStateCompressed *tempGameState_; // we save the received gamestates here during processQueue
     83    orxonox::SpaceShip *myShip_;
     84    syncData shipCache_;
    7585   
    7686   
Note: See TracChangeset for help on using the changeset viewer.