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/disruptor.cc

    r10698 r10702  
    3838 : Weapon()
    3939{
    40 //     this->registerObject(this, Disruptor::_objectList);
    41 
    4240    this->init();
    4341}
     
    4644 : Weapon()
    4745{
    48 //     this->registerObject(this, Disruptor::_objectList);
    49 
    5046    // TODO add leftRight to params
    5147    this->init();
     
    6864   delete [] this->shootAnim;
    6965   delete [] this->objComp;
    70 /*
    71     for(int j = 0; j < this->getSegs(); j++)
    72     {
    73       delete this->shootAnim[i][j];
    74       delete this->objComp[i][j];
    75     }
    76     delete this->shootAnim[i];
    77     delete this->objComp[i];
    78     delete this->emissionPoint[i];
    79   }*/
    80 
    81 //  this->deconstr();
    82      // model will be deleted from WorldEntity-destructor
     66
    8367}
    8468
     
    198182void Disruptor::draw() const
    199183{
    200   glMatrixMode(GL_MODELVIEW);
    201184  glPushMatrix();
    202   glTranslatef (this->getAbsCoor ().x,
    203                 this->getAbsCoor ().y,
    204                 this->getAbsCoor ().z);
    205     Vector tmpRot = this->getAbsDir().getSpacialAxis();
    206     glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    207 
    208   //Base
    209   static_cast<StaticModel*>(this->getModel())->draw(1);
    210 
    211   // Barrel  glPushMatrix();
    212   glTranslatef
    213     (this->objComp[0][0]->getAbsCoor().x, this->objComp[0][0]->getAbsCoor().y, this->objComp[0][0]->getAbsCoor().z);
    214     static_cast<StaticModel*>(this->getModel())->draw(0);
     185    glMatrixMode(GL_MODELVIEW);
     186    glTranslatef (this->getAbsCoor ().x,
     187                  this->getAbsCoor ().y,
     188                  this->getAbsCoor ().z);
     189      Vector tmpRot = this->getAbsDir().getSpacialAxis();
     190      glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
     191
     192    //Base
     193    static_cast<StaticModel*>(this->getModel())->draw(1);
     194
     195    // Barrel
     196    glPushMatrix();
     197      glTranslatef(this->objComp[0][0]->getAbsCoor().x, this->objComp[0][0]->getAbsCoor().y, this->objComp[0][0]->getAbsCoor().z);
     198      static_cast<StaticModel*>(this->getModel())->draw(0);
     199    glPopMatrix();
    215200  glPopMatrix();
    216201}
Note: See TracChangeset for help on using the changeset viewer.