Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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

patches: network load level and md2 death

Location:
trunk/src/world_entities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/creatures/md2_creature.cc

    r7069 r7071  
    226226{
    227227  PRINTF(0)("Collided with the md2 model\n");
    228   //entity->die();
    229228}
    230229
  • 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
  • trunk/src/world_entities/test_entity.h

    r7069 r7071  
    1111class Material;
    1212class TiXmlElement;
     13class WorldEntity;
    1314
    1415class TestEntity : public WorldEntity, public PhysicsInterface
     
    2425  virtual void loadParams(const TiXmlElement* root);
    2526
    26   void setAnim(int animationIndex);
     27  void setAnim(int animationIndex, int animPlaybackMode);
    2728
    2829  void dieHard();
     
    3738  Material* material;
    3839
     40  WorldEntity* lastCollided;
     41
    3942};
    4043
Note: See TracChangeset for help on using the changeset viewer.