Changeset 9691 in orxonox.OLD for branches/new_class_id/src/lib/network/network_stream.cc
- Timestamp:
- Aug 22, 2006, 11:45:21 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/network/network_stream.cc
r9690 r9691 45 45 46 46 #include "debug.h" 47 #include "class_list.h"48 #include <algorithm>49 50 47 51 48 #include "network_stream.h" … … 118 115 { 119 116 /* set the class id for the base object */ 120 this-> setClassID(CL_NETWORK_STREAM, "NetworkStream");117 this->registerObject(this, NetworkStream::_objectList); 121 118 this->clientSocket = NULL; 122 119 this->clientSoftSocket = NULL; … … 970 967 971 968 // if handshake not finished only sync handshake 972 if ( peer->second.handshake && sync.getLeafClassID() != CL_HANDSHAKE)969 if ( peer->second.handshake && Handshake::classID() != sync.getLeafClassID()) 973 970 continue; 974 971 … … 976 973 if ( ( SharedNetworkData::getInstance()->isMasterServer() || 977 974 SharedNetworkData::getInstance()->isProxyServerActive() && peer->second.isClient()) 978 && sync.getLeafClassID() == CL_HANDSHAKE&& sync.getUniqueID() != peer->second.userId )975 && Handshake::classID() == sync.getLeafClassID() && sync.getUniqueID() != peer->second.userId ) 979 976 continue; 980 977 981 978 /* list of synchronizeables that will never be synchronized over the network: */ 982 979 // do not sync null parent 983 if ( sync.getLeafClassID() == CL_NULL_PARENT)980 if ( NullParent::classID() == sync.getLeafClassID()) 984 981 continue; 985 982 … … 1190 1187 /* These are some small exeptions in creation: Not all objects can/should be created via Factory */ 1191 1188 /* Exception 1: NullParent */ 1192 if( leafClassId == CL_NULL_PARENT || leafClassId == CL_SYNCHRONIZEABLE || leafClassId == CL_NETWORK_GAME_MANAGER)1189 if( NullParent::classID() == leafClassId || Synchronizeable::classID() == leafClassId || NetworkGameManager::classID() == leafClassId) 1193 1190 { 1194 1191 PRINTF(1)("Don't create Object with ID %x, ignored!\n", (int)leafClassId); … … 1197 1194 } 1198 1195 else 1199 b = Factory::fabricate( (ClassID)leafClassId );1196 b = Factory::fabricate( leafClassId ); 1200 1197 1201 1198 if ( !b ) … … 1206 1203 } 1207 1204 1208 if ( b->isA(CL_SYNCHRONIZEABLE) )1205 if ( b->isA(Synchronizeable::classID()) ) 1209 1206 { 1210 1207 sync = dynamic_cast<Synchronizeable*>(b);
Note: See TracChangeset
for help on using the changeset viewer.