Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9757 in orxonox.OLD for branches/new_class_id/src/lib/network


Ignore:
Timestamp:
Sep 18, 2006, 10:06:19 PM (18 years ago)
Author:
bensch
Message:

new_class_id: hups… this was bad naming… confusing too.

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  
    9292  assert( SharedNetworkData::getInstance()->isMasterServer());
    9393  assert( State::getGameRules() );
    94   assert( State::getGameRules()->isA( NetworkGameRules::classID()) );
     94  assert( State::getGameRules()->isA( NetworkGameRules::staticClassID()) );
    9595
    9696  NetworkGameRules & rules = *(dynamic_cast<NetworkGameRules*>(State::getGameRules()));
     
    105105
    106106  assert( bo != NULL );
    107   assert( bo->isA( Playable::classID()) );
     107  assert( bo->isA( Playable::staticClassID()) );
    108108
    109109  Playable & playable = *(dynamic_cast<Playable*>(bo));
     
    130130    stats->setNickName( Preferences::getInstance()->getString( "multiplayer", "nickname", "Server" ) );
    131131
    132   if ( rules.isA( MultiplayerTeamDeathmatch::classID()) )
     132  if ( rules.isA( MultiplayerTeamDeathmatch::staticClassID()) )
    133133    dynamic_cast<MultiplayerTeamDeathmatch*>(&rules)->respawnPlayable( &playable, team, 0.0f );
    134134
     
    192192    if ( (*it)->getUniqueID() == uniqueId )
    193193    {
    194       if ( (*it)->isA(Playable::classID()) )
     194      if ( (*it)->isA(Playable::staticClassID()) )
    195195      {
    196196        getInstance()->playablesToDelete.push_back( dynamic_cast<Playable*>(*it) );
     
    321321
    322322  assert( State::getGameRules() );
    323   assert( State::getGameRules()->isA( NetworkGameRules::classID()) );
     323  assert( State::getGameRules()->isA( NetworkGameRules::staticClassID()) );
    324324
    325325  NetworkGameRules & rules = *(dynamic_cast<NetworkGameRules*>(State::getGameRules()));
  • branches/new_class_id/src/lib/network/network_stream.cc

    r9716 r9757  
    967967
    968968      // 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())
    970970        continue;
    971971
     
    973973      if ( ( SharedNetworkData::getInstance()->isMasterServer() ||
    974974             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 )
    976976        continue;
    977977
    978978      /* list of synchronizeables that will never be synchronized over the network: */
    979979      // do not sync null parent
    980       if ( NullParent::classID() == sync.getLeafClassID())
     980      if ( NullParent::staticClassID() == sync.getLeafClassID())
    981981        continue;
    982982
     
    11871187          /* These are some small exeptions in creation: Not all objects can/should be created via Factory */
    11881188          /* 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)
    11901190          {
    11911191            PRINTF(1)("Don't create Object with ID %x, ignored!\n", (int)leafClassId);
     
    12031203          }
    12041204
    1205           if ( b->isA(Synchronizeable::classID()) )
     1205          if ( b->isA(Synchronizeable::staticClassID()) )
    12061206          {
    12071207            sync = dynamic_cast<Synchronizeable*>(b);
  • branches/new_class_id/src/lib/network/synchronizeable.cc

    r9715 r9757  
    7575    // remove the message manager only by the server
    7676    if ( (SharedNetworkData::getInstance()->isMasterServer() )
    77           && this->beSynchronized() && this->getUniqueID() > 0 && !this->isA( MessageManager::classID() ) )
     77          && this->beSynchronized() && this->getUniqueID() > 0 && !this->isA( MessageManager::staticClassID() ) )
    7878      NetworkGameManager::getInstance()->removeSynchronizeable( this->getUniqueID() );
    7979  }
Note: See TracChangeset for help on using the changeset viewer.