Changeset 9656 in orxonox.OLD for trunk/src/world_entities/world_entity.cc
- Timestamp:
- Aug 4, 2006, 11:01:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/world_entity.cc
r9494 r9656 28 28 #include "util/loading/resource_manager.h" 29 29 #include "util/loading/load_param.h" 30 #include "vector.h"31 30 #include "obb_tree.h" 32 31 … … 86 85 this->toList(OM_NULL); 87 86 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 ) ); 95 94 } 96 95 … … 141 140 .describe("The Health the WorldEntity has at this moment") 142 141 .defaultValues(1.0f); 142 143 LoadParam(root, "list", this, WorldEntity, toListS); 143 144 } 144 145 … … 478 479 } 479 480 481 void 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 480 491 void WorldEntity::toReflectionList() 481 492 { … … 822 833 PRINT(0)("WorldEntity %s::%s (DEBUG)\n", this->getClassCName(), this->getCName()); 823 834 this->debugNode(); 824 PRINT(0)("List: %s ; ModelCount %d - ", ObjectManager::OMListToString(this->objectListNumber) 835 PRINT(0)("List: %s ; ModelCount %d - ", ObjectManager::OMListToString(this->objectListNumber).c_str(), this->models.size()); 825 836 for (unsigned int i = 0; i < this->models.size(); i++) 826 837 {
Note: See TracChangeset
for help on using the changeset viewer.