Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8147 in orxonox.OLD for trunk/src/lib/network/player_stats.cc


Ignore:
Timestamp:
Jun 5, 2006, 12:09:15 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the network branche back here
merged with command:
svn merge -r8070:HEAD https://svn.orxonox.net/orxonox/branches/network .
no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/network/player_stats.cc

    r8068 r8147  
    8686   
    8787    PRINTF(0)("uniqueID changed %d %d\n", userId, getHostID());
    88    
    89     if ( userId == getHostID() )
    90       State::getPlayer()->setPlayable( getPlayable() );
    9188  }
    9289}
     
    10097{
    10198  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
     99 
     100  if ( !list )
     101    return NULL;
    102102 
    103103  for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
     
    121121  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
    122122 
     123  if ( !list )
     124  {
     125    this->playableUniqueId = uniqueId;
     126    return;
     127  }
     128 
    123129  this->playable = NULL;
    124130  for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
     
    130136    }
    131137  }
     138 
     139  if ( this->playable && userId == getHostID() )
     140    State::getPlayer()->setPlayable( this->playable );
    132141 
    133142  this->playableUniqueId = uniqueId;
Note: See TracChangeset for help on using the changeset viewer.