Changeset 2112 for code/branches/objecthierarchy/src
- Timestamp:
- Nov 2, 2008, 12:54:17 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src
- Files:
-
- 75 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/ChatListener.cc
r2072 r2112 32 32 #include "core/Core.h" 33 33 34 namespace network34 namespace orxonox 35 35 { 36 36 ChatListener::ChatListener() -
code/branches/objecthierarchy/src/network/ChatListener.h
r2072 r2112 35 35 #include "core/OrxonoxClass.h" 36 36 37 namespace network37 namespace orxonox 38 38 { 39 class _NetworkExport ChatListener : virtual public orxonox::OrxonoxClass39 class _NetworkExport ChatListener : virtual public OrxonoxClass 40 40 { 41 41 public: -
code/branches/objecthierarchy/src/network/Client.cc
r2070 r2112 49 49 // #include "packet/Acknowledgement.h" 50 50 51 namespace network51 namespace orxonox 52 52 { 53 53 // SetConsoleCommandShortcut(Client, chat); -
code/branches/objecthierarchy/src/network/Client.h
r1953 r2112 54 54 55 55 56 namespace network56 namespace orxonox 57 57 { 58 58 /** 59 network::Client *client;59 Client *client; 60 60 * The network/Client class 61 61 * This class implements all necessary function for the network communication -
code/branches/objecthierarchy/src/network/ClientConnection.cc
r2111 r2112 48 48 #include "util/Debug.h" 49 49 50 namespace network50 namespace orxonox 51 51 { 52 52 //static boost::thread_group network_threads; … … 72 72 bool ClientConnection::waitEstablished(int milisec) { 73 73 for(int i=0; i<=milisec && !established; i++) 74 orxonox::msleep(1);74 msleep(1); 75 75 76 76 return established; … … 184 184 case ENET_EVENT_TYPE_NONE: 185 185 //receiverThread_->yield(); 186 orxonox::msleep(1);186 msleep(1); 187 187 break; 188 188 } -
code/branches/objecthierarchy/src/network/ClientConnection.h
r1953 r2112 50 50 namespace boost { class thread; } 51 51 52 namespace network52 namespace orxonox 53 53 { 54 54 -
code/branches/objecthierarchy/src/network/ClientConnectionListener.cc
r1949 r2112 3 3 #include "core/Core.h" 4 4 5 namespace network{5 namespace orxonox{ 6 6 7 7 ClientConnectionListener::ClientConnectionListener() … … 11 11 12 12 void ClientConnectionListener::getConnectedClients(){ 13 if( orxonox::Core::showsGraphics())13 if(Core::showsGraphics()) 14 14 this->clientConnected(0); //server client id 15 15 ClientInformation *client = ClientInformation::getBegin(); -
code/branches/objecthierarchy/src/network/ClientConnectionListener.h
r1940 r2112 6 6 #include "core/OrxonoxClass.h" 7 7 8 namespace network{8 namespace orxonox{ 9 9 10 class _NetworkExport ClientConnectionListener : virtual public orxonox::OrxonoxClass10 class _NetworkExport ClientConnectionListener : virtual public OrxonoxClass 11 11 { 12 12 friend class Server; -
code/branches/objecthierarchy/src/network/ClientInformation.cc
r2009 r2112 43 43 #include <iostream> //debug 44 44 45 namespace network45 namespace orxonox 46 46 { 47 47 -
code/branches/objecthierarchy/src/network/ClientInformation.h
r2009 r2112 48 48 // WATCH OUT: THE CLIENTINFORMATION LIST IS NOT THREADSAFE ANYMORE 49 49 50 namespace network50 namespace orxonox 51 51 { 52 52 static const unsigned int GAMESTATEID_INITIAL = (unsigned int)-1; -
code/branches/objecthierarchy/src/network/ConnectionManager.cc
r2111 r2112 65 65 } 66 66 67 namespace network67 namespace orxonox 68 68 { 69 69 //boost::thread_group network_threads; … … 227 227 case ENET_EVENT_TYPE_NONE: 228 228 //receiverThread_->yield(); 229 orxonox::msleep(1);229 msleep(1); 230 230 break; 231 231 } … … 306 306 unsigned int network_id=0, failures=0; 307 307 std::string classname; 308 orxonox::Identifier *id;309 std::map<std::string, orxonox::Identifier*>::const_iterator it = orxonox::Factory::getFactoryMapBegin();310 while(it != orxonox::Factory::getFactoryMapEnd()){308 Identifier *id; 309 std::map<std::string, Identifier*>::const_iterator it = Factory::getFactoryMapBegin(); 310 while(it != Factory::getFactoryMapEnd()){ 311 311 id = (*it).second; 312 312 if(id == NULL) -
code/branches/objecthierarchy/src/network/ConnectionManager.h
r1953 r2112 59 59 } 60 60 61 namespace network61 namespace orxonox 62 62 { 63 63 const int NETWORK_PORT = 55556; -
code/branches/objecthierarchy/src/network/GamestateClient.cc
r2063 r2112 39 39 40 40 41 namespace network41 namespace orxonox 42 42 { 43 43 struct _NetworkExport GameStateItem{ … … 94 94 * @return iterator pointing to the next object in the list 95 95 */ 96 void GamestateClient::removeObject( orxonox::ObjectList<Synchronisable>::iterator &it) {97 orxonox::ObjectList<Synchronisable>::iterator temp=it;96 void GamestateClient::removeObject(ObjectList<Synchronisable>::iterator &it) { 97 ObjectList<Synchronisable>::iterator temp=it; 98 98 ++it; 99 99 delete *temp; -
code/branches/objecthierarchy/src/network/GamestateClient.h
r2006 r2112 50 50 const unsigned int GAMESTATEID_INITIAL = (unsigned int)-1; 51 51 52 namespace network52 namespace orxonox 53 53 { 54 54 class _NetworkExport GamestateClient: public GamestateHandler … … 66 66 private: 67 67 packet::Gamestate *processGamestate(packet::Gamestate *gs); 68 void removeObject( orxonox::ObjectListIterator<Synchronisable> &it);68 void removeObject(ObjectListIterator<Synchronisable> &it); 69 69 void printGamestateMap(); 70 70 bool sendAck(unsigned int gamestateID); -
code/branches/objecthierarchy/src/network/GamestateHandler.cc
r1763 r2112 4 4 #include "packet/Packet.h" 5 5 6 namespace network{6 namespace orxonox { 7 7 8 8 GamestateHandler *GamestateHandler::instance_=0; … … 22 22 23 23 24 }//namespace network24 }//namespace orxonox -
code/branches/objecthierarchy/src/network/GamestateHandler.h
r1990 r2112 34 34 #include "packet/Chat.h" 35 35 36 namespace network{36 namespace orxonox { 37 37 38 38 /** -
code/branches/objecthierarchy/src/network/GamestateManager.cc
r2035 r2112 51 51 #include "Synchronisable.h" 52 52 53 namespace network53 namespace orxonox 54 54 { 55 55 GamestateManager::GamestateManager() { -
code/branches/objecthierarchy/src/network/GamestateManager.h
r1990 r2112 47 47 #include "packet/Gamestate.h" 48 48 49 namespace network49 namespace orxonox 50 50 { 51 51 -
code/branches/objecthierarchy/src/network/Host.cc
r1953 r2112 34 34 #include "ChatListener.h" 35 35 36 namespace network{36 namespace orxonox { 37 37 38 38 SetConsoleCommandShortcut(Host, Chat); … … 80 80 // } 81 81 82 // bool Host::receiveChat( network::packet::Chat *message, unsigned int clientID){82 // bool Host::receiveChat(packet::Chat *message, unsigned int clientID){ 83 83 // if(instance_) 84 84 // return instance_->processChat(message, clientID); … … 110 110 111 111 bool Host::incomingChat(const std::string& message, unsigned int playerID){ 112 for ( orxonox::ObjectList<ChatListener>::iterator it = orxonox::ObjectList<ChatListener>::begin(); it != orxonox::ObjectList<ChatListener>::end(); ++it)112 for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it) 113 113 it->incomingChat(message, playerID); 114 114 … … 116 116 } 117 117 118 }//namespace network118 }//namespace orxonox -
code/branches/objecthierarchy/src/network/Host.h
r1953 r2112 34 34 #include "packet/Chat.h" 35 35 36 namespace network{36 namespace orxonox { 37 37 38 38 /** -
code/branches/objecthierarchy/src/network/NetworkCallback.h
r1947 r2112 4 4 #include "NetworkPrereqs.h" 5 5 6 namespace network{6 namespace orxonox{ 7 7 class _NetworkExport NetworkCallbackBase 8 8 { -
code/branches/objecthierarchy/src/network/NetworkPrereqs.h
r1938 r2112 59 59 // Forward declarations 60 60 //----------------------------------------------------------------------- 61 namespace network61 namespace orxonox 62 62 { 63 63 class Client; -
code/branches/objecthierarchy/src/network/PacketBuffer.cc
r1505 r2112 39 39 #include <boost/thread/mutex.hpp> 40 40 41 namespace network41 namespace orxonox 42 42 { 43 43 boost::recursive_mutex PacketBuffer::mutex_; … … 147 147 } 148 148 149 } // namespace network149 } // namespace orxonox -
code/branches/objecthierarchy/src/network/PacketBuffer.h
r1916 r2112 47 47 #include <boost/thread/recursive_mutex.hpp> 48 48 49 namespace network49 namespace orxonox 50 50 { 51 51 struct _NetworkExport PacketEnvelope{ -
code/branches/objecthierarchy/src/network/Server.cc
r2048 r2112 60 60 #include "ChatListener.h" 61 61 62 namespace network62 namespace orxonox 63 63 { 64 64 const unsigned int MAX_FAILURES = 20; … … 317 317 318 318 // inform all the listeners 319 orxonox::ObjectList<ClientConnectionListener>::iterator listener = orxonox::ObjectList<ClientConnectionListener>::begin();319 ObjectList<ClientConnectionListener>::iterator listener = ObjectList<ClientConnectionListener>::begin(); 320 320 while(listener){ 321 321 listener->clientConnected(newid); … … 366 366 367 367 // inform all the listeners 368 orxonox::ObjectList<ClientConnectionListener>::iterator listener = orxonox::ObjectList<ClientConnectionListener>::begin();368 ObjectList<ClientConnectionListener>::iterator listener = ObjectList<ClientConnectionListener>::begin(); 369 369 while(listener){ 370 370 listener->clientDisconnected(client->getID()); … … 404 404 } 405 405 // COUT(1) << "Player " << Host::getPlayerID() << ": " << message << std::endl; 406 for ( orxonox::ObjectList<ChatListener>::iterator it = orxonox::ObjectList<ChatListener>::begin(); it != orxonox::ObjectList<ChatListener>::end(); ++it)406 for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it) 407 407 it->incomingChat(message, clientID); 408 408 -
code/branches/objecthierarchy/src/network/Server.h
r2009 r2112 49 49 #include "GamestateManager.h" 50 50 51 namespace network51 namespace orxonox 52 52 { 53 53 const int CLIENTID_SERVER = 0; -
code/branches/objecthierarchy/src/network/Synchronisable.cc
r2062 r2112 50 50 // #include "core/Identifier.h" 51 51 52 namespace network52 namespace orxonox 53 53 { 54 54 … … 63 63 * Initializes all Variables and sets the right objectID 64 64 */ 65 Synchronisable::Synchronisable( orxonox::BaseObject* creator){65 Synchronisable::Synchronisable(BaseObject* creator){ 66 66 RegisterRootObject(Synchronisable); 67 67 static uint32_t idCounter=0; … … 96 96 Synchronisable::~Synchronisable(){ 97 97 // delete callback function objects 98 if(! orxonox::Identifier::isCreatingHierarchy()){98 if(!Identifier::isCreatingHierarchy()){ 99 99 for(std::list<synchronisableVariable *>::iterator it = syncList->begin(); it!=syncList->end(); it++) 100 100 delete (*it)->callback; … … 155 155 COUT(4) << "fabricating object with id: " << header->objectID << std::endl; 156 156 157 orxonox::Identifier* id = ClassByID(header->classID);157 Identifier* id = ClassByID(header->classID); 158 158 assert(id); 159 orxonox::BaseObject* creator = 0;159 BaseObject* creator = 0; 160 160 if (header->creatorID != OBJECTID_UNKNOWN) 161 161 { … … 167 167 } 168 168 else 169 creator = dynamic_cast< orxonox::BaseObject*>(synchronisable_creator);170 } 171 orxonox::BaseObject *bo = id->fabricate(creator);169 creator = dynamic_cast<BaseObject*>(synchronisable_creator); 170 } 171 BaseObject *bo = id->fabricate(creator); 172 172 assert(bo); 173 173 Synchronisable *no = dynamic_cast<Synchronisable *>(bo); … … 214 214 */ 215 215 Synchronisable* Synchronisable::getSynchronisable(unsigned int objectID){ 216 orxonox::ObjectList<Synchronisable>::iterator it;217 for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it){216 ObjectList<Synchronisable>::iterator it; 217 for(it = ObjectList<Synchronisable>::begin(); it; ++it){ 218 218 if( it->getObjectID()==objectID ) 219 219 return *it; … … 234 234 * @param var pointer to the variable 235 235 * @param size size of the datatype the variable consists of 236 * @param t the type of the variable ( network::DATA or network::STRING236 * @param t the type of the variable (DATA or STRING 237 237 * @param mode same as in getData 238 238 * @param cb callback object that should get called, if the value of the variable changes -
code/branches/objecthierarchy/src/network/Synchronisable.h
r2034 r2112 42 42 43 43 #define REGISTERDATA(varname, ...) \ 44 registerVar((void*)&varname, sizeof(varname), network::DATA, __VA_ARGS__)44 registerVar((void*)&varname, sizeof(varname), DATA, __VA_ARGS__) 45 45 #define REGISTERSTRING(stringname, ...) \ 46 registerVar(&stringname, stringname.length()+1, network::STRING, __VA_ARGS__)46 registerVar(&stringname, stringname.length()+1, STRING, __VA_ARGS__) 47 47 48 namespace network48 namespace orxonox 49 49 { 50 50 static const unsigned int OBJECTID_UNKNOWN = (unsigned int)-1; … … 95 95 * @author Oliver Scheuss 96 96 */ 97 class _NetworkExport Synchronisable : virtual public orxonox::OrxonoxClass{97 class _NetworkExport Synchronisable : virtual public OrxonoxClass{ 98 98 public: 99 99 friend class packet::Gamestate; … … 115 115 inline unsigned int getClassID(){return classID;} 116 116 protected: 117 Synchronisable( orxonox::BaseObject* creator);117 Synchronisable(BaseObject* creator); 118 118 void registerVar(void *var, int size, variableType t, int mode=1, NetworkCallbackBase *cb=0); 119 119 void setObjectMode(int mode); -
code/branches/objecthierarchy/src/network/packet/Acknowledgement.cc
r1907 r2112 33 33 #include "core/CoreIncludes.h" 34 34 35 namespace network{35 namespace orxonox { 36 36 namespace packet { 37 37 38 38 #define PACKET_FLAGS_ACK 0 39 39 #define _PACKETID 0 40 #define _ACKID _PACKETID + sizeof( network::packet::ENUM::Type)40 #define _ACKID _PACKETID + sizeof(packet::ENUM::Type) 41 41 42 42 Acknowledgement::Acknowledgement( unsigned int id, unsigned int clientID ) … … 74 74 75 75 } //namespace packet 76 } //namespace network76 } //namespace orxonox -
code/branches/objecthierarchy/src/network/packet/Acknowledgement.h
r1916 r2112 33 33 34 34 35 namespace network{35 namespace orxonox { 36 36 namespace packet { 37 37 /** … … 53 53 54 54 } //namespace packet 55 } //namespace network55 } //namespace orxonox 56 56 57 57 #endif -
code/branches/objecthierarchy/src/network/packet/Chat.cc
r1907 r2112 31 31 #include "network/Host.h" 32 32 33 namespace network{33 namespace orxonox { 34 34 namespace packet { 35 35 … … 77 77 78 78 } //namespace packet 79 } //namespace network79 } //namespace orxonox -
code/branches/objecthierarchy/src/network/packet/Chat.h
r1916 r2112 10 10 #include "Packet.h" 11 11 12 namespace network{12 namespace orxonox { 13 13 namespace packet { 14 14 /** … … 33 33 34 34 } //namespace packet 35 } //namespace network35 } //namespace orxonox 36 36 37 37 #endif -
code/branches/objecthierarchy/src/network/packet/ClassID.cc
r1907 r2112 34 34 #include <assert.h> 35 35 36 namespace network{36 namespace orxonox { 37 37 namespace packet { 38 38 … … 68 68 69 69 unsigned int ClassID::getSize() const{ 70 return sizeof( network::packet::ENUM::Type) + 2*sizeof(uint32_t) + classNameLength_;70 return sizeof(packet::ENUM::Type) + 2*sizeof(uint32_t) + classNameLength_; 71 71 } 72 72 73 73 bool ClassID::process(){ 74 74 COUT(3) << "processing classid: " << getClassID() << " name: " << (const char*)(data_+_CLASSNAME) << std::endl; 75 orxonox::Identifier *id=ClassByID( std::string((const char*)(data_+_CLASSNAME) ));75 Identifier *id=ClassByID( std::string((const char*)(data_+_CLASSNAME) )); 76 76 if(id==NULL) 77 77 return false; … … 86 86 87 87 } //namespace packet 88 }//namespace network88 }//namespace orxonox -
code/branches/objecthierarchy/src/network/packet/ClassID.h
r1916 r2112 35 35 #include "Packet.h" 36 36 37 namespace network{37 namespace orxonox { 38 38 namespace packet { 39 39 … … 59 59 60 60 } //namespace packet 61 } //namespace network61 } //namespace orxonox 62 62 63 63 #endif -
code/branches/objecthierarchy/src/network/packet/DeleteObjects.cc
r1907 r2112 34 34 #include <assert.h> 35 35 36 namespace network{36 namespace orxonox { 37 37 namespace packet { 38 38 … … 95 95 96 96 } //namespace packet 97 } //namespace network97 } //namespace orxonox -
code/branches/objecthierarchy/src/network/packet/DeleteObjects.h
r1916 r2112 34 34 35 35 36 namespace network{36 namespace orxonox { 37 37 namespace packet { 38 38 /** … … 55 55 56 56 } //namespace packet 57 } //namespace network57 } //namespace orxonox 58 58 59 59 #endif -
code/branches/objecthierarchy/src/network/packet/Gamestate.cc
r2111 r2112 38 38 39 39 40 namespace network{40 namespace orxonox { 41 41 42 42 namespace packet { … … 93 93 uint8_t *mem=data_; 94 94 mem+=sizeof(GamestateHeader); 95 orxonox::ObjectList<Synchronisable>::iterator it;96 for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it){95 ObjectList<Synchronisable>::iterator it; 96 for(it = ObjectList<Synchronisable>::begin(); it; ++it){ 97 97 tempsize=it->getSize(id, mode); 98 98 … … 100 100 // start allocate additional memory 101 101 COUT(3) << "G.St.Man: need additional memory" << std::endl; 102 orxonox::ObjectList<Synchronisable>::iterator temp = it;102 ObjectList<Synchronisable>::iterator temp = it; 103 103 int addsize=tempsize; 104 104 while(++temp) … … 147 147 uint8_t *mem=data_+sizeof(GamestateHeader); 148 148 // get the start of the Synchronisable list 149 // orxonox::ObjectList<Synchronisable>::iterator it=orxonox::ObjectList<Synchronisable>::begin();149 //ObjectList<Synchronisable>::iterator it=ObjectList<Synchronisable>::begin(); 150 150 Synchronisable *s; 151 151 … … 244 244 //copy and modify header 245 245 #ifndef NDEBUG 246 HEADER->crc32 = orxonox::calcCRC(data_+sizeof(GamestateHeader), HEADER->datasize);246 HEADER->crc32 = calcCRC(data_+sizeof(GamestateHeader), HEADER->datasize); 247 247 #endif 248 248 *GAMESTATE_HEADER(ndata) = *HEADER; … … 281 281 } 282 282 #ifndef NDEBUG 283 assert(HEADER->crc32== orxonox::calcCRC(ndata+sizeof(GamestateHeader), HEADER->datasize));283 assert(HEADER->crc32==calcCRC(ndata+sizeof(GamestateHeader), HEADER->datasize)); 284 284 #endif 285 285 … … 569 569 int size=0; 570 570 // get the start of the Synchronisable list 571 orxonox::ObjectList<Synchronisable>::iterator it;571 ObjectList<Synchronisable>::iterator it; 572 572 // get total size of gamestate 573 for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it)573 for(it = ObjectList<Synchronisable>::begin(); it; ++it) 574 574 size+=it->getSize(id, mode); // size of the actual data of the synchronisable 575 575 // size+=sizeof(GamestateHeader); … … 582 582 * @return iterator pointing to the next object in the list 583 583 */ 584 void Gamestate::removeObject( orxonox::ObjectList<Synchronisable>::iterator &it) {585 orxonox::ObjectList<Synchronisable>::iterator temp=it;584 void Gamestate::removeObject(ObjectList<Synchronisable>::iterator &it) { 585 ObjectList<Synchronisable>::iterator temp=it; 586 586 ++it; 587 587 delete *temp; -
code/branches/objecthierarchy/src/network/packet/Gamestate.h
r1916 r2112 40 40 #endif 41 41 42 namespace network{42 namespace orxonox { 43 43 44 44 namespace packet { … … 91 91 private: 92 92 unsigned int calcGamestateSize(unsigned int id, int mode=0x0); 93 void removeObject( orxonox::ObjectListIterator<Synchronisable> &it);93 void removeObject(ObjectListIterator<Synchronisable> &it); 94 94 std::map<unsigned int, Synchronisable*> dataMap_; 95 95 }; -
code/branches/objecthierarchy/src/network/packet/Packet.cc
r2084 r2112 46 46 #include "core/CoreIncludes.h" 47 47 48 namespace network{48 namespace orxonox{ 49 49 50 50 namespace packet{ … … 153 153 // ENetPacket *temp = enetPacket_; 154 154 // enetPacket_ = 0; // otherwise we have a double free because enet already handles the deallocation of the packet 155 network::Host::addPacket( enetPacket_, clientID_);155 Host::addPacket( enetPacket_, clientID_); 156 156 return true; 157 157 } … … 219 219 } // namespace packet 220 220 221 } // namespace network222 221 } // namespace orxonox 222 -
code/branches/objecthierarchy/src/network/packet/Packet.h
r2070 r2112 36 36 #include "util/Integers.h" 37 37 38 namespace network{38 namespace orxonox { 39 39 40 40 namespace packet{ … … 98 98 } //namespace packet 99 99 100 } //namespace network100 } //namespace orxonox 101 101 102 102 #endif -
code/branches/objecthierarchy/src/network/packet/Welcome.cc
r1907 r2112 36 36 #include <assert.h> 37 37 38 namespace network{38 namespace orxonox { 39 39 namespace packet { 40 40 … … 70 70 71 71 unsigned int Welcome::getSize() const{ 72 return sizeof( network::packet::ENUM::Type) + 2*sizeof(uint32_t);72 return sizeof(packet::ENUM::Type) + 2*sizeof(uint32_t); 73 73 } 74 74 … … 87 87 88 88 } //namespace packet 89 }//namespace network89 }//namespace orxonox -
code/branches/objecthierarchy/src/network/packet/Welcome.h
r1916 r2112 33 33 #include "Packet.h" 34 34 35 namespace network{35 namespace orxonox { 36 36 namespace packet { 37 37 … … 54 54 55 55 } //namespace packet 56 } //namespace network56 } //namespace orxonox 57 57 58 58 #endif -
code/branches/objecthierarchy/src/orxonox/LevelManager.h
r2072 r2112 40 40 namespace orxonox 41 41 { 42 class _OrxonoxExport LevelManager : public network::ClientConnectionListener42 class _OrxonoxExport LevelManager : public ClientConnectionListener 43 43 { 44 44 public: -
code/branches/objecthierarchy/src/orxonox/gamestates/GSClient.cc
r2023 r2112 53 53 Core::setIsClient(true); 54 54 55 this->client_ = new network::Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port"));55 this->client_ = new Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port")); 56 56 57 57 if(!client_->establishConnection()) -
code/branches/objecthierarchy/src/orxonox/gamestates/GSClient.h
r2023 r2112 49 49 void ticked(const Clock& time); 50 50 51 network::Client* client_;51 Client* client_; 52 52 }; 53 53 } -
code/branches/objecthierarchy/src/orxonox/gamestates/GSDedicated.cc
r2023 r2112 50 50 Core::setHasServer(true); 51 51 52 this->server_ = new network::Server(CommandLine::getValue("port"));52 this->server_ = new Server(CommandLine::getValue("port")); 53 53 COUT(0) << "Loading scene in server mode" << std::endl; 54 54 -
code/branches/objecthierarchy/src/orxonox/gamestates/GSDedicated.h
r2023 r2112 48 48 void ticked(const Clock& time); 49 49 50 network::Server* server_;50 Server* server_; 51 51 }; 52 52 } -
code/branches/objecthierarchy/src/orxonox/gamestates/GSServer.cc
r2023 r2112 52 52 Core::setHasServer(true); 53 53 54 this->server_ = new network::Server(CommandLine::getValue("port"));54 this->server_ = new Server(CommandLine::getValue("port")); 55 55 COUT(0) << "Loading scene in server mode" << std::endl; 56 56 -
code/branches/objecthierarchy/src/orxonox/gamestates/GSServer.h
r2023 r2112 48 48 void ticked(const Clock& time); 49 49 50 network::Server* server_;50 Server* server_; 51 51 }; 52 52 } -
code/branches/objecthierarchy/src/orxonox/objects/Scene.cc
r2072 r2112 43 43 CreateFactory(Scene); 44 44 45 Scene::Scene(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)45 Scene::Scene(BaseObject* creator) : BaseObject(creator), Synchronisable(creator) 46 46 { 47 47 RegisterObject(Scene); … … 114 114 void Scene::registerVariables() 115 115 { 116 REGISTERSTRING(this->skybox_, network::direction::toclient, new network::NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));117 REGISTERDATA(this->ambientLight_, network::direction::toclient, new network::NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));116 REGISTERSTRING(this->skybox_, direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox)); 117 REGISTERDATA(this->ambientLight_, direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight)); 118 118 } 119 119 -
code/branches/objecthierarchy/src/orxonox/objects/Scene.h
r2072 r2112 38 38 namespace orxonox 39 39 { 40 class _OrxonoxExport Scene : public BaseObject, public network::Synchronisable40 class _OrxonoxExport Scene : public BaseObject, public Synchronisable 41 41 { 42 42 public: -
code/branches/objecthierarchy/src/orxonox/objects/Test.cc
r2034 r2112 36 36 CreateFactory ( Test ); 37 37 38 Test::Test(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)38 Test::Test(BaseObject* creator) : BaseObject(creator), Synchronisable(creator) 39 39 { 40 40 RegisterObject ( Test ); … … 59 59 void Test::registerVariables() 60 60 { 61 REGISTERDATA ( v1, network::direction::toclient, new network::NetworkCallback<Test> ( this, &Test::checkV1 ) );62 REGISTERDATA ( v2, network::direction::toserver, new network::NetworkCallback<Test> ( this, &Test::checkV2 ) );63 REGISTERDATA ( v3, network::direction::bidirectional, new network::NetworkCallback<Test> ( this, &Test::checkV3 ) );61 REGISTERDATA ( v1,direction::toclient, new NetworkCallback<Test> ( this, &Test::checkV1 ) ); 62 REGISTERDATA ( v2,direction::toserver, new NetworkCallback<Test> ( this, &Test::checkV2 ) ); 63 REGISTERDATA ( v3,direction::bidirectional, new NetworkCallback<Test> ( this, &Test::checkV3 ) ); 64 64 } 65 65 -
code/branches/objecthierarchy/src/orxonox/objects/Test.h
r2019 r2112 36 36 namespace orxonox 37 37 { 38 class _OrxonoxExport Test: public BaseObject, public network::Synchronisable38 class _OrxonoxExport Test: public BaseObject, public Synchronisable 39 39 { 40 40 public: -
code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.cc
r2086 r2112 92 92 std::string message = player->getName() + " entered the game"; 93 93 COUT(0) << message << std::endl; 94 network::Host::Broadcast(message);94 Host::Broadcast(message); 95 95 } 96 96 … … 104 104 std::string message = player->getName() + " left the game"; 105 105 COUT(0) << message << std::endl; 106 network::Host::Broadcast(message);106 Host::Broadcast(message); 107 107 } 108 108 } … … 124 124 std::string message = player->getOldName() + " changed name to " + player->getName(); 125 125 COUT(0) << message << std::endl; 126 network::Host::Broadcast(message);126 Host::Broadcast(message); 127 127 } 128 128 } -
code/branches/objecthierarchy/src/orxonox/objects/infos/HumanPlayer.cc
r2072 r2112 67 67 void HumanPlayer::registerVariables() 68 68 { 69 REGISTERSTRING(this->synchronize_nick_, network::direction::toserver, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));69 REGISTERSTRING(this->synchronize_nick_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick)); 70 70 71 REGISTERDATA(this->clientID_, network::direction::toclient, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));72 REGISTERDATA(this->server_ready_, network::direction::toclient, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_ready));73 REGISTERDATA(this->client_ready_, network::direction::toserver, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_ready));71 REGISTERDATA(this->clientID_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged)); 72 REGISTERDATA(this->server_ready_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_ready)); 73 REGISTERDATA(this->client_ready_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_ready)); 74 74 } 75 75 … … 92 92 void HumanPlayer::networkcallback_clientIDchanged() 93 93 { 94 if (this->clientID_ == network::Host::getPlayerID())94 if (this->clientID_ == Host::getPlayerID()) 95 95 { 96 96 this->bLocalPlayer_ = true; … … 99 99 100 100 if (!Core::isMaster()) 101 this->setObjectMode( network::direction::bidirectional);101 this->setObjectMode(direction::bidirectional); 102 102 else 103 103 this->setName(this->nick_); … … 125 125 float HumanPlayer::getPing() const 126 126 { 127 return network::ClientInformation::findClient(this->getClientID())->getRTT();127 return ClientInformation::findClient(this->getClientID())->getRTT(); 128 128 } 129 129 130 130 float HumanPlayer::getPacketLossRatio() const 131 131 { 132 return network::ClientInformation::findClient(this->getClientID())->getPacketLoss();132 return ClientInformation::findClient(this->getClientID())->getPacketLoss(); 133 133 } 134 134 -
code/branches/objecthierarchy/src/orxonox/objects/infos/Info.cc
r2072 r2112 34 34 namespace orxonox 35 35 { 36 Info::Info(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)36 Info::Info(BaseObject* creator) : BaseObject(creator), Synchronisable(creator) 37 37 { 38 38 RegisterObject(Info); -
code/branches/objecthierarchy/src/orxonox/objects/infos/Info.h
r2072 r2112 37 37 namespace orxonox 38 38 { 39 class _OrxonoxExport Info : public BaseObject, public network::Synchronisable39 class _OrxonoxExport Info : public BaseObject, public Synchronisable 40 40 { 41 41 public: -
code/branches/objecthierarchy/src/orxonox/objects/infos/Level.cc
r2086 r2112 81 81 void Level::registerVariables() 82 82 { 83 REGISTERSTRING(this->xmlfilename_, network::direction::toclient, new network::NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));84 REGISTERSTRING(this->name_, network::direction::toclient, new network::NetworkCallback<Level>(this, &Level::changedName));85 REGISTERSTRING(this->description_, network::direction::toclient);83 REGISTERSTRING(this->xmlfilename_, direction::toclient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile)); 84 REGISTERSTRING(this->name_, direction::toclient, new NetworkCallback<Level>(this, &Level::changedName)); 85 REGISTERSTRING(this->description_, direction::toclient); 86 86 } 87 87 -
code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc
r2072 r2112 42 42 RegisterObject(PlayerInfo); 43 43 44 this->clientID_ = network::CLIENTID_UNKNOWN;44 this->clientID_ = CLIENTID_UNKNOWN; 45 45 this->bHumanPlayer_ = false; 46 46 this->bLocalPlayer_ = false; … … 48 48 this->controller_ = 0; 49 49 this->controllableEntity_ = 0; 50 this->controllableEntityID_ = network::CLIENTID_UNKNOWN;50 this->controllableEntityID_ = CLIENTID_UNKNOWN; 51 51 52 52 this->registerVariables(); … … 69 69 void PlayerInfo::registerVariables() 70 70 { 71 REGISTERSTRING(this->name_, network::direction::toclient, new network::NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));72 REGISTERDATA (this->controllableEntityID_, network::direction::toclient, new network::NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));73 REGISTERDATA (this->bReadyToSpawn_, network::direction::toserver);71 REGISTERSTRING(this->name_, direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName)); 72 REGISTERDATA (this->controllableEntityID_, direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID)); 73 REGISTERDATA (this->bReadyToSpawn_, direction::toserver); 74 74 } 75 75 … … 126 126 else 127 127 { 128 this->controllableEntityID_ = network::OBJECTID_UNKNOWN;128 this->controllableEntityID_ = OBJECTID_UNKNOWN; 129 129 } 130 130 … … 138 138 { 139 139 this->controllableEntity_ = 0; 140 this->controllableEntityID_ = network::OBJECTID_UNKNOWN;140 this->controllableEntityID_ = OBJECTID_UNKNOWN; 141 141 142 142 if (this->controller_) … … 150 150 void PlayerInfo::networkcallback_changedcontrollableentityID() 151 151 { 152 if (this->controllableEntityID_ != network::OBJECTID_UNKNOWN)152 if (this->controllableEntityID_ != OBJECTID_UNKNOWN) 153 153 { 154 154 Synchronisable* temp = Synchronisable::getSynchronisable(this->controllableEntityID_); -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/Billboard.cc
r2072 r2112 64 64 void Billboard::registerVariables() 65 65 { 66 REGISTERSTRING(this->material_, network::direction::toclient, new network::NetworkCallback<Billboard>(this, &Billboard::changedMaterial));67 REGISTERDATA (this->colour_, network::direction::toclient, new network::NetworkCallback<Billboard>(this, &Billboard::changedColour));66 REGISTERSTRING(this->material_, direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial)); 67 REGISTERDATA (this->colour_, direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour)); 68 68 } 69 69 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/BlinkingBillboard.cc
r2072 r2112 68 68 void BlinkingBillboard::registerVariables() 69 69 { 70 // REGISTERDATA(this->amplitude_, network::direction::toclient);71 // REGISTERDATA(this->frequency_, network::direction::toclient);72 // REGISTERDATA(this->phase_, network::direction::toclient);70 // REGISTERDATA(this->amplitude_, direction::toclient); 71 // REGISTERDATA(this->frequency_, direction::toclient); 72 // REGISTERDATA(this->phase_, direction::toclient); 73 73 } 74 74 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.cc
r2086 r2112 52 52 this->client_overwrite_ = 0; 53 53 this->player_ = 0; 54 this->playerID_ = network::OBJECTID_UNKNOWN;54 this->playerID_ = OBJECTID_UNKNOWN; 55 55 this->hud_ = 0; 56 56 this->camera_ = 0; … … 165 165 this->client_overwrite_ = this->server_overwrite_; 166 166 COUT(0) << "CE: bidirectional synchronization" << std::endl; 167 this->setObjectMode( network::direction::bidirectional);167 this->setObjectMode(direction::bidirectional); 168 168 } 169 169 } … … 176 176 177 177 this->player_ = 0; 178 this->playerID_ = network::OBJECTID_UNKNOWN;178 this->playerID_ = OBJECTID_UNKNOWN; 179 179 this->bControlled_ = false; 180 this->setObjectMode( network::direction::toclient);180 this->setObjectMode(direction::toclient); 181 181 182 182 if (this->bDestroyWhenPlayerLeft_) … … 187 187 { 188 188 // just do this in case the entity wasn't yet synchronized when the corresponding PlayerInfo got our objectID 189 if (this->playerID_ != network::OBJECTID_UNKNOWN)190 { 191 this->player_ = dynamic_cast<PlayerInfo*>( network::Synchronisable::getSynchronisable(this->playerID_));189 if (this->playerID_ != OBJECTID_UNKNOWN) 190 { 191 this->player_ = dynamic_cast<PlayerInfo*>(Synchronisable::getSynchronisable(this->playerID_)); 192 192 if (this->player_ && (this->player_->getControllableEntity() != this)) 193 193 this->player_->startControl(this); … … 248 248 void ControllableEntity::registerVariables() 249 249 { 250 REGISTERSTRING(this->cameraPositionTemplate_, network::direction::toclient);251 252 REGISTERDATA(this->server_position_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));253 REGISTERDATA(this->server_velocity_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity));254 REGISTERDATA(this->server_orientation_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));255 256 REGISTERDATA(this->server_overwrite_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));257 REGISTERDATA(this->client_overwrite_, network::direction::toserver);258 259 REGISTERDATA(this->client_position_, network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));260 REGISTERDATA(this->client_velocity_, network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity));261 REGISTERDATA(this->client_orientation_, network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));262 263 264 REGISTERDATA(this->playerID_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));250 REGISTERSTRING(this->cameraPositionTemplate_, direction::toclient); 251 252 REGISTERDATA(this->server_position_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition)); 253 REGISTERDATA(this->server_velocity_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity)); 254 REGISTERDATA(this->server_orientation_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation)); 255 256 REGISTERDATA(this->server_overwrite_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite)); 257 REGISTERDATA(this->client_overwrite_, direction::toserver); 258 259 REGISTERDATA(this->client_position_, direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition)); 260 REGISTERDATA(this->client_velocity_, direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity)); 261 REGISTERDATA(this->client_orientation_, direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation)); 262 263 264 REGISTERDATA(this->playerID_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID)); 265 265 } 266 266 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/Light.cc
r2072 r2112 79 79 void Light::registerVariables() 80 80 { 81 REGISTERDATA(this->type_, network::direction::toclient, new network::NetworkCallback<Light>(this, &Light::changedType));82 REGISTERDATA(this->light_->getDiffuseColour(), network::direction::toclient);83 REGISTERDATA(this->light_->getSpecularColour(), network::direction::toclient);84 REGISTERDATA(this->light_->getDirection(), network::direction::toclient);81 REGISTERDATA(this->type_, direction::toclient, new NetworkCallback<Light>(this, &Light::changedType)); 82 REGISTERDATA(this->light_->getDiffuseColour(), direction::toclient); 83 REGISTERDATA(this->light_->getSpecularColour(), direction::toclient); 84 REGISTERDATA(this->light_->getDirection(), direction::toclient); 85 85 } 86 86 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/Model.cc
r2072 r2112 61 61 void Model::registerVariables() 62 62 { 63 REGISTERSTRING(this->meshSrc_, network::direction::toclient, new network::NetworkCallback<Model>(this, &Model::changedMesh));64 REGISTERDATA(this->bCastShadows_, network::direction::toclient, new network::NetworkCallback<Model>(this, &Model::changedShadows));63 REGISTERSTRING(this->meshSrc_, direction::toclient, new NetworkCallback<Model>(this, &Model::changedMesh)); 64 REGISTERDATA(this->bCastShadows_, direction::toclient, new NetworkCallback<Model>(this, &Model::changedShadows)); 65 65 } 66 66 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/MovableEntity.cc
r2072 r2112 84 84 void MovableEntity::registerVariables() 85 85 { 86 REGISTERDATA(this->velocity_.x, network::direction::toclient);87 REGISTERDATA(this->velocity_.y, network::direction::toclient);88 REGISTERDATA(this->velocity_.z, network::direction::toclient);86 REGISTERDATA(this->velocity_.x, direction::toclient); 87 REGISTERDATA(this->velocity_.y, direction::toclient); 88 REGISTERDATA(this->velocity_.z, direction::toclient); 89 89 90 REGISTERDATA(this->rotationAxis_.x, network::direction::toclient);91 REGISTERDATA(this->rotationAxis_.y, network::direction::toclient);92 REGISTERDATA(this->rotationAxis_.z, network::direction::toclient);90 REGISTERDATA(this->rotationAxis_.x, direction::toclient); 91 REGISTERDATA(this->rotationAxis_.y, direction::toclient); 92 REGISTERDATA(this->rotationAxis_.z, direction::toclient); 93 93 94 REGISTERDATA(this->rotationRate_, network::direction::toclient);94 REGISTERDATA(this->rotationRate_, direction::toclient); 95 95 96 REGISTERDATA(this->overwrite_position_, network::direction::toclient, new network::NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));97 REGISTERDATA(this->overwrite_orientation_, network::direction::toclient, new network::NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));96 REGISTERDATA(this->overwrite_position_, direction::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition)); 97 REGISTERDATA(this->overwrite_orientation_, direction::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation)); 98 98 } 99 99 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/MovableEntity.h
r2072 r2112 38 38 namespace orxonox 39 39 { 40 class _OrxonoxExport MovableEntity : public WorldEntity, public Tickable, public network::ClientConnectionListener40 class _OrxonoxExport MovableEntity : public WorldEntity, public Tickable, public ClientConnectionListener 41 41 { 42 42 public: -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/ParticleEmitter.cc
r2072 r2112 74 74 void ParticleEmitter::registerVariables() 75 75 { 76 REGISTERSTRING(this->source_, network::direction::toclient, new network::NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));77 REGISTERDATA (this->LOD_, network::direction::toclient, new network::NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));76 REGISTERSTRING(this->source_, direction::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged)); 77 REGISTERDATA (this->LOD_, direction::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged)); 78 78 } 79 79 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/PositionableEntity.cc
r2072 r2112 48 48 void PositionableEntity::registerVariables() 49 49 { 50 REGISTERDATA(this->getPosition().x, network::direction::toclient);51 REGISTERDATA(this->getPosition().y, network::direction::toclient);52 REGISTERDATA(this->getPosition().z, network::direction::toclient);50 REGISTERDATA(this->getPosition().x, direction::toclient); 51 REGISTERDATA(this->getPosition().y, direction::toclient); 52 REGISTERDATA(this->getPosition().z, direction::toclient); 53 53 54 REGISTERDATA(this->getOrientation().w, network::direction::toclient);55 REGISTERDATA(this->getOrientation().x, network::direction::toclient);56 REGISTERDATA(this->getOrientation().y, network::direction::toclient);57 REGISTERDATA(this->getOrientation().z, network::direction::toclient);54 REGISTERDATA(this->getOrientation().w, direction::toclient); 55 REGISTERDATA(this->getOrientation().x, direction::toclient); 56 REGISTERDATA(this->getOrientation().y, direction::toclient); 57 REGISTERDATA(this->getOrientation().z, direction::toclient); 58 58 } 59 59 } -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/WorldEntity.cc
r2072 r2112 48 48 const Vector3 WorldEntity::UP = Vector3::UNIT_Y; 49 49 50 WorldEntity::WorldEntity(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)50 WorldEntity::WorldEntity(BaseObject* creator) : BaseObject(creator), Synchronisable(creator) 51 51 { 52 52 RegisterObject(WorldEntity); … … 95 95 void WorldEntity::registerVariables() 96 96 { 97 REGISTERDATA(this->bActive_, network::direction::toclient, new network::NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));98 REGISTERDATA(this->bVisible_, network::direction::toclient, new network::NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));97 REGISTERDATA(this->bActive_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity)); 98 REGISTERDATA(this->bVisible_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility)); 99 99 100 REGISTERDATA(this->getScale3D().x, network::direction::toclient);101 REGISTERDATA(this->getScale3D().y, network::direction::toclient);102 REGISTERDATA(this->getScale3D().z, network::direction::toclient);100 REGISTERDATA(this->getScale3D().x, direction::toclient); 101 REGISTERDATA(this->getScale3D().y, direction::toclient); 102 REGISTERDATA(this->getScale3D().z, direction::toclient); 103 103 104 REGISTERDATA(this->parentID_, network::direction::toclient, new network::NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent));104 REGISTERDATA(this->parentID_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent)); 105 105 } 106 106 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/WorldEntity.h
r2072 r2112 42 42 namespace orxonox 43 43 { 44 class _OrxonoxExport WorldEntity : public BaseObject, public network::Synchronisable44 class _OrxonoxExport WorldEntity : public BaseObject, public Synchronisable 45 45 { 46 46 public: -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2072 r2112 70 70 void Pawn::registerVariables() 71 71 { 72 REGISTERDATA(this->bAlive_, network::direction::toclient);73 REGISTERDATA(this->health_, network::direction::toclient);72 REGISTERDATA(this->bAlive_, direction::toclient); 73 REGISTERDATA(this->health_, direction::toclient); 74 74 } 75 75 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
r2072 r2112 82 82 void SpaceShip::registerVariables() 83 83 { 84 REGISTERDATA(this->maxSpeed_, network::direction::toclient);85 REGISTERDATA(this->maxSecondarySpeed_, network::direction::toclient);86 REGISTERDATA(this->maxRotation_, network::direction::toclient);87 REGISTERDATA(this->translationAcceleration_, network::direction::toclient);88 REGISTERDATA(this->rotationAcceleration_, network::direction::toclient);89 REGISTERDATA(this->translationDamping_, network::direction::toclient);84 REGISTERDATA(this->maxSpeed_, direction::toclient); 85 REGISTERDATA(this->maxSecondarySpeed_, direction::toclient); 86 REGISTERDATA(this->maxRotation_, direction::toclient); 87 REGISTERDATA(this->translationAcceleration_, direction::toclient); 88 REGISTERDATA(this->rotationAcceleration_, direction::toclient); 89 REGISTERDATA(this->translationDamping_, direction::toclient); 90 90 } 91 91 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.cc
r2072 r2112 84 84 void Spectator::registerVariables() 85 85 { 86 REGISTERDATA(this->bGreetingFlareVisible_, network::direction::toclient, new network::NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));87 REGISTERDATA(this->bGreeting_, network::direction::toserver, new network::NetworkCallback<Spectator>(this, &Spectator::changedGreeting));88 REGISTERDATA(this->hudmode_, network::direction::toclient);86 REGISTERDATA(this->bGreetingFlareVisible_, direction::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility)); 87 REGISTERDATA(this->bGreeting_, direction::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting)); 88 REGISTERDATA(this->hudmode_, direction::toclient); 89 89 } 90 90 … … 129 129 ControllableEntity::setPlayer(player); 130 130 131 // this->setObjectMode( network::direction::toclient);131 // this->setObjectMode(direction::toclient); 132 132 } 133 133 -
code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.cc
r2072 r2112 72 72 std::string text; 73 73 74 if (senderID != network::CLIENTID_UNKNOWN)74 if (senderID != CLIENTID_UNKNOWN) 75 75 { 76 76 std::string name = "unknown"; -
code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.h
r2072 r2112 39 39 namespace orxonox 40 40 { 41 class _OrxonoxExport ChatOverlay : public OverlayText, public network::ChatListener41 class _OrxonoxExport ChatOverlay : public OverlayText, public ChatListener 42 42 { 43 43 public:
Note: See TracChangeset
for help on using the changeset viewer.