Changeset 9059 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jul 3, 2006, 6:30:42 PM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/bsp_entity.cc
r9003 r9059 53 53 54 54 this->bspManager = NULL; 55 /** 56 * @todo: Write CL_BSP_ENTITY INTO THE src/defs/class_id.h (your own definition) 57 */ 55 56 this->name_handle = registerVarId( new SynchronizeableString( &this->name, &this->name_write, "name" ) ); 57 58 this->setSynchronized( true ); 58 59 } 59 60 … … 62 63 { 63 64 PRINTF(0)("+++++++++++ LOADING NAME %s\n", name.c_str()); 65 66 this->name = name; 64 67 65 68 // Check wether file exists.... … … 130 133 void BspEntity::collidesWith (WorldEntity* entity, const Vector& location) 131 134 {} 135 136 void BspEntity::varChangeHandler( std::list< int > & id ) 137 { 138 if ( std::find( id.begin(), id.end(), this->name_handle ) != id.end() ) 139 { 140 this->setName( this->name_write ); 141 } 142 } -
trunk/src/world_entities/bsp_entity.h
r8490 r9059 28 28 29 29 void init(); 30 31 virtual void varChangeHandler( std::list<int> & id ); 30 32 31 33 virtual void draw() const; … … 38 40 private: 39 41 BspManager* bspManager; 42 43 std::string name; //!< store name 44 std::string name_write; //!< temp variable to store name 45 int name_handle; //!< handle for name 40 46 41 47 }; -
trunk/src/world_entities/player.h
r9019 r9059 31 31 bool eject(); 32 32 inline Playable* getPlayable() const { return this->playable; }; 33 33 34 34 35 inline Hud& hud() { return this->_hud; }; -
trunk/src/world_entities/world_entity.cc
r9008 r9059 738 738 this->decreaseHealth(damage); 739 739 740 PRINTF( 5)("Hit me: %s now only %f/%f health\n", this->getClassName(), this->getHealth(), this->getHealthMax());740 PRINTF(0)("Hit me: %s now only %f/%f health\n", this->getClassName(), this->getHealth(), this->getHealthMax()); 741 741 742 742 if( this->getHealth() > 0)
Note: See TracChangeset
for help on using the changeset viewer.