Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Aug 4, 2006, 11:01:28 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the proxy bache back with no conflicts

File:
1 edited

Legend:

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

    r9494 r9656  
    2828#include "util/loading/resource_manager.h"
    2929#include "util/loading/load_param.h"
    30 #include "vector.h"
    3130#include "obb_tree.h"
    3231
     
    8685  this->toList(OM_NULL);
    8786
    88   registerVar( new SynchronizeableString( &this->md2TextureFileName, &this->md2TextureFileName, "md2TextureFileName" ) );
    89   modelFileName_handle = registerVarId( new SynchronizeableString( &modelFileName, &modelFileName, "modelFileName" ) );
    90   scaling_handle = registerVarId( new SynchronizeableFloat( &scaling, &scaling, "scaling" ) );
    91   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" ) );
     87  registerVar( new SynchronizeableString( &this->md2TextureFileName, &this->md2TextureFileName, "md2TextureFileName", PERMISSION_MASTER_SERVER ) );
     88  modelFileName_handle = registerVarId( new SynchronizeableString( &modelFileName, &modelFileName, "modelFileName", PERMISSION_MASTER_SERVER ) );
     89  scaling_handle = registerVarId( new SynchronizeableFloat( &scaling, &scaling, "scaling", PERMISSION_MASTER_SERVER ) );
     90  list_handle = registerVarId( new SynchronizeableInt( (int*)&objectListNumber, &list_write, "list", PERMISSION_MASTER_SERVER ) );
     91
     92  health_handle = registerVarId( new SynchronizeableFloat( &this->health, &this->health_write, "health", PERMISSION_MASTER_SERVER ) );
     93  healthMax_handle = registerVarId( new SynchronizeableFloat( &this->healthMax, &this->healthMax_write, "maxHealth", PERMISSION_MASTER_SERVER ) );
    9594}
    9695
     
    141140  .describe("The Health the WorldEntity has at this moment")
    142141  .defaultValues(1.0f);
     142
     143  LoadParam(root, "list", this, WorldEntity, toListS);
    143144}
    144145
     
    478479}
    479480
     481void WorldEntity::toListS(const std::string& listName)
     482{
     483  OM_LIST id = ObjectManager::StringToOMList(listName);
     484  if (id != OM_NULL)
     485    this->toList(id);
     486  else
     487    PRINTF(2)("List %s not found\n", listName.c_str());
     488}
     489
     490
    480491void WorldEntity::toReflectionList()
    481492{
     
    822833  PRINT(0)("WorldEntity %s::%s  (DEBUG)\n", this->getClassCName(), this->getCName());
    823834  this->debugNode();
    824   PRINT(0)("List: %s ; ModelCount %d - ", ObjectManager::OMListToString(this->objectListNumber) , this->models.size());
     835  PRINT(0)("List: %s ; ModelCount %d - ", ObjectManager::OMListToString(this->objectListNumber).c_str(), this->models.size());
    825836  for (unsigned int i = 0; i < this->models.size(); i++)
    826837  {
Note: See TracChangeset for help on using the changeset viewer.