Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 14, 2007, 11:23:51 PM (17 years ago)
Author:
nicolasc
Message:

minor improvements, some cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/weapons/rf_cannon.cc

    r10701 r10702  
    126126void RFCannon::fire()
    127127{
    128 //   for (int i = 0; i < this->getBarrels(); i++){
    129     Projectile* pj =  this->getProjectile();
    130     if (pj == NULL)
    131       return;
     128  Projectile* pj =  this->getProjectile();
     129  if (pj == NULL)
     130    return;
    132131
    133     // set the owner
    134     pj->setOwner(this->getOwner());
     132  // set the owner
     133  pj->setOwner(this->getOwner());
    135134
    136     pj->setParent(PNode::getNullParent());
     135  pj->setParent(PNode::getNullParent());
    137136
    138     pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*190);
     137  pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*190);
    139138
    140     pj->setAbsCoor(this->emissionPoint[this->activeBarrel]->getAbsCoor());
    141     pj->setAbsDir(this->getAbsDir());
    142     pj->activate();
     139  pj->setAbsCoor(this->emissionPoint[this->activeBarrel]->getAbsCoor());
     140  pj->setAbsDir(this->getAbsDir());
     141  pj->activate();
    143142
    144     this->activeBarrel = (this->activeBarrel + 1) % this->getBarrels();
    145 //   }
     143  this->activeBarrel = (this->activeBarrel + 1) % this->getBarrels();
    146144}
    147145
     
    162160void RFCannon::draw() const
    163161{
    164   glMatrixMode(GL_MODELVIEW);
    165162  glPushMatrix();
     163    glMatrixMode(GL_MODELVIEW);
    166164    glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
    167165    Vector tmpRot = this->getAbsDir().getSpacialAxis();
Note: See TracChangeset for help on using the changeset viewer.