Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 12, 2007, 12:35:52 AM (17 years ago)
Author:
scheusso
Message:

preparing clone mode for game (one server steers, all clients view ;) )

Location:
code/branches/FICN/src/network
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/Client.cc

    r448 r459  
    151151   * Performs a GameState update
    152152   */
    153   void Client::update(){
     153  void Client::tick(float time){
    154154    ENetPacket *packet;
    155155    // stop if the packet queue is empty
  • code/branches/FICN/src/network/Client.h

    r438 r459  
    2020#include "GameStateClient.h"
    2121#include "orxonox/core/IdentifierIncludes.h"
     22//#include "NetworkFrameListener.h"
    2223
    2324
    2425namespace network{
    2526
     27
     28 
    2629/**
     30  network::Client *client;
    2731 * The network/Client class
    2832 * This class implements all necessary function for the network communication
     
    4852  bool sendPackets();
    4953 
    50   void update();
     54  void tick(float time);
    5155
    5256  private:
     
    6266};
    6367
     68
    6469}
    6570
  • code/branches/FICN/src/network/Server.cc

    r444 r459  
    9595   * Run this function once every tick
    9696   * calls processQueue and updateGamestate
     97   * @param time time since last tick
    9798   */
    98   void Server::tick(){
     99  void Server::tick(float time){
    99100    processQueue();
    100101    updateGamestate();
  • code/branches/FICN/src/network/Server.h

    r440 r459  
    2121#include "enet/enet.h"
    2222#include "ClientInformation.h"
     23//#include "NetworkFrameListener.h"
     24
    2325
    2426namespace network{
    2527
     28 
    2629  /**
    2730   * This class is the root class of the network module for a server.
     
    3740    bool sendMSG(std::string msg);
    3841    bool sendMSG(const char *msg);
    39     void tick();
     42    void tick(float time);
    4043    protected:
    4144    void processQueue();
     
    4952    ClientInformation *clients;
    5053  };
    51 
    52 
     54 
    5355
    5456
  • code/branches/FICN/src/network/Synchronisable.h

    r346 r459  
    1717
    1818#include "orxonox/core/IdentifierIncludes.h"
     19#include "orxonox/core/OrxonoxClass.h"
    1920
    2021namespace network {
     
    3940 * @author Oliver Scheuss
    4041*/
    41 class Synchronisable{
     42class Synchronisable : public orxonox::OrxonoxClass{
    4243public:
    4344  Synchronisable();
  • code/branches/FICN/src/network/dummyclient3.cc

    r448 r459  
    2323
    2424  while (true) {
    25           client.update();
     25          client.tick(0);
    2626          std::cout << "your message: ";
    2727          std::getline( std::cin, str );
     
    5050
    5151  while (true) {
    52           client.update();
     52          client.tick(0);
    5353          usleep(100);
    5454  }
Note: See TracChangeset for help on using the changeset viewer.