Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10698 in orxonox.OLD for trunk/src/world_entities/projectiles


Ignore:
Timestamp:
Jun 14, 2007, 5:33:43 PM (17 years ago)
Author:
snellen
Message:

merged adm, hud, vs-enhancements : beni's responsible for this commit. blame him!

Location:
trunk/src/world_entities/projectiles
Files:
9 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/projectiles/acid_splash.cc

    r10511 r10698  
    116116  this->toList(OM_NULL);
    117117  //this->toList(OM_DEAD);
    118   this->removeNode();
    119  
     118//   this->removeNode();
     119
    120120  AcidSplash::fastFactory->kill(this);
    121121}
  • trunk/src/world_entities/projectiles/hbolt.cc

    r10618 r10698  
    4646  this->setMinEnergy(10);
    4747  this->setHealthMax(0);
    48   this->lifeSpan = 2.0;
     48  this->lifeSpan = 3.0;
    4949
    5050  this->angle = 0;
     
    116116
    117117  this->toList(OM_DEAD);
    118   this->removeNode();
     118//   this->removeNode();
    119119  HBolt::fastFactory->kill(this);
    120120
     
    177177  glPushAttrib(GL_ENABLE_BIT);
    178178  glDisable(GL_LIGHTING);
    179 //   glDisable(GL_FOG);
     179  glDisable(GL_FOG);
    180180
    181181  glMatrixMode(GL_MODELVIEW);
     
    184184//     float matrix[4][4];
    185185    glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
     186    this->halo->draw();
     187
    186188    Vector tmpRot = this->getAbsDir().getSpacialAxis();
    187189    glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
     
    189191//     glMultMatrixf((float*)matrix);
    190192    this->getModel()->draw();
    191     this->halo->draw();
    192193
    193194  glPopMatrix();
  • trunk/src/world_entities/projectiles/laser.cc

    r10114 r10698  
    100100
    101101  this->toList(OM_NULL);
    102   this->removeNode();
     102//   this->removeNode();
    103103  Laser::fastFactory->kill(this);
    104104}
  • trunk/src/world_entities/projectiles/lbolt.cc

    r10618 r10698  
    6262  this->halo = new Billboard();
    6363  this->halo->setSize(.35, .35);
    64   this->halo->setTexture("hbolt_halo.png");
     64  this->halo->setTexture("hbolt_halo.jpg");
    6565  this->halo->setVisibility(false);
    6666
     67  this->halo->setPulse();
    6768
    6869}
     
    120121
    121122  this->toList(OM_DEAD);
    122   this->removeNode();
     123//   this->removeNode();
    123124  LBolt::fastFactory->kill(this);
    124125}
     
    148149
    149150  angle += LBolt::rotationSpeed * dt;
     151  if(angle > 360)
     152    angle -= 360;
    150153
    151154  for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)
     
    183186    float matrix[4][4];
    184187    glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
    185     Vector tmpRot = this->getAbsDir().getSpacialAxis();
     188    this->halo->draw();
     189
     190    Vector tmpRot;
     191    tmpRot = this->flightDirection.getNormalized();
     192    glRotatef(this->angle, tmpRot.x, tmpRot.y, tmpRot.z);
     193    tmpRot = this->getAbsDir().getSpacialAxis();
    186194    glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    187     glRotatef(this->angle, 1.0, 0.0, 0.0);
     195
    188196    this->getAbsDir().matrix (matrix);
    189197    glMultMatrixf((float*)matrix);
    190198    this->getModel()->draw();
    191199
    192     this->halo->draw();
    193 
    194200  glPopMatrix();
    195201  glPopAttrib();
  • trunk/src/world_entities/projectiles/mbolt.cc

    r10618 r10698  
    145145  this->toList(OM_NULL);
    146146  //this->toList(OM_DEAD);
    147   this->removeNode();
     147//   this->removeNode();
    148148  MBolt::fastFactory->kill(this);
    149149}
     
    212212  float matrix[4][4];
    213213  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
    214   glRotatef(this->angle, 1.0f, 0.0f, 0.0f); //spinning missile
     214//   glRotatef(this->angle, 1.0f, 0.0f, 0.0f); //spinning missile
     215  glRotatef(this->angle, this->flightDirection.x, this->flightDirection.y, this->flightDirection.z);
    215216  this->getAbsDir().matrix (matrix);
    216217  glMultMatrixf((float*)matrix);
  • trunk/src/world_entities/projectiles/rail_projectile.cc

    r10114 r10698  
    9999
    100100  this->toList(OM_NULL);
    101   this->removeNode();
     101//   this->removeNode();
    102102  RailProjectile::fastFactory->kill(this);
    103103}
  • trunk/src/world_entities/projectiles/spike.cc

    r10368 r10698  
    111111
    112112  this->toList(OM_NULL);
    113   this->removeNode();
     113//   this->removeNode();
    114114  Spike::fastFactory->kill(this);
    115115}
  • trunk/src/world_entities/projectiles/spike_ball.cc

    r10511 r10698  
    149149
    150150  this->toList(OM_NULL);
    151   this->removeNode();
     151//   this->removeNode();
    152152  SpikeBall::fastFactory->kill(this);
    153153}
  • trunk/src/world_entities/projectiles/swarm_projectile.cc

    r10618 r10698  
    134134
    135135  this->toList(OM_DEAD);
    136   this->removeNode();
     136//   this->removeNode();
    137137  SwarmProjectile::fastFactory->kill(this);
    138138}
     
    200200    this->deactivate();
    201201
    202 
    203 
    204202/** old  guiding function*/
    205 
    206   float projectileVelocity = this->getVelocity().len();
     203  static float projectileVelocity = this->getVelocity().len();
    207204  if (target != NULL){
    208205    Vector estTargetDir = (this->target->getAbsCoor() - this->getAbsCoor()).getNormalized();
     
    225222
    226223  this->angle += this->rotationSpeed * time;
    227 
    228   while (this->angle > 360)
    229   {
    230     this->angle -= 360;
    231   }
     224  while (this->angle > 360) { this->angle -= 360; }
    232225
    233226  this->lastDir = this->curDir;
     
    240233    PRINTF(0)("Target was hit by Swarm Missile!\n");
    241234  }
    242   else if( this->target == NULL)
     235  if( this->target == NULL)
    243236    this->deactivate();
    244237}
Note: See TracChangeset for help on using the changeset viewer.