Changeset 9869 in orxonox.OLD for trunk/src/lib/network/network_stream.cc
- Timestamp:
- Oct 3, 2006, 12:19:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/network/network_stream.cc
r9656 r9869 33 33 #include "shared_network_data.h" 34 34 #include "message_manager.h" 35 #include "p references.h"35 #include "parser/preferences/preferences.h" 36 36 #include "zip.h" 37 37 38 #include "src/lib/util/loading/resource_manager.h"39 40 38 #include "network_log.h" 41 39 42 40 #include "player_stats.h" 43 41 44 #include "lib/util/loading/factory.h" 42 #include "loading/factory.h" 43 #include "loading/resource_manager.h" 45 44 46 45 #include "debug.h" 47 #include "class_list.h"48 #include <algorithm>49 50 46 51 47 #include "network_stream.h" … … 57 53 #define PACKAGE_SIZE 256 58 54 59 55 ObjectListDefinition(NetworkStream); 60 56 /** 61 57 * empty constructor … … 118 114 { 119 115 /* set the class id for the base object */ 120 this-> setClassID(CL_NETWORK_STREAM, "NetworkStream");116 this->registerObject(this, NetworkStream::_objectList); 121 117 this->clientSocket = NULL; 122 118 this->clientSoftSocket = NULL; … … 970 966 971 967 // if handshake not finished only sync handshake 972 if ( peer->second.handshake && sync.getLeafClassID() != CL_HANDSHAKE)968 if ( peer->second.handshake && Handshake::staticClassID() != sync.getLeafClassID()) 973 969 continue; 974 970 … … 976 972 if ( ( SharedNetworkData::getInstance()->isMasterServer() || 977 973 SharedNetworkData::getInstance()->isProxyServerActive() && peer->second.isClient()) 978 && sync.getLeafClassID() == CL_HANDSHAKE&& sync.getUniqueID() != peer->second.userId )974 && Handshake::staticClassID() == sync.getLeafClassID() && sync.getUniqueID() != peer->second.userId ) 979 975 continue; 980 976 981 977 /* list of synchronizeables that will never be synchronized over the network: */ 982 978 // do not sync null parent 983 if ( sync.getLeafClassID() == CL_NULL_PARENT)979 if ( NullParent::staticClassID() == sync.getLeafClassID()) 984 980 continue; 985 981 … … 1190 1186 /* These are some small exeptions in creation: Not all objects can/should be created via Factory */ 1191 1187 /* Exception 1: NullParent */ 1192 if( leafClassId == CL_NULL_PARENT || leafClassId == CL_SYNCHRONIZEABLE || leafClassId == CL_NETWORK_GAME_MANAGER)1188 if( NullParent::staticClassID() == leafClassId || Synchronizeable::staticClassID() == leafClassId || NetworkGameManager::staticClassID() == leafClassId) 1193 1189 { 1194 1190 PRINTF(1)("Don't create Object with ID %x, ignored!\n", (int)leafClassId); … … 1197 1193 } 1198 1194 else 1199 b = Factory::fabricate( (ClassID)leafClassId );1195 ; /// FIXME CLASS_ID :: b = Factory::fabricate( leafClassId ); 1200 1196 1201 1197 if ( !b ) … … 1206 1202 } 1207 1203 1208 if ( b->isA(CL_SYNCHRONIZEABLE) )1204 if ( b->isA(Synchronizeable::staticClassID()) ) 1209 1205 { 1210 1206 sync = dynamic_cast<Synchronizeable*>(b); … … 1303 1299 length = remainingBytesToWriteToDict; 1304 1300 1305 std::string fileName = Resource Manager::getInstance()->getDataDir();1301 std::string fileName = Resources::ResourceManager::getInstance()->mainGlobalPath().name(); 1306 1302 fileName += "/dicts/newdict"; 1307 1303
Note: See TracChangeset
for help on using the changeset viewer.