Changeset 9757 in orxonox.OLD for branches/new_class_id/src/lib/network
- Timestamp:
- Sep 18, 2006, 10:06:19 PM (18 years ago)
- Location:
- branches/new_class_id/src/lib/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/network/network_game_manager.cc
r9715 r9757 92 92 assert( SharedNetworkData::getInstance()->isMasterServer()); 93 93 assert( State::getGameRules() ); 94 assert( State::getGameRules()->isA( NetworkGameRules:: classID()) );94 assert( State::getGameRules()->isA( NetworkGameRules::staticClassID()) ); 95 95 96 96 NetworkGameRules & rules = *(dynamic_cast<NetworkGameRules*>(State::getGameRules())); … … 105 105 106 106 assert( bo != NULL ); 107 assert( bo->isA( Playable:: classID()) );107 assert( bo->isA( Playable::staticClassID()) ); 108 108 109 109 Playable & playable = *(dynamic_cast<Playable*>(bo)); … … 130 130 stats->setNickName( Preferences::getInstance()->getString( "multiplayer", "nickname", "Server" ) ); 131 131 132 if ( rules.isA( MultiplayerTeamDeathmatch:: classID()) )132 if ( rules.isA( MultiplayerTeamDeathmatch::staticClassID()) ) 133 133 dynamic_cast<MultiplayerTeamDeathmatch*>(&rules)->respawnPlayable( &playable, team, 0.0f ); 134 134 … … 192 192 if ( (*it)->getUniqueID() == uniqueId ) 193 193 { 194 if ( (*it)->isA(Playable:: classID()) )194 if ( (*it)->isA(Playable::staticClassID()) ) 195 195 { 196 196 getInstance()->playablesToDelete.push_back( dynamic_cast<Playable*>(*it) ); … … 321 321 322 322 assert( State::getGameRules() ); 323 assert( State::getGameRules()->isA( NetworkGameRules:: classID()) );323 assert( State::getGameRules()->isA( NetworkGameRules::staticClassID()) ); 324 324 325 325 NetworkGameRules & rules = *(dynamic_cast<NetworkGameRules*>(State::getGameRules())); -
branches/new_class_id/src/lib/network/network_stream.cc
r9716 r9757 967 967 968 968 // if handshake not finished only sync handshake 969 if ( peer->second.handshake && Handshake:: classID() != sync.getLeafClassID())969 if ( peer->second.handshake && Handshake::staticClassID() != sync.getLeafClassID()) 970 970 continue; 971 971 … … 973 973 if ( ( SharedNetworkData::getInstance()->isMasterServer() || 974 974 SharedNetworkData::getInstance()->isProxyServerActive() && peer->second.isClient()) 975 && Handshake:: classID() == sync.getLeafClassID() && sync.getUniqueID() != peer->second.userId )975 && Handshake::staticClassID() == sync.getLeafClassID() && sync.getUniqueID() != peer->second.userId ) 976 976 continue; 977 977 978 978 /* list of synchronizeables that will never be synchronized over the network: */ 979 979 // do not sync null parent 980 if ( NullParent:: classID() == sync.getLeafClassID())980 if ( NullParent::staticClassID() == sync.getLeafClassID()) 981 981 continue; 982 982 … … 1187 1187 /* These are some small exeptions in creation: Not all objects can/should be created via Factory */ 1188 1188 /* Exception 1: NullParent */ 1189 if( NullParent:: classID() == leafClassId || Synchronizeable::classID() == leafClassId || NetworkGameManager::classID() == leafClassId)1189 if( NullParent::staticClassID() == leafClassId || Synchronizeable::staticClassID() == leafClassId || NetworkGameManager::staticClassID() == leafClassId) 1190 1190 { 1191 1191 PRINTF(1)("Don't create Object with ID %x, ignored!\n", (int)leafClassId); … … 1203 1203 } 1204 1204 1205 if ( b->isA(Synchronizeable:: classID()) )1205 if ( b->isA(Synchronizeable::staticClassID()) ) 1206 1206 { 1207 1207 sync = dynamic_cast<Synchronizeable*>(b); -
branches/new_class_id/src/lib/network/synchronizeable.cc
r9715 r9757 75 75 // remove the message manager only by the server 76 76 if ( (SharedNetworkData::getInstance()->isMasterServer() ) 77 && this->beSynchronized() && this->getUniqueID() > 0 && !this->isA( MessageManager:: classID() ) )77 && this->beSynchronized() && this->getUniqueID() > 0 && !this->isA( MessageManager::staticClassID() ) ) 78 78 NetworkGameManager::getInstance()->removeSynchronizeable( this->getUniqueID() ); 79 79 }
Note: See TracChangeset
for help on using the changeset viewer.