Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9279 in orxonox.OLD for branches/proxy/src


Ignore:
Timestamp:
Jul 13, 2006, 11:01:04 PM (18 years ago)
Author:
patrick
Message:

number of players calculus

Location:
branches/proxy/src/lib/network
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/monitor/network_monitor.cc

    r9277 r9279  
    2121#include "network_monitor.h"
    2222#include "network_node.h"
     23#include "network_stream.h"
    2324
    2425
     
    3435NetworkMonitor::NetworkMonitor(NetworkStream* networkStream)
    3536{
     37  this->networkStream = networkStream;
    3638  this->playerNumber = 0;
    3739}
     
    121123void NetworkMonitor::process()
    122124{
     125  std::list<NetworkNode*>::iterator it = this->nodeList.begin();
     126  for(; it != this->nodeList.end(); it++)
     127  {
    123128
     129  }
    124130}
    125131
  • branches/proxy/src/lib/network/monitor/network_monitor.h

    r9278 r9279  
    5050
    5151  private:
     52    NetworkStream*               networkStream;              //!< reference to the one networkstream of the network
    5253    std::list<NetworkNode*>      nodeList;                   //!< list of all network nodes
    5354
  • branches/proxy/src/lib/network/monitor/network_node.h

    r9277 r9279  
    3030    void removeMasterServer(PeerInfo* node);
    3131
     32    /** @returns the number of players */
     33    inline int getPlayerNumber() { return this->playerNumber; }
     34    /** @returns the node type of this node */
     35    inline int getNodeType() { return this->nodeType; }
    3236
    3337
  • branches/proxy/src/lib/network/network_stream.cc

    r9275 r9279  
    105105  this->serverSocket = NULL;
    106106  this->networkGameManager = NULL;
     107  this->networkMonitor = new NetworkMonitor(this);
     108
    107109  this->myHostId = 0;
    108110  this->currentState = 0;
Note: See TracChangeset for help on using the changeset viewer.