Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/lib/network/handshake.cc @ 7444

Last change on this file since 7444 was 7444, checked in by rennerc, 18 years ago

new network system implemented. yet with a lot of empty function bodys

File size: 2.0 KB
RevLine 
[6043]1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11### File Specific:
12   main-programmer: christoph
13   co-programmer:
14*/
15
16
17/* this is for debug output. It just says, that all calls to PRINT() belong to the DEBUG_MODULE_NETWORK module
18   For more information refere to https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DebugOutput
19*/
20#define DEBUG_MODULE_NETWORK
21
22#include "handshake.h"
23
[6753]24#include <cassert>
25
[6116]26Handshake::Handshake( bool server, int clientId, int networkGameManagerId )
[6695]27  : Synchronizeable()
[6043]28{
29  /* set the class id for the base object */
30  this->setClassID(CL_HANDSHAKE, "Handshake");
31
[6053]32  this->setIsServer(server);
[7444]33  this->localState.hostId = clientId;
34  this->localState.networkManagerId = networkGameManagerId;
35 
36  orxId_handler = registerVarId( new SynchronizeableInt( &localState.orxId, &remoteState.orxId, "orxonoxId" ) );
37  version_handler = registerVarId( new SynchronizeableInt( &localState.version, &remoteState.version, "version" ) );
38  netManId_handler = registerVarId( new SynchronizeableInt( &localState.networkManagerId, &remoteState.networkManagerId, "networkManagerId" ) );
39  hostId_handler = registerVarId( new SynchronizeableInt( &localState.hostId, &remoteState.hostId, "hostId" ) );
40  completed_handler = registerVarId( new SynchronizeableInt( &localState.completed, &remoteState.completed, "completed" ) );
41  error_handler = registerVarId( new SynchronizeableInt( &localState.error, &remoteState.error, "error" ) );
42  errorString_handler = registerVarId( new SynchronizeableString( &localState.errorString, &remoteState.errorString, "errorString" ) );
[6053]43
[7444]44
[6695]45  this->setSynchronized(true);
[6090]46  PRINTF(5)("Handshake created clientId = %d\n", clientId);
[6043]47}
48
[7444]49/**
50 * handler for changes in synced vars
51 * @param id id's which have changed
52 */
53void Handshake::varChangeHandler( std::list< int > & id )
[6043]54{
55}
56
Note: See TracBrowser for help on using the repository browser.