Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 5, 2008, 1:19:22 AM (16 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/ConnectionManager.h

    r1168 r1232  
    7171  class ConnectionManager{
    7272  public:
     73    ConnectionManager();
    7374    ConnectionManager(ClientInformation *head);
    7475    ConnectionManager(int port, const char *address, ClientInformation *head);
     
    8485    bool sendPackets(ENetEvent *event);
    8586    bool sendPackets();
     87    bool createClient(int clientID);
    8688
    87     //##### for testing purpose only #####
    88     ConnectionManager();
    89     std::map<int, int> testGetClientsShip() {
    90       return clientsShip;
    91     }
    92     void testAddClientsShipID( int clientID, int objectID ) {
    93       addClientsObjectID( clientID, objectID );
    94     }
    95     int testGetClientsShipID( int clientID ) {
    96       return getClientsShipID( clientID );
    97     }
    98     int testGetObjectsClientID( int objectID ) {
    99        return getObjectsClientID( objectID );
    100     }
    101     void testDeleteClientsIDReg( int clientID ) {
    102       deleteClientIDReg( clientID );
    103     }
    104     void testDeleteObjectIDReg( int objectID ) {
    105       deleteObjectIDReg( objectID );
    106     }
    107     //##### for testing purpose only #####
    10889  private:
    10990    bool clientDisconnect(ENetPeer *peer);
    110     //bool clientDisconnect(ENetPeer peer);
    11191    bool processData(ENetEvent *event);
    11292    bool addClient(ENetEvent *event);
     
    11797    void syncClassid(int clientID);
    11898    ENetPeer *getClientPeer(int clientID);
     99    bool createShip(ClientInformation *client);
     100    bool sendWelcome(int clientID, int shipID, bool allowed);
     101    bool addFakeConnectRequest(ENetEvent *ev);
    119102    PacketBuffer buffer;
    120103    PacketGenerator packet_gen;
     
    126109    ClientInformation *head_;
    127110
     111   
     112//     int getNumberOfClients();
    128113    //functions to map what object every clients uses
    129     std::map<int, int> clientsShip;
     114    /*std::map<int, int> clientsShip;
    130115    void addClientsObjectID( int clientID, int objectID );
    131116    int getClientsShipID( int clientID );
    132117    int getObjectsClientID( int objectID );
    133118    void deleteClientIDReg( int clientID );
    134     void deleteObjectIDReg( int objectID );
    135     int getNumberOfClients();
     119    void deleteObjectIDReg( int objectID );*/
    136120  };
    137121
Note: See TracChangeset for help on using the changeset viewer.