Changeset 9068 in orxonox.OLD for branches/presentation/src/world_entities
- Timestamp:
- Jul 3, 2006, 8:55:53 PM (19 years ago)
- Location:
- branches/presentation/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/world_entity.cc
r9061 r9068 85 85 86 86 this->toList(OM_NULL); 87 87 88 registerVar( new SynchronizeableString( &this->md2TextureFileName, &this->md2TextureFileName, "md2TextureFileName" ) ); 88 89 modelFileName_handle = registerVarId( new SynchronizeableString( &modelFileName, &modelFileName, "modelFileName" ) ); 89 90 scaling_handle = registerVarId( new SynchronizeableFloat( &scaling, &scaling, "scaling" ) ); 90 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" ) ); 91 95 } 92 96 … … 837 841 this->toList( (OM_LIST)list_write ); 838 842 } 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 } 839 853 840 854 PNode::varChangeHandler( id ); -
branches/presentation/src/world_entities/world_entity.h
r9008 r9068 198 198 int list_write; //!< entity's list 199 199 int list_handle; //!< handle for list changes 200 201 float health_write; 202 int health_handle; 203 204 float healthMax_write; 205 int healthMax_handle; 200 206 201 207 CollisionHandle* collisionHandles[CREngine::CR_NUMBER]; //!< the list of the collision reactions
Note: See TracChangeset
for help on using the changeset viewer.