Changeset 7071 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Feb 7, 2006, 2:58:08 PM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/creatures/md2_creature.cc
r7069 r7071 226 226 { 227 227 PRINTF(0)("Collided with the md2 model\n"); 228 //entity->die();229 228 } 230 229 -
trunk/src/world_entities/test_entity.cc
r6512 r7071 76 76 77 77 78 void TestEntity::setAnim(int animationIndex )78 void TestEntity::setAnim(int animationIndex, int animPlaybackMode) 79 79 { 80 80 if( likely(this->getModel(0) != NULL)) 81 ((MD2Model*)this->getModel(0))->setAnim(animationIndex );81 ((MD2Model*)this->getModel(0))->setAnim(animationIndex, animPlaybackMode); 82 82 } 83 83 … … 92 92 93 93 void TestEntity::collidesWith(WorldEntity* entity, const Vector& location) 94 {} 94 { 95 if( this->lastCollided != entity) 96 { 97 this->dieHard(); 98 this->lastCollided = entity; 99 } 100 } 95 101 96 102 103 104 void TestEntity::dieHard() 105 { 106 this->setAnim(DEATH_FALLBACK, MD2_ANIM_ONCE); 107 } 108 -
trunk/src/world_entities/test_entity.h
r7069 r7071 11 11 class Material; 12 12 class TiXmlElement; 13 class WorldEntity; 13 14 14 15 class TestEntity : public WorldEntity, public PhysicsInterface … … 24 25 virtual void loadParams(const TiXmlElement* root); 25 26 26 void setAnim(int animationIndex );27 void setAnim(int animationIndex, int animPlaybackMode); 27 28 28 29 void dieHard(); … … 37 38 Material* material; 38 39 40 WorldEntity* lastCollided; 41 39 42 }; 40 43
Note: See TracChangeset
for help on using the changeset viewer.