Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jun 14, 2006, 10:08:41 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: removed stupid included in base_object.h
this should lead to faster compile-times

File:
1 edited

Legend:

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

    r8228 r8362  
    2323#include "shared_network_data.h"
    2424
     25#include "debug.h"
     26
    2527
    2628CREATE_FACTORY(PlayerStats, CL_PLAYER_STATS);
     
    3234{
    3335  init();
    34  
     36
    3537  this->userId = userId;
    3638}
     
    5456  this->playableClassId = 0;
    5557  this->modelFileName = "";
    56  
     58
    5759  userId_handle = registerVarId( new SynchronizeableInt( &userId, &userId, "userId" ) );
    5860  teamId_handle = registerVarId( new SynchronizeableInt( &teamId, &teamId, "teamId" ) );
     
    6264  playableUniqueId_handle = registerVarId( new SynchronizeableInt( &playableUniqueId, &playableUniqueId, "playableUniqueId" ) );
    6365  modelFileName_handle = registerVarId( new SynchronizeableString( &modelFileName, &modelFileName, "modelFileName" ) );
    64  
     66
    6567  PRINTF(0)("PlayerStats created\n");
    6668}
     
    8587  {
    8688    this->setPlayableUniqueId( this->playableUniqueId );
    87    
     89
    8890    PRINTF(0)("uniqueID changed %d %d %d\n", userId, getHostID(), getUniqueID());
    8991  }
     
    98100{
    99101  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
    100  
     102
    101103  if ( !list )
    102104  {
    103105    return NULL;
    104106  }
    105  
     107
    106108  for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
    107109  {
     
    111113    }
    112114  }
    113  
     115
    114116  return NULL;
    115117}
     
    121123{
    122124  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
    123  
     125
    124126  if ( !list )
    125127  {
     
    127129    return;
    128130  }
    129  
     131
    130132  this->playable = NULL;
    131133  for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
     
    139141    }
    140142  }
    141  
     143
    142144  if ( this->playable && userId == getHostID() )
    143145  {
    144146    State::getPlayer()->setPlayable( this->playable );
    145147  }
    146  
     148
    147149  this->playableUniqueId = uniqueId;
    148150}
     
    156158  if ( playable )
    157159    return playable;
    158  
     160
    159161  assert( playableUniqueId > 0 );
    160  
     162
    161163  setPlayableUniqueId( playableUniqueId );
    162  
     164
    163165  assert( playable );
    164  
     166
    165167  return playable;
    166168}
Note: See TracChangeset for help on using the changeset viewer.