Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7113 in orxonox.OLD


Ignore:
Timestamp:
Feb 8, 2006, 2:20:19 AM (18 years ago)
Author:
patrick
Message:

trunk: different death animations

Location:
trunk/src/world_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/effects/lightning_bolt.cc

    r7112 r7113  
    5454  this->seedX = 200.f;
    5555  this->seedZ = 500.0f;
    56   this->seedTime = 2.0f;
     56  this->seedTime = 4.0f;
    5757
    5858  this->soundSource.setSourceNode(this);
     
    108108    this->flashFrequency = this->seedTime * (float)rand()/(float)RAND_MAX + 0.1;
    109109    this->setAbsCoor( - 800.0f - this->seedX * (float)rand()/(float)RAND_MAX, 250.00, -200.0f + this->seedZ * (float)rand()/(float)RAND_MAX);
    110 
    111     PRINTF(0)("timeout: %f\n", this->flashFrequency);
    112     this->getAbsCoor().debug();
    113 
    114110    this->bNewCoordinate = false;
    115111  }
  • trunk/src/world_entities/effects/lightning_bolt.h

    r7112 r7113  
    11/*!
    2  * @file explosion.h
     2 * @file lightning_bolt.h
    33 * @brief a LightningBolt Projectile
    4 */
     4 *  Der Effekt soll folgendermaßen funktionieren:
     5 * -> Ein Partikel mit einer Blitz-Textur soll sehr schnell erscheinen,
     6 * -> während er an Intensität zunimmt soll die Beleuchtung der gerenderten Szene entsprechend zunehmen.
     7 * -> Je mehr Blitze zum gleichen Zeitpunkt sichtbar sind, desto heller soll die Beleuchtung werden, das heißt die Helligkeitszunahme pro Blitz soll Additiv sein.
     8 * -> Ein Partikel soll ebenfalls sehr schnell wieder verblassen, dabei soll die Beleuchtung entsprechend der vorhergehenden Zunahme wieder abnehmen (Additiv)
     9 */
    510
    611#ifndef _LIGHTNING_BOLT_H
  • trunk/src/world_entities/test_entity.cc

    r7078 r7113  
    5959  this->setClassID(CL_TEST_ENTITY, "TestEntity");
    6060  this->toList(OM_GROUP_00);
     61
     62  this->bDeath = false;
    6163}
    6264
     
    104106void TestEntity::dieHard()
    105107{
    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);
    107126}
    108127
  • trunk/src/world_entities/test_entity.h

    r7071 r7113  
    4040  WorldEntity* lastCollided;
    4141
     42  bool bDeath;
    4243};
    4344
Note: See TracChangeset for help on using the changeset viewer.