Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9110 in orxonox.OLD for trunk/src/world_entities/world_entity.cc


Ignore:
Timestamp:
Jul 4, 2006, 11:18:41 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the Presentation back

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/world_entity.cc

    r9061 r9110  
    8585
    8686  this->toList(OM_NULL);
    87 
     87 
     88  registerVar( new SynchronizeableString( &this->md2TextureFileName, &this->md2TextureFileName, "md2TextureFileName" ) );
    8889  modelFileName_handle = registerVarId( new SynchronizeableString( &modelFileName, &modelFileName, "modelFileName" ) );
    8990  scaling_handle = registerVarId( new SynchronizeableFloat( &scaling, &scaling, "scaling" ) );
    9091  list_handle = registerVarId( new SynchronizeableInt( (int*)&objectListNumber, &list_write, "list" ) );
     92 
     93  health_handle = registerVarId( new SynchronizeableFloat( &this->health, &this->health_write, "health" ) );
     94  healthMax_handle = registerVarId( new SynchronizeableFloat( &this->healthMax, &this->healthMax_write, "maxHealth" ) );
    9195}
    9296
     
    837841    this->toList( (OM_LIST)list_write );
    838842  }
     843 
     844  if ( std::find( id.begin(), id.end(), health_handle ) != id.end() )
     845  {
     846    this->setHealth( health_write );
     847  }
     848 
     849  if ( std::find( id.begin(), id.end(), healthMax_handle ) != id.end() )
     850  {
     851    this->setHealthMax( healthMax_write );
     852  }
    839853
    840854  PNode::varChangeHandler( id );
Note: See TracChangeset for help on using the changeset viewer.