Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7071 in orxonox.OLD for trunk/src/world_entities/test_entity.cc


Ignore:
Timestamp:
Feb 7, 2006, 2:58:08 PM (18 years ago)
Author:
patrick
Message:

patches: network load level and md2 death

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/test_entity.cc

    r6512 r7071  
    7676
    7777
    78 void  TestEntity::setAnim(int animationIndex)
     78void  TestEntity::setAnim(int animationIndex, int animPlaybackMode)
    7979{
    8080  if( likely(this->getModel(0) != NULL))
    81     ((MD2Model*)this->getModel(0))->setAnim(animationIndex);
     81    ((MD2Model*)this->getModel(0))->setAnim(animationIndex, animPlaybackMode);
    8282}
    8383
     
    9292
    9393void TestEntity::collidesWith(WorldEntity* entity, const Vector& location)
    94 {}
     94{
     95  if( this->lastCollided != entity)
     96  {
     97    this->dieHard();
     98    this->lastCollided = entity;
     99  }
     100}
    95101
    96102
     103
     104void TestEntity::dieHard()
     105{
     106  this->setAnim(DEATH_FALLBACK, MD2_ANIM_ONCE);
     107}
     108
Note: See TracChangeset for help on using the changeset viewer.