Changeset 7113 in orxonox.OLD for trunk/src/world_entities/test_entity.cc
- Timestamp:
- Feb 8, 2006, 2:20:19 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/test_entity.cc
r7078 r7113 59 59 this->setClassID(CL_TEST_ENTITY, "TestEntity"); 60 60 this->toList(OM_GROUP_00); 61 62 this->bDeath = false; 61 63 } 62 64 … … 104 106 void TestEntity::dieHard() 105 107 { 106 this->setAnim(DEATH_FALLBACK, MD2_ANIM_ONCE); 108 if( this->bDeath) 109 return; 110 this->bDeath = true; 111 float anim; 112 int randi = (int)(5.0f * (float)rand()/(float)RAND_MAX); 113 114 PRINTF(0)("randi = %i\n", randi); 115 116 if( randi == 1) 117 this->setAnim(DEATH_FALLBACK, MD2_ANIM_ONCE); 118 else if( randi == 2) 119 this->setAnim(DEATH_FALLFORWARD, MD2_ANIM_ONCE); 120 else if( randi == 3) 121 this->setAnim(DEATH_FALLBACKSLOW, MD2_ANIM_ONCE); 122 else if( randi == 4) 123 this->setAnim(CROUCH_DEATH, MD2_ANIM_ONCE); 124 else 125 this->setAnim(DEATH_FALLBACK, MD2_ANIM_ONCE); 107 126 } 108 127
Note: See TracChangeset
for help on using the changeset viewer.