Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 5, 2008, 1:19:22 AM (17 years ago)
Author:
scheusso
Message:

a lot of changes in order to make it possible to have mulpiple clients with each one a new ship
camera changes
object changes
synchronisable: backsyncronisation should be possible now
gamestatemanager/gamestateclient: functions for backsyncronisation
some changes in order to get the input system (the old one) on the client working
TODO something with the camera position is wrong at the moment (clientside)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network3/src/network/Synchronisable.h

    r1180 r1232  
    6262  typedef struct synchronisableVariable{
    6363    int size;
     64    int mode; // this determines in which direction the variable gets synchronised
    6465    void *var;
    6566    variableType type;
     
    6970  /**
    7071  * This class is the base class of all the Objects in the universe that need to be synchronised over the network
    71   * Every class, that inherits from this class has to link the DATA THAT NEEDS TO BE SYNCHRONISED into the linked list. Additionally it also has to provide a Constructor, that takes exactly the variables in this linked list.
     72   * Every class, t
     73  int mode;hat inherits from this class has to link the DATA THAT NEEDS TO BE SYNCHRONISED into the linked list. Additionally it also has to provide a Constructor, that takes exactly the variables in this linked list.
    7274  * @author Oliver Scheuss
    7375  */
     
    7981    int classID;
    8082
    81     void registerVar(void *var, int size, variableType t);
     83    void registerVar(void *var, int size, variableType t, int mode=1);
    8284    //  syncData getData();
    8385    syncData getData(unsigned char *mem);
    8486    int getSize();
    8587    bool updateData(syncData vars);
     88    void setBacksync(bool sync);
     89    bool getBacksync();
    8690    virtual void registerAllVariables()=0;
    8791    virtual bool create()=0;
     92    static void setClient(bool b);
    8893  protected:
    8994    Synchronisable();
     
    9398    std::list<synchronisableVariable *> *syncList;
    9499    int datasize;
     100    static int state_; // detemines wheter we are server (default) or client
     101    bool backsync_; // if true the variables with mode > 1 will be synchronised to server (client -> server)
    95102  };
    96103}
Note: See TracChangeset for help on using the changeset viewer.