Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2007, 6:42:07 PM (17 years ago)
Author:
marcscha
Message:

fixes and workaround bugs of Orx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/projectiles/hbolt.cc

    r10261 r10274  
    4545  this->setMinEnergy(10);
    4646  this->setHealthMax(0);
    47   this->lifeSpan = 7.0;
     47  this->lifeSpan = 2.0;
    4848
    4949  this->angle = 0;
     
    8484void HBolt::activate()
    8585{
     86  this->toList(OM_ENVIRON);
    8687  if (unlikely(HBolt::explosionParticles == NULL))
    8788  {
     
    108109  this->lifeCycle = 0.0;
    109110
    110   this->toList(OM_NULL);
     111  this->toList(OM_DEAD);
    111112  this->removeNode();
    112113  HBolt::fastFactory->kill(this);
     114
    113115}
    114116
    115117
    116 void HBolt::hit (WorldEntity* entity, float damage)
     118void HBolt::hit (float damage, WorldEntity* entity )
    117119{
    118120  printf("Collision with HBolt\n");
     
    140142  this->angle += this->rotationSpeed * dt;
    141143
    142 
     144  for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
     145  {
     146    if( ((*eIterator)->getOMListNumber() == OM_GROUP_00)  && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
     147    {
     148      (*eIterator)->hit (this->getDamage(),this);
     149      this->deactivate();
     150  PRINTF(0)("HBolt destroyed\n");
     151    }
     152  }
    143153}
    144154
Note: See TracChangeset for help on using the changeset viewer.