Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2007, 12:42:46 PM (18 years ago)
Author:
scheusso
Message:

extended gamestatehandling for diffed and not diffed gamestates (initial states, etc)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/ClientInformation.h

    r432 r436  
    1313#define NETWORKCLIENTINFORMATION_H
    1414
     15#include <enet/enet.h>
     16
     17#define GAMESTATEID_INITIAL -1
     18
    1519namespace network {
    1620
     
    2226public:
    2327  ClientInformation();
     28  ClientInformation(bool head);
    2429//   ClientInformation(ClientInformation *prev, ClientInformation *next);
    2530//   ClientInformation(ClientInformation *prev);
     
    2732  ClientInformation *next();
    2833  ClientInformation *prev();
    29   void setNext(ClientInformation *next);
    30   void setPrev(ClientInformation *prev);
    31   void insertAfter(ClientInformation *ins);
    32   void insertBefore(ClientInformation *ins);
     34  bool setNext(ClientInformation *next);
     35  bool setPrev(ClientInformation *prev);
     36  ClientInformation *insertAfter(ClientInformation *ins);
     37  ClientInformation *insertBefore(ClientInformation *ins);
     38  ClientInformation *insertBack(ClientInformation *ins);
     39  void setID(int clientID);
     40  void setPeer(ENetPeer *peer);
     41  void setGamestateID(int id);
     42  int getID();
     43  ENetPeer *getPeer();
     44  int getGamestateID();
     45  bool removeClient(int clientID);
     46  bool removeClient(ENetPeer *peer);
     47  ClientInformation *findClient(int clientID, bool look_backwards=false);
     48  ClientInformation *findClient(ENetAddress *address, bool look_backwards=false);
     49  bool head;
    3350 
    3451private:
    3552  ClientInformation *preve;
    3653  ClientInformation *nexte;
     54  //actual information:
     55  ENetPeer *peer_;
     56  int clientID_;
     57  int gamestateID_;
    3758};
    3859
Note: See TracChangeset for help on using the changeset viewer.