Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10274 in orxonox.OLD for branches


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

fixes and workaround bugs of Orx

Location:
branches/playability/src/world_entities
Files:
8 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
  • branches/playability/src/world_entities/projectiles/hbolt.h

    r10261 r10274  
    2727    virtual void deactivate();
    2828
    29     virtual void hit (WorldEntity* entity, float damage);
     29    virtual void hit (float damage, WorldEntity* entity);
    3030
    3131    virtual void destroy (WorldEntity* killer);
  • branches/playability/src/world_entities/projectiles/lbolt.cc

    r10261 r10274  
    4747  this->setMinEnergy(1);
    4848  this->setHealthMax(0);
    49   this->lifeSpan = 2.0;
     49  this->lifeSpan = 1.0;
    5050
    5151  this->emitter = new DotEmitter(100, 5, M_2_PI);
     
    8686void LBolt::activate()
    8787{
     88  this->toList(OM_ENVIRON);
    8889  if (unlikely(LBolt::explosionParticles == NULL))
    8990  {
     
    110111  this->lifeCycle = 0.0;
    111112
    112   this->toList(OM_NULL);
     113  this->toList(OM_DEAD);
    113114  this->removeNode();
    114115  LBolt::fastFactory->kill(this);
     
    116117
    117118
    118 void LBolt::hit (WorldEntity* entity, float damage)
     119void LBolt::hit (float damage, WorldEntity* entity )
    119120{
    120121  PRINTF(0)("Collision with LBolt\n");
     
    139140
    140141  angle += rotationSpeed * dt;
     142
     143  for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
     144  {
     145    if( ((*eIterator)->getOMListNumber() == OM_GROUP_00)  && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
     146    {
     147      (*eIterator)->hit (this->getDamage(),this);
     148      this->deactivate();
     149  PRINTF(0)("LBolt destroyed\n");
     150    }
     151  }
    141152}
    142153
  • branches/playability/src/world_entities/projectiles/lbolt.h

    r10261 r10274  
    2727    virtual void deactivate();
    2828
    29     virtual void hit (WorldEntity* entity, float damage);
     29    virtual void hit (float damage, WorldEntity* entity);
    3030
    3131    virtual void destroy (WorldEntity* killer);
  • branches/playability/src/world_entities/projectiles/mbolt.cc

    r10261 r10274  
    5353  this->setMinEnergy(4);
    5454  this->setHealthMax(0);
    55   this->lifeSpan = 3.0;
     55  this->lifeSpan = 1.5;
    5656  this->angle     = 0;
    5757
     
    107107void MBolt::activate()
    108108{
     109  this->toList(OM_ENVIRON);
    109110  if (unlikely(MBolt::explosionParticles == NULL))
    110111  {
     
    141142}
    142143
    143 void MBolt::hit (WorldEntity* entity, float damage)
     144void MBolt::hit (float damage, WorldEntity* entity )
    144145{
    145146
     
    170171  this->angle += MBolt::rotationSpeed * dt;
    171172  this->trail->tick(dt);
     173
     174  for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
     175  {
     176    if( ((*eIterator)->getOMListNumber() == OM_GROUP_00) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
     177    {
     178      (*eIterator)->hit (this->getDamage(),this);
     179      this->deactivate();
     180      PRINTF(0)("MBolt destroyed\n");
     181    }
     182  }
    172183}
    173184
  • branches/playability/src/world_entities/projectiles/mbolt.h

    r10261 r10274  
    2828    virtual void deactivate();
    2929
    30     virtual void hit (WorldEntity* entity, float damage);
     30    virtual void hit (float damage, WorldEntity* entity);
    3131
    3232    virtual void destroy (WorldEntity* killer);
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r10271 r10274  
    10401040}
    10411041
    1042 void SpaceShip::hit(float damage, WorldEntity* killer)
     1042void SpaceShip::hit( float damage, WorldEntity* killer)
    10431043{
    10441044  this->damage(killer->getDamage(),0);
  • branches/playability/src/world_entities/space_ships/space_ship.h

    r10270 r10274  
    5959
    6060    virtual void process(const Event &event);
     61//    virtual void hit (WorldEntity* entity, float damage);
    6162
    6263    inline WeaponManager& getWeaponManagerSecondary() { return this->secWeaponMan; };
     
    204205    Trail*                trailR;              //!< Burst trail
    205206
    206 //    Wobblegrid*           test;
    207207
    208208};
Note: See TracChangeset for help on using the changeset viewer.